Linux中的邮件程序很多。pine, mutt是著名的邮件客户端程序,postfix, sendmail是邮件代理。但是postfix, sendmail都太大,使用起来要看大堆的文档,才能用得上。

这里要推荐的是pine + msmtp的组合。

msmtp是SMTP客户端,安装之后,在home目录中建立.msmtprc配置文件, 下面是一个例子:

# Set default values for all following accounts.
defaults
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log

# A freemail service
account freemail
host smtp.freemail.example
from [email]joe_smith@freemail.exam[/email]ple
auth on
user joe.smith
password secret

# A second mail address at the same freemail service
account freemail2 : freemail
from [email]joey@freemail.exam[/email]ple


这样就配置好了msmtp。然后只要在把pine的sendmail-path改为msmtp的程序即可。如:

sendmail-path = /usr/bin/msmtp -t