Why are you using this filter for outbound messages??  What happens if it
flags inadvertently outgoing ham as spam?

Regardless, the "modem code" is already in the script, but it's in an if
statement that's not getting triggered, just remove the if and it's braces
and it should work just fine:

if ($checkedEmail=~/X-Spam-Flag: YES/) {
        $isSpam="SPAM";
        $checkedEmail=~s/(?<!\r)\n/\r\n/g;
        $xmailHeader=~s/(?<!\r)\n/\r\n/g;
}

Becomes:

if ($checkedEmail=~/X-Spam-Flag: YES/) {
        $isSpam="SPAM";
}
$checkedEmail=~s/(?<!\r)\n/\r\n/g;
$xmailHeader=~s/(?<!\r)\n/\r\n/g;

That should fix all of your outbound messages.  

-Don

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mircea Ciocan
Sent: Thursday, July 08, 2004 8:00 PM
To: [EMAIL PROTECTED]
Cc: xmail
Subject: [xmail] Problems with Spam Assassin sa_filter

    Hi Don and all,

    I've CC'ed to the xmail mailing list because I belive is of interest 
for Xmailserver users also:

    Lateley I've encountered some problems sending messages to gmail and 
some other constipated configured qmail servers after I've configured 
sa_filter for both incoming and outgoing messages, the error message 
recevied by postmaster said that maximum delivery atempts have been 
reched and that's it !!!
    Puzzled I send another mail and searched the spool directory and 
here is what I've got in the coresponding slog file:


[PeekTime] 1089333936 : Fri, 9 Jul 2004 03:45:36 +0300
<<
ErrCode   = -162
ErrString = End of socket stream data
SMAIL SMTP-Send MX = "gsmtp171.google.com." SMTP = "mircea.interplus.ro" 
>From = "[EMAIL PROTECTED]" To = "[EMAIL PROTECTED]" Failed !
SMTP-Error = "451 Read stray <LF>, must use <CR><LF>, see RFC 2821"
SMTP-Server = "gsmtp171.google.com."
 >>
<<
ErrCode   = -162
ErrString = End of socket stream data
SMAIL SMTP-Send MX = "gsmtp57.google.com." SMTP = "mircea.interplus.ro" 
 From = "[EMAIL PROTECTED]" To = "[EMAIL PROTECTED]" Failed !
SMTP-Error = "451 Read stray <LF>, must use <CR><LF>, see RFC 2821"
SMTP-Server = "gsmtp57.google.com."
 >>

    So it seem that somehow the message was altered and sure enough the 
spool message that was processed by Spam Assassin via sa_filter was 
having the whole headers section without <CR>s, all were gone :(. 
Running a stupid unix2dos over the spool rsnd file unlocked it and it 
arrived ok on gmail servers.
    Spam Assassin is 2.60 and sa_filter release is 1.3, even that the 
sa_filter.pl itself this is tagged as  sa_filter.pl,v 1.5 2003/10/02. I 
belive that this bug can be quite easy corrected with some lovely Perl 
line that looks like modem noise ;) and will repair the mangled hedear 
lines but unfortunately my perl expertise is way under that necessary to 
repair such a script, can any perl wizzards have a look over it and make 
me happy with a fix, it seem that this gmail check is more and more 
comon this day.

    Thank you and best regards,

    Mircea Ciocan

-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]




-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to