Menu

#5 ip+user auth with popbstmp

open
nobody
None
5
2012-07-16
2007-10-01
No

While I like the idea of pop-before-stmp as a quick authentication mechanism I disliked the lack of user authentication.

i.e. if pleb@bigcompany.com did a pop3 there was nothing preventing pleb sending a email as ceo@bigcompany.com.

It also doesn't help if pleb did a pop3/imap connection behind a big NAT and something decided to take advantage of the open relay.

Rather than complain about this I wrote a patch and a policy daemon.

I later realised that I just needed to create a sender access map (check_sender_access) however being a policy daemon it should be a little more portable.

Love to hear your feedback. Be nice on coding style - this is one of my first perl programs.

Supports:

Most pop/imap clients in pop-before-smtp-conf.pl

autodetermination of postfix $mydestination including parsing of variables.

use and caching of postfix postmaps in $mydestination

Doesn't support:

Cyrus + Perdition (pattern matching assumes that USER comes before IP in the log which doesn't occur for these products.

Differencing between sender domains. e.g.pleb@bigcompany.com does a pop connection can still send through as pleb@charity.org (assuming the same mail server) - sorry not enough detail in POP logs.

Databases other than berkDB for ipusername DB.

Tested:

Debian - postfix + dovecot 1.0.0 POP3 + IMAP
hash and mysql maps in $mydestination

Untested:

All other pop3/imap clients. I did fix their regexs to what I could find/assume is a username.

Match Many Patterns - code added - never run yet

Discussion

  • Daniel Black

    Daniel Black - 2007-10-01

    mega patch to support combined userip databases

     
  • Daniel Black

    Daniel Black - 2007-10-01

    Logged In: YES
    user_id=612034
    Originator: YES

    File Added: pop-before-smtp-policyd

     
  • Daniel Black

    Daniel Black - 2007-10-01

    pop-before-smtp policy daemon

     
  • Daniel Black

    Daniel Black - 2007-10-01

    sample dovecot-1.0.0 imap and pop log

     
  • Daniel Black

    Daniel Black - 2007-10-01

    Logged In: YES
    user_id=612034
    Originator: YES

    File Added: mail.log

     
  • Daniel Black

    Daniel Black - 2007-10-01

    Logged In: YES
    user_id=612034
    Originator: YES

    small opp - username should be before ip in contrib/pat-tester

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.