Fetchmail を導入することにより,他の POP サーバーのメールをこちらのメールサーバーに転送することができます。
| # apt-get install fetchmail |
| # エラーメールの送信先を root に指定 set postmaster root # エラーメールを送信者に返さない指定 set nobouncemail # ステータスログファイルの指定 set logfile /var/log/fetchmail.log defaults protocol pop3 # メール受信後にサーバーからメールを削除 flush no mimedecode # 受信メールを渡すサーバーを指定 smtphost mail.shitomi.jp # POPサーバーを指定 poll pop.mail.yahoo.co.jp # 以下,ユーザ情報(アカウント abc や xyz に転送) user "test1-gxfdow" password "test1-passwd" is "abc" here user "test2-gdrdls" password "passwdtest2" is "xyz" here user "test3-dsfalr5w" password "test3password" is "abc" here user "test4-fdsawldrj1" password "test4pass" is "abc" here |
| # chmod 600 /root/.fetchmailrc |
| # touch /var/log/fetchmail.log |
| # fetchmail |
| 0,10,20,30,40,50 * * * * fetchmail -f /root/.fetchmailrc 1> /dev/null 2>&1 |
| # tail -f /var/log/fetchmail.log & |