Tag Archives: sendmail
IN:Linux Tags: dovecot, sendmail Comments:2首先安装必要的软件:sendmail,dovecot
sendmail只支持SMTP发信,dovecot可以支持POP3,IMAP等。
把自己的机器名改为一个你想使用的域名,例如coco.com(vi /etc/sysconfig/network)。配置sendmail,修改以/etc/mail/sendmail.mc下一行:
-O DaemonPortOptions=Port=smtp,Addr=127.0.0.1 , Name=MTA
+O DaemonPortOptions=Port=smtp,Addr=192.168.1.112 , Name=MTA
同时修改/etc/mail/access,添加:
Connect:192.168.1 RELAY
编辑/etc/mail/local-host-names文件,添加你想在内部使用的一个域名,如:
coco.com
这样局域网内的用户就可以使用你的SMTP了,别人在发邮件时在SMTP服务器地址中填写你的IP地址,或者域名(需要改更hosts中coco.com的指向)。帐户就直接使用Linux系统的用户,因为在一个公司使用,所以安全问题就不需要考虑了。
安装好后先测试sendmail,可以使用 mail -s ‘your subject’ somebody@coco.com命令来发邮件。也可以使用claws-mail等客户端来发邮件。
dovecot安装好后也很简单,启动后就可以使用POP3收邮件了。
IN:互联网 Tags: gmail, sendmail Comments:1今天配置一个Bug跟踪的工具,使用Sendmail发邮件时一直出错,先没仔细看,后来仔细看了下,在/var/log/maillog里面有出错提示:
451 DT:SPM mx4, 7lcQrLDL7iJgl6dJktVcJQ–.7531S2, please try again 1235720034 http://mail.163.com/help/help_spam_16.htm?ip=1038939298&hostid=mx4&time=1235720034
在上面的链接中会有详细的提示,这个错误451:
发信人短期内发送了大量信件,超过了网易的限制,该发件人被临时禁止发信。请检查是否有用户发送病毒或者垃圾邮件,并降低该用户发信频率。
郁闷啊,我才手动连着发了几封而已。还有不少地方需要注意。
还有如果直接使用sendmail向gmail发邮件会提示:
http://mail.google.cn/support/bin/answer.py?hl=en&answer=10336
‘The IP you’re using to send email is not authorized…’
In order to prevent spam, Gmail refuses mail when the sending IP address does not match the sending domain. To send mail from your server to Gmail, we suggest using the SMTP relay provided by your ISP. Please note that we are unable to whitelist IP addresses or otherwise make exceptions at this time.
还是gmail考虑的多些,gmail的垃圾邮件过滤确实做的也不错。