summaryrefslogtreecommitdiff
path: root/esmtprc.5
blob: b0bcbd9aa9661c12ee110f002733652dd2eb4229 (plain)
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
.TH ESMTPRC 5

.SH NAME
esmtprc
\-
\fBesmtp\fR configuration file.

.SH DESCRIPTION
A \fBesmtp\fR configuration file consists of several options.  The options
format is:

.nf
    \fIkeyword\fR=\fIvalue\fR
.fi

The equal sign is optional and can be replaced by whitespace.  The \fIvalue\fR
may be enclosed in simple or double quotes, in which case special characters
can be escaped as in normal C strings.

Comments are delimited by the '#' character up to the newline character.

.SH OPTIONS
.TP
\fBhostname\fR
Set SMTP host and service (port).

The format is:

.nf
    host.example.org[:\fIservice\fR]
.fi

With no whitespace surrounding the colon if service is specified. \fIservice\fR
may be a name from /etc/services or a decimal port number.  If not specified
the port defaults to 587.

Note (from \fBlibESMTP\fR documentation): the default port number is set to
587 since this is the port that should be used for mail submission, see RFC
2476.  By choosing this default now, the API does not change behavior
unexpectedly in the future as use of the new standard becomes commonplace.
The host-port notation simplifies things for the application, the user can
type "localhost:smtp" or "localhost:25" where the application
expects a host name.

.TP
\fBusername\fR
Set the username for authentication with the SMTP server.

Do NOT set the username and password in the system configuration file unless
you are the only user of this machine.  \fBEsmtp\fR is not run with suid
privileges therefore the system configuration file must be readable by
everyone.  If your SMTP server requires authentication and you are not the
only user then specify your personal SMTP account details in the user
configuration file.

.TP
\fBpassword\fR
Set the password for authentication with the SMTP server.

.TP
\fBstarttls\fR
Whether to use the StartTLS extension.

It can be one of \fBenabled\fR, \fBdisabled\fR or \fBrequired\fR. It defaults to
\fBdisabled\fR.

.TP
\fBcertificate_passphrase\fR
Set the certificate passphrase for the StartTLS extension.

.TP
\fBhelo\fR
Set the hostname to identify as when sending HELO or EHLO commands.
(This is a per identity option, as it should be the name you are
seen as from the connected host, which may very with host to host
due to NAT or different naming schemes).

.TP
\fBqualifydomain\fR
Make all local addresses to remote ones by adding @ and this
name.

.TP
\fBforce sender\fR
Set a "Sender:" header and ignore those in the message. "%u" will
be replaced with the username. "%%" by "%".

.TP
\fBforce reverse_path\fR
Set the envelope from address. The address given to -f will only
be used as "From:" when the message contains none. "%u" will
be replaced with the username. "%%" by "%".

.TP
\fBmessage_id\fR
Whether to set the Message-ID field of the message before sending.
Normally the receiving MTA sets the Message-ID if missing, so you can turn
this off if your sending host does not have a fully qualified domain name.

Allowed values are either \fBenabled\fR or \fBdisabled\fR. It defaults to
\fBenabled\fR

.TP
\fBpreconnect\fR
Shell command to execute prior to opening an SMTP connection.

This may be useful in conjunction with application-level transports (e.g.
\fBssh\fR with its port-forwarding functionality) to secure the SMTP
connection. \fBEsmtp\fR will wait for the command to exit before
proceeding.  If the command returns a non-zero status, delivery will be
aborted.

.TP
\fBidentity\fR
Define an identity.

An identity is a set of options associated with a given address.  For example:

.nf
    identity = myself@somewhere.com
        hostname = smtp.somewhere.com:25
        username = "myself"
        password = "secret"
.fi

Identities are be selected by the address specified in the \fB\-f\fR flag.  You
can have as many you like.

The options in the global section (up to the first \fBidentity\fR option)
constitute the default identity. If no options in the global section are given
then the first defined identity is taken as the default one.

Note that the default identity settings are not shared by the other identities.
Everything (username, password, etc.) must be specified for every identity even
if they don't differ from the default identity.

.TP
\fBmda\fR
Set the Mail Delivery Agent (MDA).

\fBEsmtp\fR relies upon a MDA for local mail delivery, i.e., addresses without
a '@' character.  A non-zero error status tells \fBesmtp\fR that delivery
failed.

The local delivery addresses will be inserted into the MDA command wherever you
place a %T.  The mail message's \fBFrom\fR address will be inserted where you
place an %F.

Some common MDAs are "/usr/bin/procmail -d %T", "/usr/bin/deliver" and
"/usr/lib/mail.local %T".

.SH SEE ALSO
esmtp(1)

.SH AUTHOR
Jos\['e] Fonseca