Debian下使用让Exim4通过Gmail发邮件
November 25th, 2010 4:23 PM 57 Comments Filed under: 鸡贼 Feed for this Entry
准备工作:
apt-get install -y exim4 apt-get install -y mutt
其实debian一般默认安装是有exim4的,不保准有的精简安装版没有,apt-get一下吧。
配置:
dpkg-reconfigure exim4-config
第一步:布拉布拉布拉,OK
第二步:mail sent by smarthost; received via SMTP or fetchmail ,OK
第三步:System mail name: 输入本机域名:malegebi.com,OK
第四步: Please enter a semicolon-separated list of IP addresses. The Exim SMTP listener daemon will listen on all IP addresses listed here. ,继续OK
第五步: IP-addresses to listen on for incoming SMTP connections: 输入127.0.0.1,继续OK
第六步: Other destinations for which mail is accepted: 留空,继续OK
第七步:Machines to relay mail for: 留空,继续OK
第八步:IP address or host name of the outgoing smarthost: 输入smtp.gmail.com::587,继续OK
第九步:Hide local mail name in outgoing mail? ,选NO
第十步:布拉布拉布拉,OK
第十一步:Keep number of DNS-queries minimal (Dial-on-Demand)?,选NO
第十二步:Delivery method for local mail: 选mbox format in /var/mail/ ,继续OK
第十三步:Split configuration into small files? ,选YES
第十四步:布拉布拉布拉,OK
第十五步: Root and postmaster mail recipient:留空,继续OK
第十六步:exim4这时自动重启。
继续
第十七步:
vim /etc/exim4/passwd.client
加入
*.google.com:你的Gmail邮箱用户名@gmail.com:你的密码
第十八步:
chown root:Debian-exim /etc/exim4/passwd.client
第十九步:
vim /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost
在“remote_smtp_smarthost:”这段最后一个“}”下添加:
port=587
第二十步:
echo 'YOUR-USER-NAME@LocalHost: 你的gmail邮箱用户名@gmail.com' >> /etc/exim4/email-addresses
第二十一步:
update-exim4.conf
搞定!
测试
echo "邮件正文" | mutt -s "标题" [email protected] #改[email protected]为期望接收到邮件的邮箱。
57 Comments
February 8th, 2012 at 04:34 pm
Hello!
cheap stilnox ,
February 3rd, 2012 at 02:05 pm
Hello!
viagra , free cialis , generic viagra ,
February 3rd, 2012 at 03:41 am
Perfect!ription , generic propecia ,
generic viagra , cheap cialis , accutane no presc
February 3rd, 2012 at 03:40 am
Good site,
viagra , cialis online , generic accutane , generic propecia ,
February 2nd, 2012 at 09:41 pm
Hi there!
cheap provigil ,
January 25th, 2012 at 09:38 pm
Hello!
cheap viagra strips , cheap generic valium , meridia , cheap klonopin generic , accutane ,
January 15th, 2012 at 10:06 pm
Hello!
adipex ,
January 11th, 2012 at 09:22 pm
Aloha!
kamasutra intensity condoms , chloroquine , female viagra , ditropan , menosan ,
January 7th, 2012 at 02:20 am
Hello!
phentermine ,
January 6th, 2012 at 10:19 pm
Very nice site! cheap viagra
January 6th, 2012 at 10:18 pm
Hello! dcdedbe interesting dcdedbe site! I'm really like it! Very, very dcdedbe good!
January 7th, 2011 at 05:47 pm
它每隔20分钟会发送一封Cron Daemon标题的邮件
Cron test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp
这个去哪里禁用啊?
好像不是/etc/crontab里面的
January 4th, 2011 at 04:16 pm
搞定了。
January 4th, 2011 at 03:03 pm
apt-get update
January 4th, 2011 at 12:49 pm
535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 x31sm29022506ana.29
2011-01-04 07:34:13 1PZyb6-00049V-6e ** [email protected] R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server after MAIL FROM: SIZE=1501: host gmail-smtp-msa.l.google.com [74.125.157.109]: 530-5.5.1 Authentication Required. Learn more at\n530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 x31sm29022506ana.29
2011-01-04 07:34:13 1PZyb7-00049a-6x
January 4th, 2011 at 12:18 pm
嗯原来是源没更新~
January 4th, 2011 at 11:54 am
need help!
apt-get install -y exim4
Package exim4 is not available, but is referred to by another package.
Leave a comment