Binary package “pop-before-smtp” in ubuntu precise

watch log for POP/IMAP auth, notify MTA to allow relay

 Spam prevention requires preventing open relaying through email
 servers. However, legitimate users want to be able to relay. If
 legitimate users always stayed in one spot, they'd be easy to describe
 to the daemon. However, what with roving laptops, logins from home,
 etc., legitimate users refuse to stay in one spot.
 .
 pop-before-smtp watches the mail log, looking for successful
 POP/IMAP logins, and includes the originating IP address into a
 database which can be checked by a Mail Transport Agent (MTA), to
 allow relaying for people who have recently downloaded their email.
 .
 Contrary to other similar tools pop-before-smtp needs no hacking
 in the mail daemons. It should be run on the same machine as your
 MTA (since they need to share access to a database file). It also
 needs access to the POP/IMAP daemons' log file, so these daemons
 should either (1) also be running on the same machine, or (2) they
 should be using syslog's remote-logging feature to forward the
 POP/IMAP messages to the machine where pop-before-smtp and the
 MTA are running.