From 402799906a53aeb3c6feff9b3e98d750acd559e0 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 13 Jun 2017 18:27:55 +0200 Subject: postfix-sender-login: strip extension before lookup. Users can add an extension (following postconf(5)'s $recipient_delimiter) to the local part of any envelope sender address already allowed. --- roles/MSA/files/usr/local/bin/postfix-sender-login.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/MSA/files/usr/local/bin/postfix-sender-login.pl b/roles/MSA/files/usr/local/bin/postfix-sender-login.pl index 3248e15..374cc70 100755 --- a/roles/MSA/files/usr/local/bin/postfix-sender-login.pl +++ b/roles/MSA/files/usr/local/bin/postfix-sender-login.pl @@ -125,6 +125,7 @@ sub process_request($) { $key =~ /\A(.+)@([^\@]+)\z/ or return "NOTFOUND "; # invalid sender address my ($localpart, $domainpart) = ($1, $2); + $localpart =~ s/\+.*//; # strip extension, cf. postconf(5)'s $recipient_delimiter my $ldap = Net::LDAPI::->new( $LDAPI ) // return "TEMP couldn't create Net::LDAPI object"; -- cgit v1.2.3