"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/msmtp.info" between
msmtp-1.8.17.tar.xz and msmtp-1.8.18.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.17.tar.xz):msmtp.info  (msmtp-1.8.18.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 2 October 2021 for version 1.8.17 of msmtp. This manual was last updated 4 October 2021 for version 1.8.18 of 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 1229 skipping to change at line 1229
# Send everything else to admin # Send everything else to admin
default: admin@domain.example default: admin@domain.example
File: msmtp.info, Node: Minimal SMTP server (msmtpd), Prev: Examples, Up: Top File: msmtp.info, Node: Minimal SMTP server (msmtpd), Prev: Examples, Up: Top
11 Minimal SMTP server (msmtpd) 11 Minimal SMTP server (msmtpd)
******************************* *******************************
Msmtpd is a minimal SMTP server that pipes mails to msmtp (or some other Msmtpd is a minimal SMTP server that pipes mails to msmtp (or some other
program) for delivery. It can be used with system services that expect program) for delivery. It can be used with system services that expect
an SMTP server on the local host (see *note Example: using msmtpd as a an SMTP server on the local host (see *note Example using msmtpd as a
system service::), or it can be used by end users as a way to handle system service::), or it can be used by end users as a way to handle
outgoing mail via msmtp with mail clients that insist on using SMTP (see outgoing mail via msmtp with mail clients that insist on using SMTP (see
*note Example: using msmtpd to handle outgoing mail for an SMTP-based *note Example using msmtpd to handle outgoing mail for an SMTP-based
mail client::). mail client::).
Msmtpd listens on 127.0.0.1 port 25 by default, but can also run Msmtpd listens on 127.0.0.1 port 25 by default, but can also run
without its own network sockets in inetd mode, where it handles a single without its own network sockets in inetd mode, where it handles a single
SMTP session on standard input / output. SMTP session on standard input / output.
In the string that defines the command that msmtpd pipes each mail In the string that defines the command that msmtpd pipes each mail
to, the first occurrence of ‘%F’ will be replaced with the envelope from to, the first occurrence of ‘%F’ will be replaced with the envelope from
address. Furthermore, all recipients of the mail will be appended as address. Furthermore, all recipients of the mail will be appended as
arguments. The command must not write to standard output, as that would arguments. The command must not write to standard output, as that would
skipping to change at line 1281 skipping to change at line 1281
‘--command=CMD’ ‘--command=CMD’
Pipe mails to CMD instead of msmtp Pipe mails to CMD instead of msmtp
‘--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::
* Example: using msmtpd to handle outgoing mail for an SMTP-based mail client:: * Example using msmtpd to handle outgoing mail for an SMTP-based mail client::
File: msmtp.info, Node: Example using msmtpd as a system service, Next: Exampl
e using msmtpd to handle outgoing mail for an SMTP-based mail client, Up: Minim
al SMTP server (msmtpd)
11.1 Example: using msmtpd as a system service
==============================================
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
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
user that msmtpd runs as. Enable logging to syslog with ‘--log=syslog’.
Example for managing msmtpd with ‘start-stop-daemon’:
# 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'
# stop msmtpd
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)
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
and instead insist on using an SMTP server. You can configure msmtpd to
be that SMTP server and hand your outgoing mail over to msmtp.
(Similarly, some mail clients cannot get incoming mail from a local
mailbox and insist on using a POP3 or IMAP server. You can configure
mpopd to be that POP3 server and serve incoming mail from a local
mailbox. See the corresponding section in the mpop manual
(https://marlam.de/mpop/mpop.html#Example_003a-using-mpopd-to-handle-incoming-ma
il-for-a-POP3_002dbased-mail-client).)
For this purpose, msmtpd should listen on an unprivileged port, e.g.
2500. Furthermore, msmtpd should require authentication because
otherwise anyone connecting to it can send mail using your account, even
if it’s just other users or processes on your local machine.
Let’s use the user name MSMTPD-USER for this purpose. You have two
options to manage the password:
1. Store the password in your key ring, e.g. with
secret-tool store --label=msmtpd host localhost service smtp user msmt
pd-user
In this case, use the msmtpd option ‘--auth=msmtpd-user’.
2. Store the password in an encrypted file and use the passwordeval
mechanism. Example for gpg:
msmtpd ... --auth=msmtpd-user,'gpg -q -d ~/.msmtpd-password.gpg'
The complete command then is (using the keyring):
msmtpd --port=2500 --auth=msmtpd-user --command='/path/to/your/msmtp -f %F'
The mail client software must then be configured to use ‘localhost’
at port ‘2500’ for outgoing mail via SMTP, and to use authentication
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
this special case that is ok since all communication between your mail
client and msmtpd will stay on the local machine.
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
%F’. You do not need multiple instances of msmtpd for this purpose, and
therefore you need only one SMTP server in your mail client
configuration.
 End of changes. 4 change blocks. 
3 lines changed or deleted 3 lines changed or added

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