$ cat /etc/ssmtp/ssmtp.conf # # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. [email protected]
# Where will the mail seem to come from? # 重定向的发件域 #rewriteDomain=demo.com
# The full hostname # 发件的域名 #hostname=demo.com
# 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
下面设置用户别名(否则会出现 501 mail from address must be same as authorization user 错误)
1 2 3 4 5 6 7 8
$ cat /etc/ssmtp/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:[email protected]:smtp.exmail.qq.com:587