josh wrote:The 'm' at the end of the regex is for 'multiline' - I believe it's tested successfully.
If I sign up for an account on frogster-online.com, perhaps I should be able to reproduce the problem?
The 'm' is for multiple line matching in a Perl regex, not for multiple line MIME headers (aka "folding").
I've been able to reproduce this issue with frogster-online.com as greatwolf outlined. Running with the spamgourmet code in my local checkout, I saw:
- Code: Select all
From: "Frogster Online Gaming GmbH"
<support@frogster-online.com>
change to the following with Reply Address Masking:
- Code: Select all
From: "Frogster Online Gaming GmbH - support@frogster-online.com" <+test1+username+1234567890.support#frogster-online.com@spamgourmet.com>
<support@frogster-online.com>
This is definitely incorrect -- because it still has "<support@frogster-online.com>" in the From header field. The weird part is that I can successfully send that email to my Gmail account from my local machine. The Reply Address Masking is broken still, because replies to it go to the original email address instead of the masked one, but it's delivered nonetheless.
So I'm wondering if the mail program spamgourmet.com uses drops messages with these bad From header fields? I tried 'sendmail', 'mailx', and 'postfix' on my machine, but couldn't reproduce the problem. Maybe spamgourmet.com is using stricter settings?
In any case, I'm hoping the non-delivery issue will go away once this multi-line Reply Address Masking bug is fixed. To that end, here's my patch for "mailhandler/spameater":
- Code: Select all
Index: mailhandler/spameater
===================================================================
--- mailhandler/spameater (revision 28)
+++ mailhandler/spameater (working copy)
@@ -801,12 +801,12 @@
$senderdisplay = $sender;
}
if ($sender) {
- $$msgref =~ s/(^Return-Path\: ).*$/$1 $sender/mi;
- $$msgref =~ s/(^From\: ).*$/$1 $senderdisplay/mi;
- $$msgref =~ s/(^Sender\: ).*$/$1 $sender/mi;
- $$msgref =~ s/(^X-Sender\:).*$/$1 $sender/mi;
- $$msgref =~ s/(^X-Sent-From\:).*$/$1 $sender/mi;
- $$msgref =~ s/(^Disposition-Notification-To:).*$/$1 $sender/mi;
+ $$msgref =~ s/(^Return-Path\: ).*$(?:\n .*$)*/$1 $sender/mi;
+ $$msgref =~ s/(^From\: ).*$(?:\n .*$)*/$1 $senderdisplay/mi;
+ $$msgref =~ s/(^Sender\: ).*$(?:\n .*$)*/$1 $sender/mi;
+ $$msgref =~ s/(^X-Sender\:).*$(?:\n .*$)*/$1 $sender/mi;
+ $$msgref =~ s/(^X-Sent-From\:).*$(?:\n .*$)*/$1 $sender/mi;
+ $$msgref =~ s/(^Disposition-Notification-To:).*$(?:\n .*$)*/$1 $sender/mi;
}
if ($replyto) {
if ($replytodisplay) {
@@ -814,7 +814,7 @@
} else {
$replytodisplay = $replyto;
}
- $$msgref =~ s/(^Reply-To\: ).*$/$1 $replyto/mi;
+ $$msgref =~ s/(^Reply-To\: ).*$(?:\n .*$)*/$1 $replyto/mi;
}
$sender =~ s/.*\<//;
$sender =~ s/\>.*//;
Can someone who has access please put this change in?