Merge pull request #167 from csware/recipient_delimiter

vacation: Correctly process mails with recipient_delimiter
pull/199/merge
David Goodwin 6 years ago committed by GitHub
commit c3d3898eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,6 +51,8 @@ our $db_name = 'postfix';
our $vacation_domain = 'autoreply.example.org';
our $recipient_delimiter = '+';
# smtp server used to send vacation e-mails
our $smtp_server = 'localhost';
# port to connect to; defaults to 25 for non-SSL, 465 for 'ssl', 587 for 'starttls'
@ -611,6 +613,9 @@ if($smtp_recipient =~ /\@$vacation_domain/) {
my $tmp = $smtp_recipient;
$tmp =~ s/\@$vacation_domain//;
$tmp =~ s/#/\@/;
if ($recipient_delimiter) {
$tmp =~ s/[\Q$recipient_delimiter\E].+$//;
}
$logger->debug("Converted autoreply mailbox back to normal style - from $smtp_recipient to $tmp");
$smtp_recipient = $tmp;
undef $tmp;

Loading…
Cancel
Save