思うところあって、POP before SMTPを実装しようと、色々と調べてると、「courier-[imap|pop]だと、パッチが必要よ~ん」というのしか見つからない。「そ、ソースからリビルド?」と思っていたところで、apt-cache search pop before smtp
と叩いてみたら、pop-before-smtpつーパッケージを発見。
早速、apt-get install pop-before-smtp
で、必要なもの一揃いインストール。READMEにしたがって、設定ファイルとpostfixのmain.cfを修正して、無事動作するようになりました。
dracを使ったりする方法に較べたら、えらく簡単に導入できたと思うぞ。
#さすが、sarge?
一応、うちの環境下では、pop-before-smtpは次のように設定中~。
eswat2:/etc/pop-before-smtp# diff -u pop-before-smtp.conf.orig pop-before-smtp.conf
--- pop-before-smtp.conf.orig 2002-09-20 22:19:58.000000000 +0900
+++ pop-before-smtp.conf 2004-10-13 17:26:10.000000000 +0900
@@ -25,9 +25,9 @@
#$flock = 0;
# Set $debug to output some extra log messages (if logging is enabled).
-#$debug = 1;
+$debug = 1;
#$logto = '-'; # Log to stdout.
-#$logto = '/var/log/pop-before-smtp';
+$logto = '/var/log/pop-before-smtp';
# Override the DB hash file we will create/update (".db" gets appended).
#$dbfile = '/var/lib/pop-before-smtp/hosts';
@@ -39,7 +39,7 @@
#$grace = 30*60;
# Set the log file we will watch for pop3d/imapd records.
-$file_tail{'name'} = '/var/log/mail.log';
+$file_tail{'name'} = '/var/log/mail.info';
# ... or we'll try to figure it out for you.
if (!-f $file_tail{'name'}) {
@@ -54,7 +54,7 @@
# If you need to define a custom PATH (for instance, if you're using Postfix
# and postconf is someplace wierd), uncomment and customize this.
-#$ENV{'PATH'} = '/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin';
+$ENV{'PATH'} = '/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin';
# These parameters control how closely the watcher tries to follow the
# logfile, which affects how much resources it consumes, and how quickly
@@ -108,8 +108,8 @@
# 'login: \S*\[(\d+\.\d+\.\d+\.\d+)\] \S+ \S+';
# For Courier-POP3 and Courier-IMAP:
-#$pat = '^(... .. ..:..:..) \S+ (?:courier)?(?:pop3|imap)(?:login|d|d-ssl): ' .
-# 'LOGIN, user=\S+, ip=\[[:f]*(\d+\.\d+\.\d+\.\d+)\]$';
+$pat = '^(... .. ..:..:..) \S+ (?:courier)?(?:pop3|imap)(?:login|d|d-ssl): ' .
+ 'LOGIN, user=\S+, ip=\[[:f]*(\d+\.\d+\.\d+\.\d+)\]$';
# For qmail's pop3d:
#$pat = '^(... .. ..:..:..) \S+ vpopmail\[\d+\]: ' .
コメントする