Hello, I´m using Perl interface of SA in a shared hosting environment. Do not use the std SA filtering from hosting company, what we do is to create a filter in cPanel an pipe to a Perl Script to do Spam check. The script work as expected, but have a problem when using this 2 functions:
$spam_assassin->add_all_addresses_to_whitelist ( $sa_message ) $spam_assassin->add_all_addresses_to_blacklist ( $sa_message ) These functions perform a print for each added/removed address like : SpamAssassin auto-whitelist: adding address to whitelist: [EMAIL PROTECTED] SpamAssassin auto-whitelist: adding address to whitelist: [EMAIL PROTECTED] This print command is done by AWL plugin regardless debug option is set or not: (lines are 456 to 459) if ($whitelist->add_known_good_address($args->{address})) { print "SpamAssassin auto-whitelist: adding address to whitelist: " . $args->{address} . "\n"; $status = 1; } The 'problem' is that this print command make massages fail on delivery. My guess is that any output to STDOUT while filtering a mail message is interpreted by MTA (Exim in my case) as a failure: This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/usr/bin/perl /home/.../safilter.pl generated by [EMAIL PROTECTED] The following text was generated during the delivery attempt: ------ pipe to |/usr/bin/perl /home/.../safilter.pl generated by [EMAIL PROTECTED] ------ SpamAssassin auto-whitelist: adding address to whitelist: [EMAIL PROTECTED] SpamAssassin auto-whitelist: adding address to whitelist: [EMAIL PROTECTED] ------ This is a copy of the message, including all the headers. ------ . . . I must say that everything else work fine, this Delivery Failure lets say is "extra". The script finds and delivers to the user his/her original message back and SA is retrained per message. If I comment the line with "$spam_assassin->add_all_addresses_to_whitelist ( $sa_message )" there is no delivery failure message; but obviuosly no messages to whitelist. At this time I'm using this delivery failure as a 'confirmation' that the process was done, but is something I do not expect or want. This delivery error is similar to the one received when you send via SMTP with debug flag set to1. The text generated is all the connection process and delivery error is expected; in my case, the text is from the AWL plugin print command and the delivery error is not expected. Don't know if this print command should be done only if debug flag in SA is set, or by design the print command is done. Unfortunately in shared hosting there is no way to modify the line that prints added/removed addresses. Somebody have noticed this also o know how to add remove addresses ? Don't want to use the user_prefs for this. Should I have to place this issue as a bug or request ? TIA, Oscar. -- View this message in context: http://www.nabble.com/Bug-or-by-design-behaviour-with-Perl-interface.-tp15704747p15704747.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.