"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/msmtp.info" between
msmtp-1.8.19.tar.xz and msmtp-1.8.20.tar.xz

About: msmtp is an SMTP client with a sendmail compatible interface. It can be used with Mutt and other mail user agents.

msmtp.info  (msmtp-1.8.19.tar.xz):msmtp.info  (msmtp-1.8.20.tar.xz)
File: msmtp.info, Node: Top, Next: Introduction, Up: (dir) File: msmtp.info, Node: Top, Next: Introduction, Up: (dir)
msmtp msmtp
***** *****
This manual was last updated 4 November 2021 for version 1.8.19 of This manual was last updated 7 November 2021 for version 1.8.20 of
msmtp. msmtp.
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Martin Lambers 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Martin Lambers
Copyright (C) 2011 Scott Shumate Copyright (C) 2011 Scott Shumate
Copying and distribution of this file, with or without Copying and distribution of this file, with or without
modification, are permitted in any medium without royalty provided modification, are permitted in any medium without royalty provided
the copyright notice and this notice are preserved. These files the copyright notice and this notice are preserved. These files
are offered as-is, without any warranty. are offered as-is, without any warranty.
skipping to change at line 298 skipping to change at line 298
‘$LOGNAME’, or if that fails by the login name of the user ‘$LOGNAME’, or if that fails by the login name of the user
running msmtp. running msmtp.
• ‘%H’ will be replaced by ‘$HOSTNAME’, or if that fails by the • ‘%H’ will be replaced by ‘$HOSTNAME’, or if that fails by the
host name of the system. host name of the system.
• ‘%C’ will be replaced by the canonical name of ‘%H’. • ‘%C’ will be replaced by the canonical name of ‘%H’.
• ‘%M’ will be replaced by the contents of ‘/etc/mailname’ • ‘%M’ will be replaced by the contents of ‘/etc/mailname’
(potentially a different directory is used depending on the (potentially a different directory is used depending on the
build configuration; see the output of ‘msmtp --version’ and build configuration; see the output of ‘msmtp --version’ and
look for the location of the system configuration file). look for the location of the system configuration file).
Note that the obsolete ‘auto_from’ command replaces this Note that the obsolete ‘auto_from’ command replaces this
envelope-from address. *Note Envelope-from address::. envelope-from address.
To enforce the use of this envelope-from address and ignore the
‘-f’ / ‘--from’ option, see *note allow_from_override::.
*Note Envelope-from address::.
Furthermore, the envelope-from address may be a wildcard pattern as Furthermore, the envelope-from address may be a wildcard pattern as
used for file name matching in the shell. This is the case if it used for file name matching in the shell. This is the case if it
contains one of the characters ‘?’, ‘*’ or ‘[’. This allows a contains one of the characters ‘?’, ‘*’ or ‘[’. This allows a
variety of envelope-from addresses given with the ‘--from’ option variety of envelope-from addresses given with the ‘--from’ option
to match a single account. to match a single account.
‘allow_from_override (on|off)’
By default, the *note --from:: option overrides the *note from::
command. Set to ‘off’ to disable this.
‘dsn_notify (off|CONDITION)’ ‘dsn_notify (off|CONDITION)’
Set the condition(s) under which the mail system should send DSN Set the condition(s) under which the mail system should send DSN
(Delivery Status Notification) messages. The argument ‘off’ (Delivery Status Notification) messages. The argument ‘off’
disables explicit DSN requests, which means the mail system decides disables explicit DSN requests, which means the mail system decides
when to send DSN messages. This is the default. The CONDITION when to send DSN messages. This is the default. The CONDITION
must be ‘never’, to never request notification, or a comma must be ‘never’, to never request notification, or a comma
separated list (no spaces!) of one or more of the following: separated list (no spaces!) of one or more of the following:
‘failure’, to request notification on transmission failure, ‘failure’, to request notification on transmission failure,
‘delay’, to be notified of message delays, ‘success’, to be ‘delay’, to be notified of message delays, ‘success’, to be
notified of successful transmission. The SMTP server must support notified of successful transmission. The SMTP server must support
skipping to change at line 331 skipping to change at line 337
headers, or ‘full’, to return the full mail. The SMTP server must headers, or ‘full’, to return the full mail. The SMTP server must
support the DSN extension. *Note Delivery Status Notifications::. support the DSN extension. *Note Delivery Status Notifications::.
‘set_from_header [(auto|on|off)]’ ‘set_from_header [(auto|on|off)]’
When to set a From header: ‘auto’ adds a From header if the mail When to set a From header: ‘auto’ adds a From header if the mail
does not have one (this is the default), ‘on\’ always sets a From does not have one (this is the default), ‘on\’ always sets a From
header and overrides any existing one, and ‘off’ never sets a From header and overrides any existing one, and ‘off’ never sets a From
header. header.
If the mail server rejects the mail because its From header does If the mail server rejects the mail because its From header does
not match the envelope from address (a common anti-spam measure), not match the envelope from address (a common anti-spam measure),
then you might want to set this option to ‘on’. then you might want to set this option to ‘on’.
The From header is created based on the envelope-from address.
Disable *note allow_from_override:: to prevent programs from
setting their own envelope-from address.
For compatibility with older versions, ‘add_missing_from_header For compatibility with older versions, ‘add_missing_from_header
[(on|off)]’ is still supported and corresponds to the ‘auto’ and [(on|off)]’ is still supported and corresponds to the ‘auto’ and
‘off’ settings. ‘off’ settings.
*Note Header handling::. *Note Header handling::.
‘set_date_header [(auto|off)]’ ‘set_date_header [(auto|off)]’
When to set a Date header: ‘auto’ adds a Date header if the mail When to set a Date header: ‘auto’ adds a Date header if the mail
does not have one (this is the default), and ‘off’ never sets a does not have one (this is the default), and ‘off’ never sets a
Date header. Date header.
For compatibility with older versions, ‘add_missing_date_header For compatibility with older versions, ‘add_missing_date_header
[(on|off)]’ is still supported and corresponds to the ‘auto’ and [(on|off)]’ is still supported and corresponds to the ‘auto’ and
skipping to change at line 536 skipping to change at line 545
‘--tls-min-dh-prime-bits=[BITS]’ ‘--tls-min-dh-prime-bits=[BITS]’
Deprecated, use ‘--tls-priorities’ instead. Set or unset minimum Deprecated, use ‘--tls-priorities’ instead. Set or unset minimum
bit size of the Diffie-Hellman (DH) prime. *Note bit size of the Diffie-Hellman (DH) prime. *Note
tls_min_dh_prime_bits::. tls_min_dh_prime_bits::.
3.2.4 Options specific to sendmail mode 3.2.4 Options specific to sendmail mode
--------------------------------------- ---------------------------------------
‘-f ADDRESS’ ‘-f ADDRESS’
‘--from=ADDRESS’ ‘--from=ADDRESS’
Set the envelope-from address. *Note from::. Set the envelope-from address. See *note from:: and *note
allow_from_override::.
If no account was chosen yet (with ‘--account’ or ‘--host’), this If no account was chosen yet (with ‘--account’ or ‘--host’), this
option will choose the first account that has the given option will choose the first account that has the given
envelope-from address (set with the ‘from’ command). If no such envelope-from address (set with the ‘from’ command). If no such
account is found, "default" is used. *Note Choosing an account::. account is found, "default" is used. *Note Choosing an account::.
See the ‘from’ command for substitution patterns supported in
ADDRESS.
‘-N (off|CONDITION)’ ‘-N (off|CONDITION)’
‘--dsn-notify=(off|CONDITION)’ ‘--dsn-notify=(off|CONDITION)’
Set or unset DSN notification conditions. *Note dsn_notify::. Set or unset DSN notification conditions. *Note dsn_notify::.
‘-R (off|AMOUNT)’ ‘-R (off|AMOUNT)’
‘--dsn-return=(off|AMOUNT)’ ‘--dsn-return=(off|AMOUNT)’
Set or unset the DSN notification amount. *Note dsn_return::. Set or unset the DSN notification amount. *Note dsn_return::.
Note that ‘hdrs’ is accepted as an alias for ‘headers’ to be Note that ‘hdrs’ is accepted as an alias for ‘headers’ to be
compatible with sendmail. compatible with sendmail.
‘--set-from-header[=(auto|on|off)]’ ‘--set-from-header[=(auto|on|off)]’
Set From header handling. *Note set_from_header::. Set From header handling. *Note set_from_header::.
skipping to change at line 885 skipping to change at line 893
7.1 Envelope-from address 7.1 Envelope-from address
========================= =========================
The SMTP server expects a sender mail address for each mail. This is The SMTP server expects a sender mail address for each mail. This is
the envelope-from address. It is independent of the From header the envelope-from address. It is independent of the From header
(because it is part of the mail _envelope_, not of the mail itself), but (because it is part of the mail _envelope_, not of the mail itself), but
in most cases both addresses are the same. in most cases both addresses are the same.
Envelope-from addresses are set with the *note from:: command or Envelope-from addresses are set with the *note from:: command or
*note --from:: option. *note --from:: option. The latter can be disabled with the *note
allow_from_override:: command.
File: msmtp.info, Node: Logging, Next: Header handling, Prev: Envelope-from a ddress, Up: Sendmail mode File: msmtp.info, Node: Logging, Next: Header handling, Prev: Envelope-from a ddress, Up: Sendmail mode
7.2 Logging 7.2 Logging
=========== ===========
When logging is enabled, msmtp will generate one log line for each mail When logging is enabled, msmtp will generate one log line for each mail
it tries to send. it tries to send.
The line will include the following information: The line will include the following information:
skipping to change at line 1273 skipping to change at line 1282
Print help. Print help.
‘--inetd’ ‘--inetd’
Start single SMTP session on stdin/stdout Start single SMTP session on stdin/stdout
‘--interface=IP’ ‘--interface=IP’
Listen on the given IPv6 or IPv4 address instead of 127.0.0.1 Listen on the given IPv6 or IPv4 address instead of 127.0.0.1
‘--port=NUMBER’ ‘--port=NUMBER’
Listen on the given port number instead of 25 Listen on the given port number instead of 25
‘--log=NONE|SYSLOG|FILENAME’ ‘--log=NONE|SYSLOG|FILENAME’
Set logging: none (default), syslog, or logging to the given file. Set logging: none (default), syslog, or logging to the given file.
‘--command=CMD’ ‘--command=CMD’
Pipe mails to CMD instead of msmtp Make sure to end this command Pipe mails to CMD instead of msmtp. Make sure to end this command
with ‘--’ to separate options from arguments. with ‘--’ to separate options from arguments.
‘--auth=USER[,PASSWORDEVAL]’ ‘--auth=USER[,PASSWORDEVAL]’
Require authentication with this user name. The password will be Require authentication with this user name. The password will be
retrieved from the given PASSWORDEVAL command (this works just like retrieved from the given PASSWORDEVAL command (this works just like
*note passwordeval:: in msmtp) or, if none is given, from the key *note passwordeval:: in msmtp) or, if none is given, from the key
ring or, if that fails, from a prompt. ring or, if that fails, from a prompt.
* Menu: * Menu:
* Example using msmtpd as a system service:: * Example using msmtpd as a system service::
skipping to change at line 1299 skipping to change at line 1308
============================================== ==============================================
Only use a local interface to listen on. Run msmtpd with correct user Only use a local interface to listen on. Run msmtpd with correct user
rights and permissions (e.g. use ‘CAP_NET_BIND_SERVICE’ to bind to port rights and permissions (e.g. use ‘CAP_NET_BIND_SERVICE’ to bind to port
25 instead of running as root, or use systemd with inetd service 25 instead of running as root, or use systemd with inetd service
capabilities). Be aware that the pipe command will be run as the same capabilities). Be aware that the pipe command will be run as the same
user that msmtpd runs as. Enable logging to syslog with ‘--log=syslog’. user that msmtpd runs as. Enable logging to syslog with ‘--log=syslog’.
Example for managing msmtpd with ‘start-stop-daemon’: Example for managing msmtpd with ‘start-stop-daemon’:
# start msmtpd # start msmtpd
start-stop-daemon --start --pidfile /var/run/msmtpd.pid --make-pidfile --ch uid msmtpd --background --exec /usr/local/bin/msmtpd -- --command '/usr/local/bi n/msmtp -f %F' start-stop-daemon --start --pidfile /var/run/msmtpd.pid --make-pidfile --ch uid msmtpd --background --exec /usr/local/bin/msmtpd -- --command '/usr/local/bi n/msmtp -f %F --'
# stop msmtpd # stop msmtpd
start-stop-daemon --stop --pidfile /var/run/msmtpd.pid --remove-pidfile -- quiet --signal TERM start-stop-daemon --stop --pidfile /var/run/msmtpd.pid --remove-pidfile -- quiet --signal TERM
File: msmtp.info, Node: Example using msmtpd to handle outgoing mail for an SMT P-based mail client, Prev: Example using msmtpd as a system service, Up: Minim al SMTP server (msmtpd) File: msmtp.info, Node: Example using msmtpd to handle outgoing mail for an SMT P-based mail client, Prev: Example using msmtpd as a system service, Up: Minim al SMTP server (msmtpd)
11.2 Example: using msmtpd to handle outgoing mail for an SMTP-based mail client 11.2 Example: using msmtpd to handle outgoing mail for an SMTP-based mail client
================================================================================ ================================================================================
Some mail clients cannot send outgoing mail with a program like msmtp Some mail clients cannot send outgoing mail with a program like msmtp
and instead insist on using an SMTP server. You can configure msmtpd to and instead insist on using an SMTP server. You can configure msmtpd to
skipping to change at line 1333 skipping to change at line 1342
Let’s use the user name MSMTPD-USER for this purpose. You have two Let’s use the user name MSMTPD-USER for this purpose. You have two
options to manage the password: options to manage the password:
1. Store the password in your key ring, e.g. with 1. Store the password in your key ring, e.g. with
secret-tool store --label=msmtpd host localhost service smtp user msmt pd-user secret-tool store --label=msmtpd host localhost service smtp user msmt pd-user
In this case, use the msmtpd option ‘--auth=msmtpd-user’. In this case, use the msmtpd option ‘--auth=msmtpd-user’.
2. Store the password in an encrypted file and use the passwordeval 2. Store the password in an encrypted file and use the passwordeval
mechanism. Example for gpg: mechanism. Example for gpg:
msmtpd ... --auth=msmtpd-user,'gpg -q -d ~/.msmtpd-password.gpg' msmtpd ... --auth=msmtpd-user,'gpg -q -d ~/.msmtpd-password.gpg'
The complete command then is (using the keyring): The complete command then is (using the keyring):
msmtpd --port=2500 --auth=msmtpd-user --command='/path/to/your/msmtp -f %F' msmtpd --port=2500 --auth=msmtpd-user --command='/path/to/your/msmtp -f %F --'
The mail client software must then be configured to use ‘localhost’ The mail client software must then be configured to use ‘localhost’
at port ‘2500’ for outgoing mail via SMTP, and to use authentication at port ‘2500’ for outgoing mail via SMTP, and to use authentication
with user ‘msmtpd-user’ and the password you chose. The mail client with user ‘msmtpd-user’ and the password you chose. The mail client
will probably complain that the SMTP server does not support TLS, but in will probably complain that the SMTP server does not support TLS, but in
this special case that is ok since all communication between your mail this special case that is ok since all communication between your mail
client and msmtpd will stay on the local machine. client and msmtpd will stay on the local machine.
This setup also works with multiple mail accounts. Msmtp will pick This setup also works with multiple mail accounts. Msmtp will pick
the correct one based on the envelope-from address given to it via ‘-f the correct one based on the envelope-from address given to it via ‘-f
 End of changes. 10 change blocks. 
9 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)