我想设置某种邮件服务器,以将电子邮件从我的gmail帐户发送到另一封电子邮件。我怎样才能做到这一点?
首先,安装sSMTP,因为在这种情况下,后缀过大。是的,这将删除后缀。我们在乎吗?并不真地。
sudo apt-get install ssmtp
/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] #I recommend setting this mailhub=smtp.gmail.com:587 # Where will the mail seem to come from? rewriteDomain= #The full hostname hostname=[some hostname here] UseTLS=YES UseSTARTTLS=YES AuthMethod=LOGIN [email protected] AuthPass=yourpassword # 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 # This is optional if you're going to use revaliases - I didn't FromLineOverride=YES
现在,我们需要设置权限/etc/ssmtp/ssmtp.conf
以帮助(并非万无一失)保护您的纯文本密码。
sudo chown root:nagios /etc/ssmtp/ssmtp.conf
sudo chmod 640 /etc/ssmtp/ssmtp.conf
重新启动nagios,您应该已设置好。
sudo service nagios3 restart
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句