友链
导航
These are the good times in your life,
so put on a smile and it'll be alright
友链
导航
Linux 中 sendmail 的选择很多:
$ sendmail The program 'sendmail' can be found in the following packages: * exim4-daemon-heavy * exim4-daemon-light * postfix * citadel-mta * courier-mta * dma * esmtp-run * lsb-invalid-mta * masqmail * msmtp-mta * nullmailer * qmail-run * sendmail-bin * ssmtp * xmail Try: apt-get install <selected package>
其中一些仅是 MTA, 另一些既是 SMTP server 又是 MTA. 经过一些对比, 目前(2012/10/27):
deb 安装 postfix 时会提示选择服务器类型和设置 mailname.
如果之前安装过 sendmail, 那么安装 postfix 后, 发件时可能产生错误 “postdrop: warning: unable to look up public/pickup: No such file or directory”. It turns out to be sendmail running along with Postfix and creating issues. The fix is to stop/remove sendmail and create the necessary postfix directory and restart the postfix service.
# /etc/init.d/sendmail stop # mkfifo /var/spool/postfix/public/pickup # /etc/init.d/postfix restart
LinuxHostingSupport » Postfix postdrop: unable to look up public/pickup: No such file or directory
# Accounts will inherit settings from this section defaults auth on tls on tls_trust_file /usr/share/ca-certificates/mozilla/Thawte_Premium_Server_CA.crt # A first gmail address account gmail host smtp.gmail.com port 587 from username@gmail.com user username@gmail.com password password tls_trust_file /etc/ssl/certs/ca-certificates.crt # A second gmail address account gmail2 : gmail from username2@gmail.com user username2@gmail.com password password2 # A freemail service account freemail host smtp.freemail.example from joe_smith@freemail.example user joe.smith password secret # A provider's service account provider host smtp.provider.example # Set a default account account default : gmail
客户服务器都需要部署 sendmail, 但默认配置下往往发出的邮件会收不到, 这很可能是因为 sendmail 时用的是 hostname, 如 foo@ubuntu, 被认为是 spam 而拒收造成的.
解决办法就是设置 mailname.
设置分两步: