-
Notifications
You must be signed in to change notification settings - Fork 22
/
meli.conf.5
2286 lines (2277 loc) · 49.3 KB
/
meli.conf.5
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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" meli - meli.conf.5
.\"
.\" Copyright 2017-2019 Manos Pitsidianakis
.\"
.\" This file is part of meli.
.\"
.\" meli is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" meli is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with meli. If not, see <http://www.gnu.org/licenses/>.
.\"
.de HorizontalRule
.\"\l'\n(.l\(ru1.25'
.sp
..
.de LiteralStringValue
.Sm
.Po Qo
.Em Li \\$1
.Qc Pc
.Sm
..
.de LiteralStringValueRenders
.LiteralStringValue \\$1
.shift 1
.Bo
.Sm
Rendered as:
.Li r##
.Qo
\\$1
.Qc
.Li ##
.Bc
.Sm
..
.\".Dd November 11, 2022
.Dd May 20, 2024
.Dt MELI.CONF 5
.Os
.Sh NAME
.Nm meli.conf
.Nd configuration file for the
.Xr meli 1
terminal e-mail client
.\"
.\"
.\"
.\"
.\"
.Sh SYNOPSIS
.Pa $XDG_CONFIG_HOME/meli/config.toml
.\"
.\"
.\"
.\"
.\"
.Sh DESCRIPTION
Configuration for
.Sy meli
is written in
.Tn TOML
which has a few things to consider (quoting the specification):
.sp
.Bl -dash -compact
.It
.Tn TOML
is case sensitive.
.It
A
.Tn TOML
file must be a valid
.Tn UTF-8
encoded Unicode document.
.It
White-space means
.Sy tab
.Pq Li 0x09
or
.Sy space
.Pq Li 0x20 Ns
\&.
.It
Newline means
.Sy LF
.Pq Li 0x0A
or
.Sy CRLF
.Pq Li 0x0D 0x0A Ns
\&.
.El
.sp
Refer to
.Tn TOML
documentation for valid
.Tn TOML
syntax.
.sp
Though not part of
.Tn TOML
syntax,
.Nm
can have nested configuration files by using the following
.Xr m4 1
include macro:
.sp
.Dl include(\&"/path/to/file\&")
.\"
.\"
.\"
.\"
.\"
.Sh SECTIONS
The top level sections of the configuration are:
.Bl -dash -compact
.It
accounts
.It
shortcuts
.It
notifications
.It
pager
.It
listing
.It
composing
.It
pgp
.It
terminal
.It
log
.El
.\"
.\"
.\"
.\"
.\"
.Sh EXAMPLES
An example configuration:
.\"
.\"
.\"
.Bd -literal
# Setting up a Maildir account
[accounts.account-name]
root_mailbox = "/path/to/root/folder"
format = "Maildir"
listing.index_style = "Compact"
identity="email@example.com"
subscribed_mailboxes = ["folder", "folder/Sent"] # or [ "*", ] for all mailboxes
display_name = "Name"
# Set mailbox-specific settings
[accounts.account-name.mailboxes]
"INBOX" = { alias="Inbox" } #inline table
"drafts" = { alias="Drafts" } #inline table
[accounts.account-name.mailboxes."foobar-devel"] # or a regular table
ignore = true # don't show notifications for this mailbox
# Setting up an mbox account
[accounts.mbox]
root_mailbox = "/var/mail/username"
format = "mbox"
listing.index_style = "Compact"
identity="username@hostname.local"
composing.send_mail = { hostname = "localhost", port = 25, auth = { type = "none" }, security = { type = "none" } }
[pager]
filter = "COLUMNS=72 /usr/local/bin/pygmentize -l email"
html_filter = "w3m -I utf-8 -T text/html"
[notifications]
script = "notify-send"
[composing]
# required for sending e-mail
send_mail = 'msmtp --read-recipients --read-envelope-from'
#send_mail = { hostname = "smtp.example.com", port = 587, auth = { type = "auto", username = "user", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/user.gpg" } }, security = { type = "STARTTLS" } }
editor_command = 'vim +/^$'
[shortcuts]
[shortcuts.composing]
edit = 'e'
[shortcuts.listing]
new_mail = 'm'
set_seen = 'n'
[terminal]
theme = "light"
.Ed
.\"
.\"
.\"
.sp
Available options are listed below.
.\"
.\"
.\"
.\"
.\"
.Sh ACCOUNTS
.Ss Account configuration settings
Default values are shown in parentheses.
.Bl -tag -width 36n
.It Ic root_mailbox Ar String
The backend-specific path of the root_mailbox, usually
.Sy INBOX Ns
\&.
.It Ic default_mailbox Ar String
.Pq Em optional
The mailbox that is the default to open or view for this account.
Must be a valid mailbox path.
If not specified, the default will be the root mailbox.
.It Ic format Ar String Op maildir mbox imap notmuch jmap
The format of the mail backend.
.It Ic subscribed_mailboxes Ar [String,]
An array of mailbox paths to display in the UI.
Paths are relative to the root mailbox (e.g.
.Sy INBOX/Sent Ns
, not
.Sy Sent Ns
).
The glob wildcard
.Em \&*
can be used to match every mailbox name and path.
.It Ic identity Ar String
Your e-mail address that is inserted in the
.Li From Ns
:
headers of outgoing mail.
.It Ic extra_identities Ar [String,]
Extra e-mail address identities.
When replying to an e-mail addressed to one of these identities, the
.Li From Ns
:
header will be adjusted to its value instead of the default identity.
.El
.Bl -tag -width 36n
.It Ic display_name Ar String
.Pq Em optional
A name which can be combined with your address:
.Qq Li Name <email@example.com> Ns
\&.
.It Ic read_only Ar boolean
Attempt to not make any changes to this account.
.Pq Em false
.It Ic manual_refresh Ar boolean
.Pq Em optional
If true, do not monitor account for changes
.Po
you can use shortcut
.Li listing.refresh
.Pc Ns
\&.
.Pq Em false
.It Ic refresh_command Ar String
.Pq Em optional
command to execute when manually refreshing
.Po
shortcut
.Li listing.refresh
.Pc
.Pq Em None
.It Ic search_backend Ar String
.Pq Em optional
Choose which search backend to use.
Available options are
.Qq Li none
and
.Qq Li sqlite3 Ns
\&.
.Pq Qq sqlite3
.It Ic vcard_folder Ar String
.Pq Em optional
Folder that contains
.Sy .vcf
files.
They are parsed and imported read-only.
.It Ic mutt_alias_file Ar String
.Pq Em optional
Path of
.Xr mutt 1
compatible alias file in the option
They are parsed and imported read-only.
.It Ic mailboxes Ar mailbox
.Pq Em optional
Configuration for each mailbox.
Its format is described below in
.Sx mailboxes Ns
\&.
.El
.Ss notmuch only
.HorizontalRule
notmuch is supported by loading the dynamic library
.Sy libnotmuch Ns
\&.
If its location is missing from your library paths, you must add it yourself.
Alternatively, you can specify its path by using a setting.
.sp
notmuch mailboxes are virtual, since they are defined by user-given notmuch
queries.
You must explicitly state the mailboxes you want in the
.Ic mailboxes
field and set the
.Ar query
property to each of them.
To create a tree hierarchy with virtual mailboxes, define the
.Ar parent
property to a mailbox as the name of the parent mailbox you have used in your
configuration.
.sp
Account properties:
.Bl -tag -width 36n
.It Ic root_mailbox
points to the directory which contains the
.Pa .notmuch/
subdirectory.
.It Ic library_file_path Ar Path
Use an arbitrary location of
.Sy libnotmuch
by specifying its full filesystem path.
.Pq Em optional
.El
Mailbox properties:
.Bl -tag -width 36n
.It Ic query Ar String
The
.Sy notmuch
query that defines what content this virtual mailbox has.
Refer to
.Xr notmuch-search-terms 7
for
.Sy notmuch Ns
\&'s search syntax.
.It Ic parent Ar String
If you wish to build a mailbox hierarchy, define the name of a parent mailbox
you have used in your configuration.
.Pq Em optional
.El
.sp
Example:
.sp
.\"
.\"
.\"
.Bd -literal
[accounts.notmuch]
format = "notmuch"
#library_file_path = "/opt/homebrew/lib/libnotmuch.5.dylib"
\&...
[accounts.notmuch.mailboxes]
"INBOX" = { query="tag:inbox", subscribe = true }
"Drafts" = { query="tag:draft", subscribe = true }
"Sent" = { query="from:username@example.com from:username2@example.com", subscribe = true }
"Archives" = { query="tag:archived", subscribe = true }
"Archives/2019" = { query="tag:archived date:01-2019..12-2019", parent="Archives", subscribe = true }
.Ed
.\"
.\"
.\"
.Ss IMAP only
.HorizontalRule
.Tn IMAP
specific options are:
.Bl -tag -width 36n
.It Ic server_hostname Ar String
example:
.Qq mail.example.com
.It Ic server_username Ar String
Server username
.It Ic server_password Ar String
Server password
.It Ic server_password_command Ar String
.Pq Em optional
Use instead of
.Ic server_password
.It Ic server_port Ar number
.Pq Em optional
The port to connect to
.Pq Em 143 \" default value
.It Ic use_starttls Ar boolean
.Pq Em optional
If port is
.Li 993
and
.Qq Li use_starttls
is unspecified, it becomes false by default.
.Pq Em true \" default value
.It Ic use_tls Ar boolean
.Pq Em optional
Connect with
.Tn TLS
.Po
or upgrade from plain connection to
.Tn TLS
if
.Tn STARTTLS
is set.
.Pc
.Pq Em true \" default value
.It Ic danger_accept_invalid_certs Ar boolean
.Pq Em optional
Do not validate
.Tn TLS
certificates.
.Pq Em false \" default value
.It Ic use_idle Ar boolean
.Pq Em optional
Use
.Tn IDLE
extension.
.Pq Em true \" default value
.It Ic use_condstore Ar boolean
.Pq Em optional
Use
.Tn CONDSTORE
extension.
.Pq Em true \" default value
.It Ic use_deflate Ar boolean
.Pq Em optional
Use
.Tn COMPRESS=DEFLATE
extension
.Po if built with
.Tn DEFLATE
support
.Pc
.Pq Em true \" default value
.It Ic use_oauth2 Ar boolean
.Pq Em optional
Use
.Tn OAUTH2
authentication.
Can only be used with
.Ic server_password_command
which should return a base64-encoded
.Tn OAUTH2
token ready to be passed to
.Tn IMAP Ns
\&.
For help on setup with
.Tn Gmail Ns
, see
.Tn Gmail
section below.
.Pq Em false \" default value
.It Ic timeout Ar integer
.Pq Em optional
Timeout to use for server connections in seconds.
A timeout of
.Li 0
seconds means there is no timeout.
.Pq Em 16 \" default value
.El
.Ss Gmail
.HorizontalRule
.Tn Gmail
has non-standard
.Tn IMAP
behaviors that need to be worked around.
.Ss Gmail - sending mail
.HorizontalRule
Option
.Ic store_sent_mail
should be disabled since
.Tn Gmail
auto-saves sent mail by its own.
.Ss Gmail OAUTH2
.HorizontalRule
To use
.Tn OAUTH2 Ns
, you must go through a process to register your own private
.Qq application
with
.Tn Google
that can use
.Tn OAUTH2
tokens,
and set the option
.Ic use_oauth2
as
.Ql true
in the account configuration section.
For convenience in the
.Sy meli
repository under the
.Pa contrib/
directory you can find a
.Sy python3
file named
.Li oauth2.py
to generate and request the appropriate data to perform
.Tn OAUTH2
authentication.
.sp
Steps:
.Bl -dash -compact
.It
In
.Tn Google API Ns
s, create a custom OAuth client ID and note down the Client ID and Client
Secret.
You may need to create a consent screen; follow the steps described in the
website.
.It
Run the
.Li oauth2.py
script as follows
.Pq after adjusting binary paths and credentials Ns
:
.sp
.Cm python3 oauth2.py --user=xxx@gmail.com --client_id=1038[...].apps.googleusercontent.com --client_secret=VWFn8LIKAMC-MsjBMhJeOplZ --generate_oauth2_token
and follow the instructions.
Note down the refresh token.
.It
In
.Ic server_password_command
enter a command like this
.Pq after adjusting binary paths and credentials Ns
:
.sp
.Cm TOKEN=$(python3 oauth2.py --user=xxx@gmail.com --quiet --client_id=1038[...].apps.googleusercontent.com --client_secret=VWFn8LIKAMC-MsjBMhJeOplZ --refresh_token=1/Yzm6MRy4q1xi7Dx2DuWXNgT6s37OrP_DW_IoyTum4YA) && python3 oauth2.py --user=xxx@gmail.com --generate_oauth2_string --quiet --access_token=$TOKEN
.It
On startup,
.Sy meli
should evaluate this command which if successful must only return a
.Tn base64 Ns
-encoded token ready to be passed to
.Tn IMAP.
.Pp
Your account section should look like this:
.Bd -literal
[accounts."gmail"]
root_mailbox = '[Gmail]'
format = "imap"
server_hostname='imap.gmail.com'
server_username="username@gmail.com"
use_oauth2 = true
server_password_command = "TOKEN=$(py...th2_string --quiet --access_token=$TOKEN"
server_port="993"
listing.index_style = "Conversations"
identity = "username@gmail.com"
display_name = "Name Name"
subscribed_mailboxes = ["*" ]
composing.store_sent_mail = false
composing.send_mail = { hostname = "smtp.gmail.com", port = 587, auth = { type = "xoauth2", token_command = "...", require_auth = true }, security = { type = "STARTTLS" } }
.Ed
.El
.Ss JMAP only
.HorizontalRule
.Tn JMAP
specific options
.Bl -tag -width 36n
.It Ic server_url Ar String
example:
.Qq http://mail.example.com
.Qq http://mail.example.com:8080
.Qq https://mail.example.com
.It Ic server_username Ar String
Server username
.It Ic server_password Ar String
Server password
.It Ic server_password_command Ar String
.Pq Em optional
Use instead of
.Ic server_password
.It Ic danger_accept_invalid_certs Ar boolean
.Pq Em optional
Do not validate
.Tn TLS
certificates.
.Pq Em false \" default value
.El
.Ss mbox only
.HorizontalRule
.Tn mbox
specific options:
.Bl -tag -width 36n
.It Ic prefer_mbox_type Ar String
.Pq Em optional
Prefer specific
.Tn mbox
format reader for each message.
Default is
.Qq Li mboxcl2
format.
If the preferred format fails, the message is retried with mboxrd and then if
it fails again there is a recover attempt, which discards the invalid message.
.sp
Valid values
.Bl -dash -compact
.It
.Ar auto
.It
.Ar mboxo
.It
.Ar mboxrd
.It
.Ar mboxcl
.It
.Ar mboxcl2
.El
.Pq Em auto \" default value
.El
To set multiple mailboxes, you have to explicitly state the mailboxes you want
in the
.Ic mailboxes
field and set the
.Ar path
property to each of them.
Example:
.\"
.\"
.\"
.Bd -literal
[accounts.mbox]
format = "mbox"
mailboxes."Python mailing list" = { path = "~/.mail/python.mbox", subscribe = true, autoload = true }
.Ed
.\"
.\"
.\"
.Ss NNTP
.HorizontalRule
.Tn NNTP
specific options
.Bl -tag -width 36n
.It Ic server_hostname Ar String
example:
.Qq nntp.example.com
.It Ic server_username Ar String
Server username
.It Ic server_password Ar String
Server password
.It Ic require_auth Ar boolean
.Pq Em optional
require authentication in every case
.Pq Em true \" default value
.It Ic use_tls Ar boolean
.Pq Em optional
Connect with
.Tn TLS Ns
\&.
.Pq Em false \" default value
.It Ic server_port Ar number
.Pq Em optional
The port to connect to
.Pq Em 119 \" default value
.It Ic danger_accept_invalid_certs Ar boolean
.Pq Em optional
Do not validate
.Tn TLS
certificates.
.Pq Em false \" default value
.It Ic store_flags_locally Ar boolean
.Pq Em optional
Store seen status locally in an
.Sy sqlite3
database.
.Pq Em true \" default value
.El
.Pp
You have to explicitly state the groups you want to see in the
.Ic mailboxes
field.
Example:
.\"
.\"
.\"
.Bd -literal
[accounts.sicpm.mailboxes]
"sic.all" = {}
.Ed
.\"
.\"
.\"
.Pp
To submit articles directly to the
.Tn NNTP
server, you must set the special value
.Em server_submission
in the
.Ic send_mail
field.
Example:
.\"
.\"
.\"
.Bd -literal
composing.send_mail = "server_submission"
.Ed
.\"
.\"
.\"
.Ss MAILBOXES
.HorizontalRule
.Bl -tag -width 36n
.It Ic alias Ar String
.Pq Em optional
Show a different name for this mailbox in the
.Tn UI Ns
\&.
.It Ic autoload Ar boolean
.Pq Em optional
Load this mailbox on startup
.Pq Em true \" default value
.It Ic collapsed Ar boolean
.Pq Em optional
Collapse this mailbox subtree in menu.
.Pq Em false \" default value
.It Ic subscribe Ar boolean
.Pq Em optional
Watch this mailbox for updates.
.Pq Em true \" default value
.It Ic ignore Ar boolean
.Pq Em optional
Silently insert updates for this mailbox, if any.
.Pq Em false \" default value
.It Ic usage Ar boolean
.Pq Em optional
special usage of this mailbox.
Valid values are:
.Bl -dash -compact
.It
.Ar Normal
.Pq Em default
.It
.Ar Inbox
.It
.Ar Archive
.It
.Ar Drafts
.It
.Ar Flagged
.It
.Ar Junk
.It
.Ar Sent
.It
.Ar Trash
.El
otherwise usage is inferred from the mailbox title.
If for example your Sent folder is not named
.Qq Li Sent Ns
, you must explicitly set it.
.It Ic conf_override Ar boolean
.Pq Em optional
Override global settings for this mailbox.
Available sections to override are
.Em pager, notifications, shortcuts, composing
and the account options
.Em identity Ns
\&.
Example:
.\"
.\"
.\"
.Bd -literal
[accounts."imap.example.com".mailboxes]
"INBOX" = { index_style = "plain" }
"INBOX/Lists/devlist" = { autoload = false, pager = { filter = "pygmentize -l diff -f 256"} }
.Ed
.\"
.\"
.\"
.It Ic sort_order Ar unsigned integer
.Pq Em optional
Override sort order on the sidebar for this mailbox.
Example:
.\"
.\"
.\"
.Bd -literal
[accounts."imap.example.com".mailboxes]
"INBOX" = { index_style = "plain" }
"INBOX/Sent" = { sort_order = 0 }
"INBOX/Drafts" = { sort_order = 1 }
"INBOX/Lists" = { sort_order = 2 }
.Ed
.\"
.\"
.\"
.It Ic encoding Ar String
.Pq Em optional
Override the default
.Tn UTF-8
charset for the mailbox name.
Useful only for
.Tn UTF-7
mailboxes.
.Pq Em "utf7", "utf-7", "utf8", "utf-8" \" default value
.El
.\"
.\"
.\"
.\"
.\"
.Sh COMPOSING
.Ss Composing specific configuration settings
Default values are shown in parentheses.
.Bl -tag -width 36n
.It Ic send_mail Ar String|SmtpServerConf
Command to pipe new mail to
.Po
exit code must be
.Li 0
for success
.Pc
or settings for an
.Tn SMTP
server connection.
See section
.Sx SMTP Connections
for its fields.
.It Ic editor_command Ar String
Command to launch editor.
Can have arguments.
Draft filename is given as the last argument.
If it's missing, the environment variable
.Ev EDITOR
is looked up.
.It Ic embedded_pty Ar boolean
.Pq Em optional
Embedded editor within
.Sy meli Ns
\&.
Editor must be
.Sy xterm
compliant.
.Pq Em false \" default value
.It Ic format_flowed Ar boolean
.Pq Em optional
Set
.Li format=flowed
.Bq RFC3676
in
.Li text/plain
attachments.
.Pq Em true \" default value
.It Ic insert_user_agent Ar boolean
.Pq Em optional
Add
.Sy meli
.Li User-Agent
header in new drafts.
.Pq Em true \" default value
.It Ic default_header_values Ar hash table String[String]
.Pq Em optional
Default header values used when creating a new draft.
.Pq Em [] \" default value
.It Ic wrap_header_preamble Ar Option<(String, String)>
.Pq Em optional
Wrap header pre-ample when editing a draft in an editor.
This allows you to write non-plain text email without the preamble creating
syntax errors.
They are stripped when you return from the editor.
The values should be a two element array of strings, a prefix and suffix.
This can be useful when for example you're writing Markdown; you can set the
value to
.Em ["<!--",\ "-->"]
which wraps the headers in an
.Tn HTML
comment.
.Pq Em None \" default value
.It Ic store_sent_mail Ar boolean
.Pq Em optional
Store sent mail after successful submission.
This setting is meant to be disabled for non-standard behaviour in
.Tn Gmail Ns
, which auto-saves sent mail on its own.
.Pq Em true \" default value
.It Ic attribution_format_string Ar String
.Pq Em optional
The attribution line appears above the quoted reply text.
The format specifiers for the replied address are:
.Bl -dash -compact
.It
.Li %+f
— the sender's name and email address.
.It
.Li %+n
— the sender's name (or email address, if no name is included).
.It
.Li %+a
— the sender's email address.
.El
The format string is passed to
.Xr strftime 3
with the replied envelope's date.
.Pq Em "On %a, %0e %b %Y %H:%M, %+f wrote:%n" \" default value
.It Ic attribution_use_posix_locale Ar boolean
.Pq Em optional
Whether the
.Xr strftime 3
call for the attribution string uses the
.Tn POSIX
locale instead of the user's active locale.
.Pq Em true \" default value
.It Ic forward_as_attachment Ar boolean or "ask"
.Pq Em optional
Forward emails as attachment? (Alternative is inline).
.Pq Em ask \" default value
.It Ic reply_prefix_list_to_strip Ar [String]
.Pq Em optional
Alternative lists of reply prefixes (etc. ["Re:", "RE:", ...]) to strip.
.Dl Em [Re:, RE:, Fwd:, Fw:, 回复:, 回覆:, SV:, Sv:, VS:, Antw:, Doorst:, VS:, VL:, REF:, TR:, TR:, AW:, WG:, ΑΠ:, Απ:, απ:, ΠΡΘ:, Πρθ:, πρθ:, ΣΧΕΤ:, Σχετ:, σχετ:, ΠΡΘ:, Πρθ:, πρθ:, Vá:, Továbbítás:, R:, I:, RIF:, FS:, BLS:, TRS:, VS:, VB:, RV:, RES:, Res, ENC:, Odp:, PD:, YNT:, İLT:, ATB:, YML:] \" default value
.It Ic reply_prefix Ar String
.Pq Em optional
The prefix to use in reply subjects.
The default prefix is
.Ns Ql Re: Ns
\&.
.Pq Ql Re: \" default value
.Pp
RFC 2822, "Internet Message Format" has this to say on the matter:
.\"
.\"
.\"
.Bd -literal -offset indent -compact
When used in a reply, the field body MAY start with the string "Re: " (from
the Latin "res", in the matter of) followed by the contents of the "Subject:"
field body of the original message.
.Ed
.\"
.\"
.\"
.It Ic custom_compose_hooks Ar [{ name = String, command = String }]
.Pq Em optional
Custom compose-hooks that run shell scripts.
compose-hooks run before submitting an e-mail.
They perform draft validation and/or transformations.
If a custom hook exits with an error status or prints output to stdout and
stderr, it will show up in the UI as a notification.
.sp
Example:
.\"
.\"
.\"
.Bd -literal
[composing]
editor_cmd = '~/.local/bin/vim +/^$'
embed = true
custom_compose_hooks = [ { name ="spellcheck", command="aspell --mode email --dont-suggest --ignore-case list" }]
.Ed
.\"
.\"
.\"
.It Ic disabled_compose_hooks Ar [String]
.Pq Em optional
Disabled compose-hooks.
compose-hooks run before submitting an e-mail.
They perform draft validation and/or transformations.
If a hook encounters an error or warning, it will show up as a notification.
The currently available hooks are:
.Bl -dash -compact
.It
.Ic past-date-warn
— Warn if
.Li Date
header value is far in the past or future.
.It
.Ic important-header-warn
— Warn if important headers
.Po
.Li From Ns
,
.Li Date Ns
,
.Li To Ns
,
.Li Cc Ns
,
.Li Bcc
.Pc
are missing or invalid.
.It
.Ic missing-attachment-warn
— Warn if
.Li Subject Ns
or draft body mention attachments but they are missing.
.It
.Ic empty-draft-warn
— Warn if draft has no subject and no body.
.El
.El
.\"
.\"
.\"
.\"