ubuntuインストール構成ssmtp


メールのみを送信場合、Mail Transfer Agentとしてssmtpを使用することは非常に便利である.
一、取り付け
aptitude install ssmtp mailutils

二、配置
インストール後、2つのファイルを変更する必要があります.
まずファイル/etc/sstp/sstpを変更します.conf、内容は以下の通りです.
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=      
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=  imap     
# Where will the mail seem to come from?
#rewriteDomain=
# The full hostname
hostname=   
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
UseTLS=YES
AuthUser=    
AuthPass=    

ファイル/etc/sstp/revaliasesを変更します.内容は次のとおりです.
# sSMTP aliases
#
# Format:   local_account:outgoing_address:mailhub
#
# Example: root:[email protected]:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:     :  imap     :  
#              :
#root:    :imap.exmail.qq.com:465

三、メールを送る:
echo "aaa" | mail -s "bbb" [email protected]

本文は“阿三哥”のブログから出て、転載をお断りします!