Package: msmtp-mta Version: 1.4.20-1 Severity: wishlist [Feel free to WONTFIX this if it's beyond msmtp's intended scope.]
I want a one-stop way to rewrite the recipient of system mail, i.e. "To: root" becomes "RCPT TO:f...@example.net". I suggest: - add an msmtprc command "local-to f...@example.net", rewrites ALL local recipients to "f...@example.net"; or - add support for /etc/aliases. Rationale follows. * * * My netbooks run msmtp, and it is great for user mail. Because it runs synchronously, when msmtp exits successfully I *know* the message got at least as far as the smarthost. As my new netbook is powerful enough to run cron, I'm interested in delivering system mail to the smarthost (instead of throwing it away). With a normal MTA, I'd do it thusly: echo "root: trentb...@gmail.com" >>/etc/aliases newaliases ...but msmtp ignores /etc/aliases. It *does* work if I stick a mailto=trentb...@gmail.com at the top of each crontab, but that won't cover other stuff (e.g. at jobs), and I'd need to be forever alert for packages creating new tabs in /etc/cron.d/. Just to demonstrate the issue itself: # echo test | msmtp trentb...@gmail.com password for trentb...@gmail.com at smtp.gmail.com: # echo test | msmtp root password for trentb...@gmail.com at smtp.gmail.com: msmtp: recipient address root not accepted by the server msmtp: server message: 553-5.1.2 We weren't able to find the recipient domain. Please check for any msmtp: server message: 553-5.1.2 spelling errors, and make sure you didn't enter any spaces, periods, msmtp: server message: 553 5.1.2 or other punctuation after the recipient's email address. 30sm8942719anp.1 msmtp: could not send mail (account default from /etc/msmtprc) # cat /etc/aliases mailer-daemon: postmaster postmaster: root nobody: root hostmaster: root usenet: root news: root webmaster: root www: root ftp: root abuse: root noc: root security: root root: twb twb: trentb...@gmail.com # cat /etc/msmtprc account default from trentb...@gmail.com tls_trust_file /etc/ssl/certs/ca-certificates.crt host smtp.gmail.com port 587 auth on user trentb...@gmail.com tls on And the same thing via cron: # echo >>/etc/msmtprc password UNPRINTABLE # echo >>/etc/msmtprc syslog on # echo >>/etc/crontab '* * * * * root echo test' # tail -fn0 /var/log/syslog Apr 16 15:57:01 dali /usr/sbin/cron[1360]: (*system*) RELOAD (/etc/crontab) Apr 16 15:58:01 dali /USR/SBIN/CRON[16595]: (root) CMD ( echo test) Apr 16 15:58:05 dali msmtp: host=smtp.gmail.com tls=on auth=on user=trentb...@gmail.com from=trentb...@gmail.com recipients=root smtpstatus=553 smtpmsg='553-5.1.2 We weren?t able to find the recipient domain. Please check for any\n553-5.1.2 spelling errors, and make sure you didn?t enter any spaces, periods,\n553 5.1.2 or other punctuation after the recipient?s email address. n2sm9015844ann.2' errormsg='recipient address root not accepted by the server' exitcode=EX_DATAERR Apr 16 15:58:05 dali /USR/SBIN/CRON[16594]: (root) MAIL (mailed 5 bytes of output but got status 0x0041#012) -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.33-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages msmtp-mta depends on: ii msmtp 1.4.20-1 light SMTP client with support for msmtp-mta recommends no packages. msmtp-mta suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org