Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check and remove invalid chars from $rcptto #691

Merged
merged 2 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.5.2-1
5.5.3-1
4 changes: 4 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
10/12/2024 Changes in v5.5.3-1
==================================
- Check for invalid chars in recipient address (msmilter) - Thanks to alexskynet

06/09/2024 Changes in v5.5.2-1
==================================
- Remove references to SORBS
Expand Down
8 changes: 7 additions & 1 deletion common/usr/sbin/MSMilter
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl -U -I /usr/share/MailScanner/perl

# (c) 2019-2020 MailScanner Project <https://www.mailscanner.info>
# Version 1.7
# Version 1.8
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -248,7 +248,13 @@ sub envrcpt_callback
${$message_ref} .= "\tby " . hostname . ' (MailScanner Milter) with SMTP id ';
}

# Check and remove invalid characters from rcptto
my $rcptto = $args[0];
$rcptto =~ s/^<//;
$rcptto =~ s/>$//;
$rcptto =~ s/<.*?>//g;
$rcptto = "<$rcptto>";

my $esmtpnotify = '';
# Capture the ESMTP options for pass through MailScanner engine
# RFC 3461
Expand Down