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]为期望接收到邮件的邮箱。

TAGS: Debian, Exim4, Gmail

57 Comments

  1. phentermine phentermine Says:

    May 6th, 2012 at 07:46 pm

  2. xanax xanax Says:

    May 5th, 2012 at 04:18 pm

    Sorry but,
    buy xanax online ,

  3. phentermine phentermine Says:

    May 3rd, 2012 at 10:40 pm

    Sorry but,
    cheap phentermine ,

  4. adipex adipex Says:

    May 2nd, 2012 at 02:41 pm

    Perfect!
    buy adipex p ,

  5. cialis cialis Says:

    April 26th, 2012 at 07:36 pm

  6. vimax vimax Says:

    April 23rd, 2012 at 04:22 pm

    Hi there!
    vimax , vigrx ,

  7. cheap_viagra cheap_viagra Says:

    April 20th, 2012 at 03:31 pm

  8. ambien ambien Says:

    April 17th, 2012 at 07:54 pm

  9. sildenafil_online sildenafil_online Says:

    April 6th, 2012 at 12:15 am

  10. xanax xanax Says:

    March 31st, 2012 at 08:37 pm

  11. viagra viagra Says:

    March 29th, 2012 at 10:17 pm

  12. ambien ambien Says:

    March 26th, 2012 at 09:52 pm

    Good site,
    brand ambien ,

  13. Pharmd544 Pharmd544 Says:

    March 23rd, 2012 at 11:10 pm

    Very nice site!

  14. Pharmb554 Pharmb554 Says:

    March 23rd, 2012 at 11:07 pm

    Hello! ebeegbk interesting ebeegbk site! I'm really like it! Very, very ebeegbk good!

  15. Pharmf40 Pharmf40 Says:

    March 22nd, 2012 at 11:53 pm

    Very nice site! cheap cialis http://opeyixa.com/qoaxqo/4.html

  16. Pharmd78 Pharmd78 Says:

    March 22nd, 2012 at 11:52 pm

    Hello! decfgba interesting decfgba site! I'm really like it! Very, very decfgba good!

  17. viagra viagra Says:

    March 19th, 2012 at 04:31 pm

    Hi there!

  18. baycip baycip Says:

    March 18th, 2012 at 05:17 pm

    Hello!

  19. carafate carafate Says:

    March 15th, 2012 at 08:41 pm

    Perfect!

  20. vimax vimax Says:

    March 14th, 2012 at 09:27 pm

    Aloha!

Leave a comment

captcha
请输入验证码