0

We've been using Postfix for a LONG time now and are kind of hooked on it. Now we need to "move into the modern era" and let people SEND email from our SMTP server(s) even when they're outside our network. So, tasked with this job, I've found pop-before-smtp.

You can find it here.

So, I've got it all configued but it fails in testing. I've troubleshot it using the directions here, and determined that the PERL that's trying to parse the log appears to be incorrect. We're using Dovecot as our IMAP / POP server, and there are three choices given in the configuration file. Here is an excerpt from the config file showing the three sets:

# 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+)[],]';

# For Dovecot POP3/IMAP when it does its own logging.
##$logtime_pat = '(\d\d\d\d-\d+-\d+ \d+:\d+:\d+)';
#$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+),';

# For older Dovecot POP3/IMAP when it does its own logging.
#$pat = '^(?:imap|pop3)-login: [LOGTIME] Info: ' .
#    'Login: \S+ \[[:f]*(\d+\.\d+\.\d+\.\d+)\]';
#$out_pat = '^(?:imap|pop3)-login: [LOGTIME] Info: ' .
#    'Disconnected.*? \[[:f]*(\d+\.\d+\.\d+\.\d+)\]';

One is supposed to uncomment the ones that apply, however, none of them work.

I surmise that 'pat' is the pattern for login, and out-pat is the pattern for logging out or otherwise disconnecting.

The actual log record format is clearly different than any of these three, but they're close. Here are an example pair:

Mar 11 17:53:55 imap-login: Info: Login: user=<username>, method=PLAIN, rip=208.54.4.205, lip=192.168.1.1, TLS

Mar 11 17:59:10 IMAP(username): Info: Disconnected: Logged out bytes=352/43743

When using POP, 'imap-login' is replaced by 'pop-login', and on log-out, 'POP' replaces 'IMAP' - why the changes in capitalization I can't say!

Importand data are: The timestamp, the username, and, when logging in, the "remote" ip ("rip").

Given enough time, I may be able to piece together something that works, but since I don't actually know PERL, this is kind of tough!

Help please!

2 Answers 2

3

I know you have asked support for pop-before-smtp. But if your postfix has SASL SMTP auth support why not use that. pop-before-smtp dev stopped way back in 2007.

1
  • Of course, you didn't answer the question at all, but what you perceived as the meta-problem. And, I was already onto SASL, however SASL wasn't working, it wasn't certain why, debugging was happening, and when you hit one road-block, you head for another route until the primary one clears.
    – Richard T
    Mar 15, 2012 at 15:08
2

No modern mail system should ever use POP before SMTP. It's a 90's era hack because in the late 90's spam began to grow and we needed away to determine if a user should be allowed to send mail. We had to rely in this hack because at the time no MTA natively supported authenticated sending and even if they did no MTU supported it on the client side.

As Richard T said use sasl auth on the server side and better yet do it over smpts.

3
  • The comment I made to proy above applies to your answer too; Of course, you didn't answer the question at all, but what you perceived as the meta-problem. And, I was already onto SASL, however SASL wasn't working, it wasn't certain why, debugging was happening, and when you hit one road-block, you head for another route until the primary one clears.
    – Richard T
    Mar 15, 2012 at 15:10
  • 2
    pop-before-smtp isn't an alternative, it's another problem. If you truly plan to modernize your mail system, adding an unreliable and unsupported hack to Postfix is a poor attempt. Perhaps asking how to enable sasl with Postfix which you haven't done is an better way to get around your roadblock.
    – kashani
    Mar 16, 2012 at 7:03
  • Sorry, but when you say "which you haven't done," you're wrong. The problem was solved a few days ago. You know, condesention to people you're writing to / about isn't flattering to one's self.
    – Richard T
    Mar 16, 2012 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .