Though POP Before SMTP is not a secured way, but it is an easiest way to configure mail server to allow roaming user to use the mailserver as SMTP gateway. Before configuring POP Before SMTP make sure that your Mail Server & POP3/IMAP sever working properly. Following Perl Module are required for the POP Before SMTP :
Time:: HiRes
File:: Tail
Date:: Parse
Net:: Netmask
BerkeleyDB
Download the POP Before SMTP perl files from http://popbsmtp.sourceforge.net/. Untar the files & copy them to the following locaiton
% cp pop-before-smtp.init /etc/rc.d/init.d/pop-before-smtp
% cp pop-before-smtp /usr/sbin/
% cp pop-before-smtp-conf.pl /etc
Edit the pop-before-smtp-conf.pl file to customize it for your system.
$ logto = ‘/ var / log / pop-before-smtp’;
$ dbfile = ‘/ etc / postfix / pop-before-smtp’;
$ grace = 10 * 60; # the time to log 10 minutes and $ file_tail ( ‘name’) = ‘/ var / log / dovecot’;
Uncomment the following lines which you will get after “# For Dovecot POP3/IMAP when it does its own logging.”
$pat = ‘^dovecot: [LOGTIME] Info: (?:imap|pop3)-login: ’ .
‘Login: .+? rip=[:f]*(d+.d+.d+.d+),’;
$out_pat = ‘^dovecot: [LOGTIME] Info: (?:imap|pop3)-login: ’ .
‘Disconnected.*? rip=[:f]*(d+.d+.d+.d+),’;
Next comment the following two lines :
= cut #====================== Postfix BerkeleyDB ======================= START =
= cut #====================== Postfix BerkeleyDB ======================= == END =
Now edit /etc/dovecot.conf file :
protocols = imap imaps pop3 pop3s
imap_listen = *
pop3_listen = *
log_path = / var / log / dovecot
info_log_path = / var / log / dovecot
log_timestamp = “% b% d% H:% M:% S”
Finally make the following changes to the /etc/postfix/main.cf file
smtpd_recipient_restrictions = permit_mynetworks,reject_non_fqdn_recipient, check_client_access hash:/etc/postfix/pop-before-smtp, reject_unauth_destination
% touch /etc/postfix/pop-before-smtp
% postmap /etc/postfix/pop-before-smtp
% /etc/init.d/pop-before-smtp start
% /etc/init.d/postfix reload
Now configure you outlook/eudora. Do POP before sending any mail. You will get the logged IP in /var/log/pop-before-smtp file.
If you’re having trouble getting pop-before-smtp to work; you will get more in http://popbsmtp.sourceforge.net/debug.shtml