forked from LukeSmithxyz/mutt-wizard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmw.1
472 lines (470 loc) · 11.1 KB
/
mw.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
.\" Automatically generated by Pandoc 2.14.0.2
.\"
.TH "mw" "1" "" "Version 2.0.7" "mailwizard man page"
.hy
.SH NAME
.PP
\f[B]mw\f[R] \[em] mailwizard - add, list, remove email configurations
for mbsync, getmail and mutt.
Sync email without mutt.
.SH SYNOPSIS
.PP
\f[B]mw\f[R] [<command>|<email>]
.PP
\f[B]mw\f[R] Same as \f[I]mw sync\f[R]
.PD 0
.P
.PD
\f[B]mw add\f[R] Add and configure an email address (9 max.)
.PD 0
.P
.PD
\f[B]mw list\f[R] List configured accounts
.PD 0
.P
.PD
\f[B]mw remove\f[R] Pick an account to remove
.PD 0
.P
.PD
\f[B]mw purge\f[R] Remove all accounts and settings
.PD 0
.P
.PD
\f[B]mw cron\f[R] Enable or disable an autosync via cronjob
.PD 0
.P
.PD
\f[B]mw sync\f[R] Sync mail based on config in
\f[I].config/isync/mbsyncrc\f[R] and \f[I].config/getmail/*\f[R]
.PD 0
.P
.PD
\f[B]mw \[en]help|-h\f[R] Print this message
.PD 0
.P
.PD
\f[B]mw \[en]version|-v\f[R] Print version
.SH DESCRIPTION
.PP
\f[B]mw\f[R] configures \f[B]mbsync\f[R], \f[B]getmail\f[R],
\f[B]msmtp\f[R] and \f[B]mutt\f[R] in one go.
\f[B]mutt\f[R] stands for \f[B]mutt\f[R] or \f[B]neomutt\f[R].
.PP
\f[B]mw\f[R] asks the user for the information it needs.
They cannot be provided as parameters to the command.
It is still possible to script \f[B]mw\f[R] by defining variables.
See the commands section.
.PP
\f[I]mailwizard.muttrc\f[R] is linked in your \f[I]muttrc\f[R].
Have this line there, if you prefer your own settings:
.IP
.nf
\f[C]
# source /usr/share/mailwizard/mailwizard.muttrc
\f[R]
.fi
.PP
You will need to keep the binding of \f[I]i,g,C,M\f[R] to
\f[I]noop\f[R], though, because of the generated bindings in the account
muttrc.
.SH COMMANDS
.PP
Without command parameter \f[B]sync\f[R] is assumed.
If the parameter contains \[at] an email is assumed and synced.
.PP
\f[I]add\f[R]
.RS
.PP
Add new email
.PP
First you decide, whether you want to configure
.IP \[bu] 2
\f[B]mbsync\f[R], \f[B]getmail\f[R], \f[B]msmtp\f[R] to sync emails
independently from \f[B]mutt\f[R] using \f[B]mw\f[R],
.IP \[bu] 2
or just \f[B]mutt\f[R].
For an IMAP server \f[B]mutt\f[R] becomes very slow.
So normally you enter \f[B]yes\f[R] here.
.PP
\f[B]mw\f[R] asks you the \f[B]email address\f[R].
.PP
\f[B]mw\f[R] has a \f[B]database\f[R] of IMAP4/POP3 and SMTP servers and
ports.
If you are lucky, your email server is there.
Else \f[B]mw\f[R] will prompt you.
.PP
Add an email without questions, e.g.:
.IP
.nf
\f[C]
a=x.y\[at]gmail.com mwtype=offline mwaddr=$a mwlogin=$a mwpass=mailwizard-$a mwserverinfo=\[dq]gmail.com,imap.gmail.com,993,smtp.gmail.com,587\[dq] mwname=\[dq]your name\[dq] mw add
\f[R]
.fi
.PP
\f[I]mwserverinfo\f[R] can be omitted, if the email domain is in the
accompanied \f[I]domains.csv\f[R].
\f[I]mwusegetmail=1\f[R] as additional define uses getmail instead of
mbsync.
.RE
.PP
\f[I]ls|list\f[R]
.RS
.PP
List all email accounts configured by mailwizard
.RE
.PP
\f[I]rm|remove\f[R]
.RS
.PP
Remove the configuration files for an already configured email
.PP
Remove without question:
.IP \[bu] 2
by email whose generated muttrc starts with 1:
.RS 2
.IP
.nf
\f[C]
mwaddr=$email mw rm
#the following removes also the emails
mwrmmails=YES mwaddr=$email mw rm
\f[R]
.fi
.RE
.IP \[bu] 2
by number of the generated muttrc (e.g.
1 here):
.RS 2
.IP
.nf
\f[C]
mwpick=1 mw rm <<<y
\f[R]
.fi
.RE
.RE
.PP
\f[I]purge\f[R]
.RS
.PP
Removes all mw generated mutt settings and
.PP
\f[I].config/mutt/accounts/1-*\f[R]
.PD 0
.P
.PD
\f[I].config/isync/mbsyncrc\f[R]
.PD 0
.P
.PD
\f[I].config/getmail/*\f[R]
.PD 0
.P
.PD
\f[I].config/msmtp/config\f[R]
.PP
Files are under \f[I].config\f[R] or \f[I]$XDG_CONFIG_HOME\f[R]
.PP
If you don\[aq]t want questions:
.IP
.nf
\f[C]
mw purge <<<y
\f[R]
.fi
.RE
.PP
\f[I]cron\f[R]
.RS
.PP
Toggle a cronjob that periodically syncs mail
.PP
Without questions:
.IP
.nf
\f[C]
mwcronremove=yes mw cron
mwcronminutes=99 mw cron
\f[R]
.fi
.RE
.PP
\f[I]sync\f[R]
.RS
.PP
Syncs mail for all email accounts managed by \f[B]mw\f[R] (whose paths
end in the email), and pops up notifications for new mail.
.PP
\f[B]mw\f[R] alone, without \f[I]sync\f[R], syncs without notifications.
.PP
If an email address is given, only that email is synced.
.PP
Every \f[B]mw\f[R] sync run will re-generate the \f[B]mutt\f[R]
configuration from the configuration files for \f[B]mbsync\f[R],
\f[B]getmail\f[R] and \f[B]msmtp\f[R].
So you could edit them after or not use \f[I]mw add\f[R] at all.
.PP
Just keep the \f[I]Path\f[R], \f[I]path\f[R] and \f[I]account\f[R]
ending in the email address.
.PP
If \f[I]notmuch\f[R] is installed, then \f[I]export MWNOTMUCHNEW=0\f[R]
suppresses calling it at sync.
.RE
.SH DEPENDENCIES
.PP
Required for email setup or operation:
.IP \[bu] 2
\f[I]pass\f[R] - pass (https://www.passwordstore.org/) safely encrypts
passwords
.IP \[bu] 2
\f[I]gnupg\f[R] - needed by \f[I]pass\f[R]
.IP \[bu] 2
\f[I]mutt/neomutt\f[R] - the email client (\f[I]mutt\f[R] untested).
.IP \[bu] 2
\f[I]isync\[cq]s mbsync\f[R] - syncs the mail
.IP \[bu] 2
\f[I]getmail\f[R] - used for POP3
.IP \[bu] 2
\f[I]msmtp\f[R] - sends the email
.PP
Optional:
.IP \[bu] 2
\f[I]w3m\f[R] - view HTML email and images in \f[B]mutt\f[R].
.IP \[bu] 2
\f[I]notmuch\f[R] - index and search mail.
If the configuration file \f[I]$NOTMUCH_CONFIG\f[R] is not there,
\f[I]mw add\f[R] will create it.
.IP \[bu] 2
\f[I]libnotify\f[R] - allows notifications when syncing mail with
\f[B]mw\f[R]
.IP \[bu] 2
\f[I]abook\f[R] - a terminal-based address book.
.IP \[bu] 2
A cron manager (e.g.\ *cronie*) - if you want to enable the auto-sync
feature.
.IP \[bu] 2
\f[I]pam-gnupg\f[R] - Forwards your login password to the
gpg-agent (https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html).
Login password and GPG password must be the same.
\f[I]default-cache-ttl\f[R] and \f[I]max-cache-ttl\f[R] in
\f[I]gpg-agent.conf\f[R] still apply.
Increasing them to avoid password requests too soon after login.
.IP \[bu] 2
\f[I]urlscan\f[R] - outputs urls in mail
.SH INSTALLATION
.IP
.nf
\f[C]
git clone https://github.com/rpuntaie/mailwizard
cd mailwizard
\f[R]
.fi
.PP
Then install, either globally:
.IP
.nf
\f[C]
sudo make install
\f[R]
.fi
.PP
or locally:
.IP
.nf
\f[C]
PREFIX=\[ti]/.local make install
\f[R]
.fi
.SH MUTT CONFIGURATION
.PP
Once everything is setup, you\[cq]ll use \f[B]mutt\f[R] to access your
mail.
.PP
The accompanied \f[I]mailwizard.muttrc\f[R] modifies some \f[B]mutt\f[R]
defaults.
Look there for a complete list.
.PP
Here an overview:
.IP \[bu] 2
\f[I]?\f[R] - see all keyboard shortcuts
.PP
\f[B]syncing\f[R]
.IP \[bu] 2
\f[I]gm / gM\f[R] - call mailwizard\[cq]s \f[I]mw sync\f[R] for one /
all mail accounts
.PP
\f[B]mailboxes,accounts\f[R]
.IP \[bu] 2
\f[I]ixy\f[R] - To go to \f[B]mailbox\f[R].
.IP \[bu] 2
\f[I]Mxy\f[R], \f[I]Cxy\f[R] - For Move and Copy to the according
mailbox, e.g.\ *Msp* means \[dq]move to Spam\[dq].
.IP \[bu] 2
\f[I]i[1-9]\f[R] - go to another \f[B]account\f[R].
.RS 2
.PP
\f[I]xy\f[R] are
.IP \[bu] 2
the two first letters of a mailbox or
.IP \[bu] 2
first letter of first + second letter of second path entry
.RE
.PP
\f[B]searching\f[R]
.IP \[bu] 2
\f[I]S\f[R] - search for a mail using \f[I]notmuch\f[R]
.IP \[bu] 2
\f[I]gl\f[R] - limit by substring of subject
.IP \[bu] 2
\f[I]gL\f[R] - undo limit
.PP
\f[B]composing\f[R]
.IP \[bu] 2
\f[I]ga\f[R] - to add address/person to \f[I]abook\f[R] and
\f[I]Tab\f[R] while typing address to complete one from book.
.IP \[bu] 2
\f[I]m/r/gr/f\f[R] - new/reply/group reply/forward \f[B]message\f[R],
using your default \f[I]$EDITOR\f[R] to write.
Then you enter the \f[B]compose screen\f[R].
.IP \[bu] 2
\f[I]a\f[R] - to add attachments
.IP \[bu] 2
\f[I]s/t/c/b/d\f[R] - to change the subject/to/CC/BCC/description.
.IP \[bu] 2
\f[I]S\f[R] - to change the signature/encryption
.IP \[bu] 2
\f[I]y\f[R] - to send the mail.
.PP
\f[B]delete,undelete,save\f[R]
.IP \[bu] 2
\f[I]dd\f[R] - delete mail
.IP \[bu] 2
\f[I]u\f[R] - undelete
.IP \[bu] 2
\f[I]$\f[R] - apply the mailbox changes \f[I]set trash\f[R] is set per
default.
Deleted mails will land there.
.IP \[bu] 2
\f[I]s\f[R] - save selected mail or selected attachment
.PP
\f[B]moving around\f[R]
.IP \[bu] 2
\f[I]gu\f[R] - open a menu to select a url you want to open in you
browser (needs urlscan).
.IP \[bu] 2
\f[I]j\f[R]/\f[I]k\f[R] - next/previous mail, \f[I]J/K\f[R] same,
without skipping deleted, and also when viewing mails
.IP \[bu] 2
\f[I]ctrl-d/f\f[R]/\f[I]ctrl-u/b\f[R] - down and up a half page / full
page
.IP \[bu] 2
\f[I]l\f[R] - open mail, or attachment page or attachment
.IP \[bu] 2
\f[I]h\f[R] - the opposite of \f[I]l\f[R]
.PP
\f[B]sidebar\f[R]
.IP \[bu] 2
\f[I]B\f[R] - toggles
.IP \[bu] 2
\f[I]ctrl-j\f[R]/\f[I]ctrl-k\f[R] - move up and down
.IP \[bu] 2
\f[I]ctrl-l/o\f[R] - opens mailbox
.PP
\f[B]input field/command line\f[R]
.IP \[bu] 2
\f[I]ctrl-u\f[R] clears the line
.IP \[bu] 2
\f[I]ctrl-a\f[R], \f[I]ctrl-e\f[R] go to beginning or end
.IP \[bu] 2
\f[I]ctrl-g\f[R] aborts
.SH DETAILS
.PP
\f[B]Encoding/Language\f[R]
.RS
.PP
\f[I]isync\f[R] is not fully UTF-8 compatible.
\f[B]mw\f[R] assumes english mailbox names.
Set your email language to English on your mail server.
.RE
.PP
\f[B]Mail location\f[R]
.RS
.PP
Mail is downloaded to a folders named after your emails in
\f[I]$MAILDIR\f[R].
\f[I]$MAILDIR\f[R] defaults to \f[I]$HOME/mail/\f[R].
Neither \f[B]mw remove\f[R] nor \f[B]mw purge\f[R] will delete
downloaded mail.
.RE
.PP
\f[B]Gmail accounts\f[R]
.RS
.PP
For Gmail allow less-secure
applications (https://support.google.com/accounts/answer/6010255) Do
this before running mailwizard.
.PP
Gmail uses labels instead of folders.
To avoid local message duplication, remove labels on the Gmail web
interface (https://mail.google.com/mail/u/0/#settings/labels) or hide
them from IMAP and remove the according local folders.
To keep a (local) folder from being synced one must exclude it in
\f[I]mbsyncrc\f[R].
\f[B]mw\f[R] generates this default:
.IP
.nf
\f[C]
Patterns * !\[dq]_/*\[dq] !\[dq][Gmail]\[dq] !\[dq][Gmail]/All Mail\[dq]
\f[R]
.fi
.RE
.PP
\f[B]Protonmail accounts\f[R]
.RS
.PP
Protonmail users must use the Protonmail
Bridge (https://protonmail.com/bridge/) to access their IMAP and SMTP
servers.
Do this before running mailwizard.
.RE
.SH FILES
.TP
\f[I]/user/bin/mw\f[R]
The main script to manage and sync emails.
.TP
\f[I]/user/bin/mwimage\f[R], \f[I]/user/bin/mwopen\f[R]
Used by the mailcap file that comes with mailwizard.
.TP
\f[I]/usr/share/mailwizard/mailwizard.muttrc\f[R]
Default mutt settings.
.TP
\f[I]/usr/share/mailwizard/mailcap\f[R]
Default mailcap file.
.TP
\f[I]/usr/share/mailwizard/domains.csv\f[R]
Email server database.
.SH BUGS
.PP
GitHub Issues (https://github.com/rpuntaie/mailwizard/issues)
.SH AUTHORS
.TP
\f[I]Luke Smith\f[R] <<[email protected]>>
Original author, started in 2018.
See Github (https://github.com/lukesmithxyz/mutt-wizard),
Gitlab (https://gitlab.com/lukesmithxyz/mutt-wizard)
.TP
\f[I]Roland Puntaier\f[R] <<[email protected]>>
Bugfixes, Improvements in 2019.
Too many changes for Luke to accept the PR.
Credit to Luke for his initiative.
New name: mailwizard.
See GitHub (https://github.com/rpuntaie/mailwizard)
.SH LICENSE
.PP
GPLv3
.SH SEE ALSO
.PP
\f[B]neomutt\f[R](1), \f[B]neomuttrc\f[R](1), \f[B]mbsync\f[R](1),
\f[B]msmtp\f[R](1), \f[B]getmail\f[R](1), \f[B]notmuch\f[R](1),
\f[B]abook\f[R](1)