會這樣用都是我的爛 ISP 不理會我的 DNS 反解設定要求, 所以我在家用自己的 SMTP 寄信的話就都會被人家拒收(大概這 ISP 的用戶寄送太多廣告信已經惡名昭彰了), 只好求助於 ISP 提供的 SMTP, 但該 ISP 的 SMTP 又只允許你一天寄送 100 封(真機車), 怎麼辦.....
原本以為無解, 確發現他們有另外一台 SMTP 是允許你無限制寄送, 但是得要使用你的 ADSL 帳號做認證才能送信
好吧, 我只好開始在我的 postfix 上動動手腳了
我使用的是 Debian Sid, 若您發現在 woody 也可以的話請告訴在下 :-)
||/ Name Version Description
+++-==============-==============-============================================
ii postfix-tls 2.0.11-1 TLS and SASL support for Postfix
ii libsasl2-modul 2.1.12-1 Pluggable Authentication Modules for SASL
ii sasl2-bin 2.1.12-1 Programs for manupulating the SASL users dat
[root]# apt-get install postfix-tls libsasl2-modules sasl2-bin
2. 在 main.cf 中加入:
#SMTP Auth client
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
relayhost = asmtp.giga.net.tw
3. 建立 sasl_passwd
格式如下:
asmtp.giga.net.tw username:password
[root]# postmap sasl_passwd
4. 啟動 saslauthd
首先編輯 /etc/default/saslauthd
將 START=yes 前的 # 拿掉
[root]# /etc/init.d/saslauthd start
5. 重新啟動 postfix
[root]# postfix check
[root]# postfix reload
6. 偵錯
若不能正確工作的話, 得修改 master.cf
smtp unix - - - - - smtp -v
試著在 shell 下寫封信
andrew:~$ mail -v andrew@linux.org.tw
Subject: test
.
Cc:
Null message body; hope that's ok
查看 /var/log/mail.info 裡面該要有這幾行:
Jun 13 06:30:09 mab postfix/smtp[8676]: smtp_sasl_authenticate: asmtp.giga.net.tw[203.133.1.115]: SASL mechanisms LOGIN PLAIN
Jun 13 06:30:09 mab postfix/smtp[8676]: > asmtp.giga.net.tw[203.133.1.115]: AUTH LOGIN
Jun 13 06:30:09 mab postfix/smtp[8676]: < asmtp.giga.net.tw[203.133.1.115]: 235 Authentication successful
Jun 13 06:30:10 mab postfix/smtp[8676]: F13A54A623: to=<andrew@linux.org.tw>,
relay=asmtp.giga.net.tw[203.133.1.115], delay=1, status=sent (250 Ok: queued as E83A75D2EC)
若出現的是 "no mechanism available" 請再檢查一次 /etc/postfix/sasl_passwd 是否設定正確
Posted by Andrew at 2003年06月13日 06:46 | TrackBack真巧我也是這家ISP的使用者呢~
非常常有參考價值,謝謝囉
Besides smtp server, you can try to use web proxy to delivery your email. To delivery email through proxy, you should connect to proxy server and invoke 'connect' command on proxy server to connect to destination. After that, all you have to do is following smtp protocol to inject a email into target server.
4675 ok you can play online poker at this address : http://www.play-online-poker.greatnow.com
Posted by: online poker at 2004年08月11日 11:09