fetchmail でメールをサーバへ持ってきて、dovecot(POP3/IMAP) でそのメールを参照できるように設定をしましたが、fetchmailではいくつか自分にとって不都合な面があることが判明したので、dovecotだけ使うことにしようかと考えています。要はメールの整理、検索ができればいいので、別アカウントで取得したメールをIMAPサーバへコピーすればいいという考えです。
以下、設定メモ
1. postfix設定 (必要ないような気がする)
2. dovecot設定
3. fetchmail設定
# system-switch-mail # vi /etc/postfix/main.cf inet_interfaces = localhost home_mailbox = Maildir/
# vi /etc/dovecot.conf protocols = imap default_mail_env = maildir:~/Maildir
メールをとりにいくサーバを pop.domain.org とし、ユーザー名 hiro345、パスワード changeitだとしています。
$ vi ~/.fetchmailrc set logfile "/home/hiro345/.fetchmail.log" set postmaster hiro345 set no bouncemail defaults protocol pop3 keep no mimedecode smtphost localhost poll pop.domain.org protocol pop3 user hiro345 password changeit
# chkconfig --level 345 postfix on # chkconfig --level 345 dovecot on # /etc/init.d/postfix start # /etc/init.d/dovecot start # su - hiro345 $ fetchmail