pop_log(p,POP_PRIORITY, HERE, ~~~~~ 記事のパッチに追加 "Login user=%s host=%s [%s]", p->user,p->client,p->ipaddr); /* * Authorization completed successfully */ |
POP_FACILITY LOG_MAIL POP_PRIORITY LOG_NOTICE |
mail.* /var/log/maillog |
Sep 15 20:08:21 pop-server popper[31027]: apop "foo" Sep 15 20:08:24 pop-server popper[31027]: Stats: foo 0 0 0 0 hoge.foo.co.jp xxx.xxx.xxx.xxx |
Sep 11 09:03:47 pop-server popper[5389]: apop "foo" Sep 11 09:03:50 pop-server popper[5389]: Stats: foo 0 0 0 0 |
#!/usr/local/bin/perl5 ~~~~~~ ~ 削除 (snip) $dbfile = "/etc/mail/popip.db"; # Sendmail map to update. ~~~~~~~~~~~~~ 修正 (適宜) |
if ($s =~ m/(ipop2d|ipop3d|imapd|popper|qpopper)\[[0-9]+\]: Login user=/) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 修正 |
$ su # makemap hash /etc/pop.authip.db < /dev/null ~~~~~~~~~~~~~~~~~~ 先の修正に合わせて |
$ su # install -m 511 poprelayd /usr/local/bin |
Your vendor has not defined Fcntl macro O_EXLOCK, used at /usr/local/bin/poprelayd line 79. |
# You may need to uncomment this if your fcntl.ph doesn't export it. #sub O_EXLOCK { 0x20 }; |
# default relay host DRsmtp-server.hoge.co.jp Kpopauth hash /etc/pop.authip <--- 追加 (.db を除くことに注意) ################################ # SMTP processing restrictions # ################################ (snip) ## ## RCPT TO validation ## Scheck_rcpt <--- Scheck_mail と間違えないよう注意! (snip) # client address check -- accept messages from hosts within allowed domain R$* $| $* $| $* $| $* $: $1 $| $2 $| $3 $| $4 $| $(popauth $1 $: > $) <--- 追加 R$* $| $* $| $* $| $* $| <?> $: $1 $| $2 $| $3 $| $4 <--- 追加 R$* $| $* $| $* $| $* $| $+ $@ $>Check_rcpt_inside $3 $| $4 <--- 追加 R$={RoamIP}$* $| $* $| $* $| $* $@ $>Check_rcpt_roam $4 $| $5 R$* $| $*$={RoamDom} $| $* $| $* $@ $>Check_rcpt_roam $4 $| $5 |