POP-Before-SMTP-Auth daemon for Postfix/Dovecot

It should go without saying that by 2012, nobody should be using POP before SMTP authorization anymore. Users should be using SMTP Auth to send authenticated mail. POP before SMTP was a kluge. That said, in the real world, sometimes we need to maintain long-provided existing services.

I had been using the Perl script Pop-before-smtp with Dovecot and Postfix to allow "legacy" POP users to continue using mail as they always had, going back through when I used vpopmail.

Then one day... it stopped working. I can't figure out why, aside from an incompatibility with multi-instance Postfix that I was able to patch. Its web site looks a bit dusty for a log scanner, which is the sort of thing that needs periodic maintenance.

So, POP-Before-SMTP-Auth was born. It is a log-scanning daemon, just like Pop-before-smtp, except written in PHP instead of Perl, and only works with Postfix/Dovecot. (at least for now) It should be pretty easy to adapt for other POP3 servers and other SMTP servers.


No support is offered for POP-Before-SMTP-Auth. That doesn't mean you can't ask on the mailing list, it just means I'm not promising that the code will work for you, or that I'll help you get it working. I probably will try to help you, but I'm not committing to anything. My interest in POP-Before-SMTP-Auth will undoubtedly wane once I stop having any use for it myself. (This is the fate of many such things) But it's written in PHP, which means even your neighbor's kid should be able to keep this script working for you with fairly little effort. It's not complicated and the code isn't fancy.

If you're willing and able to provide the information necessary to support other SMTP and or other POP3 servers, I'm probably willing to try and adapt POP-Before-SMTP-Auth to support them.

License, Documentation:

View the current: README • License (GPLv2) • UPGRADING

Version history:

Requirements, Download(s):

Requires PHP CLI 5.3 or greater (command line interface) with PCRE, PCNTL and POSIX.

Mailing List

Mailing list | Archives