ESMTPRC(5) | File Formats Manual | ESMTPRC(5) |
esmtprc - esmtp configuration file.
A esmtp configuration file consists of several options. The options format is:
keyword=value
The equal sign is optional and can be replaced by whitespace. The value 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.
The format is:
host.example.org[:service]
With no whitespace surrounding the colon if service is specified. service may be a name from /etc/services or a decimal port number. If not specified the port defaults to 587.
Note (from libESMTP 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.
Do NOT set the username and password in the system configuration file unless you are the only user of this machine. Esmtp 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.
It can be one of enabled, disabled or required. It defaults to disabled.
Allowed values are either enabled or disabled. It defaults to enabled
This may be useful in conjunction with application-level transports (e.g. ssh with its port-forwarding functionality) to secure the SMTP connection. Esmtp will wait for the command to exit before proceeding. If the command returns a non-zero status, delivery will be aborted.
An identity is a set of options associated with a given address. For example:
identity = myself@somewhere.com
hostname = smtp.somewhere.com:25
username = "myself"
password = "secret"
Identities are be selected by the address specified in the -f flag. You can have as many you like.
The options in the global section (up to the first identity 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.
Esmtp relies upon a MDA for local mail delivery, i.e., addresses without a '@' character. A non-zero error status tells esmtp that delivery failed.
The local delivery addresses will be inserted into the MDA command wherever you place a %T. The mail message's From 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".
When set, any mail from anywhere to anywhere will instead be delivered to the value of force_mda. It will also only be delivered locally, via the mda. This will let you have a very minimal mail set-up, which can ONLY handle local mail.
For example:
mda = "procmail -d %T"
force_mda = "someuser"
José Fonseca