pop-before-smtp
Pop-before-smtpを使ってFedora CoreでPostfixとDovecotでPOP before SMTPする方法
ã¤ã³ã¹ãã¼ã«
$cd ~/src $ curl -O http://nchc.dl.sourceforge.net/sourceforge/popbsmtp/pop-before-smtp-1.42.tar.gz $ tar xzvf pop-before-smtp-1.42.tar.gz $ cd pop-before-smtp-1.42 $ sudo cp pop-before-smtp.init /etc/rc.d/init.d/pop-before-smtp $ sudo cp pop-before-smtp /usr/sbin/ $ sudo cp pop-before-smtp-conf.pl /etc
$ sudo perl -MCPAN -e shell cpan> install Time::HiRes cpan> install File::Tail cpan> install Date::Parse cpan> install Net::Netmask cpan> install BerkeleyDB cpan> exit
/etc/pop-before-smtp-conf.plã®è¨å®
- ãã°ã®æå®é¨åã®ã³ã¡ã³ããã¯ãã
$file_tail{'name'} = '/var/log/maillog';
- Dovecotç¨ã®ã¡ã¼ã«ãã°ã®æ£è¦è¡¨ç¾é¨åã®ã³ã¡ã³ããã¯ãã
# For Dovecot POP3/IMAP when using syslog
$pat = '^[LOGTIME] ?S+ (?:dovecot: )?(?:imap|pop3)-login: ' .
'Login: .**? (?:?[|rip=)[:f]**(?d+?.?d+?.?d+?.?d+),]';
$out_pat = '^[LOGTIME] ?S+ (?:dovecot: )?(?:imap|pop3)-login: ' .
'Disconnected.**? (?:?[|rip=)[:f]**(?d+?.?d+?.?d+?.?d+),]'
- Postfixã§ä½¿ç¨ããDBã®ç¢ºèª
$ /usr/sbin/postconf -v | less
- Postfixã§BerkeleyDBã使ãã®ã§ãpodã®ã³ã¡ã³ããåé¤
#========= Postfix BerkeleyDB ========START=
#========= Postfix BerkeleyDB =========END=
- è¨å®ã®ç¢ºèª
$ perl -c /etc/pop-before-smtp-conf.pl
/etc/postfix/main.cf以ä¸ã®è¨è¿°ã追å
smtpd_recipient_restrictions = permit_mynetworks,reject_non_fqdn_recipient,
check_client_access hash:/etc/postfix/pop-before-smtp,
reject_unauth_destination
ãªãã¼ãæã®èªåèµ·åã®è¨å®ã¨èµ·å
$ sudo /sbin/chkconfig pop-before-smtp on $ sudo /sbin/chkconfig --list| grep pop-before-smtp $ sudo /etc/rc.d/init.d/pop-before-smtp start