Re: [Exim] Spamassassin and transport failure

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Troy Engel
Ημερομηνία:  
Προς: j.horne
Υ/ο: Exim Users List
Αντικείμενο: Re: [Exim] Spamassassin and transport failure
Hi John,

I had the same exact problem, and there was no real answer ever posted
to the problem. I saw a few posts on SAtalk list that there were/are
"known problems" with perl < 5.6.0 (I am using redhat 6.2, perl 5.005),
so my *theory* is that it's some obscure dumb perl problem.

For our installation, I solved it with the following steps (I also
started with the same configs you did, on dman's webpage):

1) upgrade to Exim4.04 -- the same *type* of error still happened, but
it was much more informative and gentler to deal with. The upgrade was
a little rocky, but the guys here on the list helped me through it. yay.

2) after watching the logs, I noticed that only *local* mails caused
this weird BSMTP error 2 problem. So (again with help fromt he lists) I
altered the smapcheck_router 'condition' line to ignore all local,
inter-domain email:

condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}}
{!eq {$sender_address_domain}{$domain}} } {1}{0}}"

3) move spamcheck_router: to *above* system_aliases int he exim.conf
file. This, coupled with #2, causes things to be scanned or skipped
before the aliases are expanded, which cuts down on re-scanning the same
email sent inbound to multiple people (like staff and project group
aliases, etc).

We've now been running sucessfully for 3 days now without a single BSMTP
error 2 anymore, and spamassassin is doing it's thing. Performance is
also damn good now that local mails are skipped.

hope this helps,
-te


John Horne wrote:
> Hello,
>
> I have been looking to use spamassassin (version 2.20) on our central
> mailhubs. I have run it successfully on my linux PC with Exim 4.04. So I
> thought I'd move it onto one of the mailhubs - a Sun Solaris 8 box with Exim
> 3.36.
>
> It all seems to work okay for messages submitted from the mailhub itself
> (i.e. I log onto the mailhub and invoke:
> exim jhorne@???
> ('tracy' is the name of the system). The message headers show the
> received protocol as 'spam-scanned'. However, if I return to my work PC and
> send a message so that it goes via 'tracy', then I get an error returned:
>
> The following address(es) failed:
>
>     jhorne@???
>       Child process of spamcheck transport returned 2 from command:
>       /usr/local/exim/bin/exim

>
> The following text was generated during the delivery attempt:
>
> ------ jhorne@??? ------
>
> An error was detected while processing a file of BSMTP input.
> The error message was:
>
>     554 Unexpected end of file

>
> The SMTP transaction started in line 0.
> The error was detected in line 4.
> 0 previous messages were successfully processed.
> The rest of the batch was abandoned.
> 554 Unexpected end of file
> Transaction started in line 0
> Error detected in line 4
>
> ==========================================
>
> It then gives a copy of the original message. I installed spamassassin
> according to the web site:
> http://dman.ddts.net/~dman/config_docs/exim3_spamassassin.html
>
> I am using spamd which was started as root.
>
> The relevant bits of the Exim configure file are:
>
> # Spam Assassin            (transport)
> spamcheck:
>   driver = pipe
>   command = /usr/local/exim/bin/exim -oMr spam-scanned -bS
>   transport_filter = /usr/local/bin/spamc
>   bsmtp = all
>   home_directory = /tmp
>   current_directory = /tmp
>   user = exim
>   group = mail
>   no_return_path_add
>   log_output
>   return_fail_output
>   prefix =
>   suffix =

>
> # Spam Assassin        (director)
> spamcheck_router:
>   no_expn
>   no_verify
>   domains = tracy.csd.plymouth.ac.uk : localhost
>   local_parts = jhorne
>   condition = "${if and { {!def:h_X-Spam-Flag:} \
>                           {!eq {$received_protocol}{spam-scanned}}} {1}{0}}"
>   driver = smartuser
>   transport = spamcheck

>
> -------------------
>
> I have searched the mailing list archives and can find similar problems when
> using the spamcheck.pl script (?), but no real solution. I can find no-one
> having this problem when using spamd. I should add that for the trusted
> users 'exim' is included, so I can see no reason to have a problem with the
> pipe. The error seems to indicate that it is a problem with running the exim
> binary, but I have no idea what it is - why does it get an unexpected end of
> file? Because local messages work okay I can't run exim with '-d9' since it
> won't show any problem (actually I have just done that and I'll check the
> output, but it looks okay and no indication of what may cause a problem
> remotely).
>
> Very strange. Anyway, as usual these things happen on a Friday afternoon :-)
>
> If anyone has any ideas about this then I'd be grateful.
>
>
> John.
>
> ------------------------------------------------------------------------
> John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
> E-mail: jhorne@???
> PGP key available from public key servers

>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>



--
Troy Engel, Systems Engineer
Hockey. Kinda like Figure Skating in a War Zone.