You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2006/09/20 09:30:23 UTC
[Bug 5104] New: "spamc -e" that returns EX_TEMPFAIL when spamd unavailable
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5104
Summary: "spamc -e" that returns EX_TEMPFAIL when spamd
unavailable
Product: Spamassassin
Version: unspecified
Platform: Other
OS/Version: other
Status: NEW
Severity: enhancement
Priority: P3
Component: spamc/spamd
AssignedTo: dev@spamassassin.apache.org
ReportedBy: slamb@slamb.org
I'd like a spamc invocation suitable for simple use with Postfix's after-queue content filtering via its
"pipe" daemon. I've described its expectations at <http://wiki.apache.org/spamassassin/
IntegratedSpamdInPostfix>. The short version is this:
1. If spamc returns 0, Postfix assumes spamc has accepted responsibility for delivering the message.
2. If spamc returns EX_TEMPFAIL or EX_OSERR, Postfix defers the message.
3. Otherwise, Postfix bounces the message.
Given #1, any direct invocation of spamc needs the "-e" argument to pass to sendmail.
I want to defer messages when spamd is unavailable, not deliver or bounce. When using -e, none of
spamc's various return code options do this:
$ echo foo | spamc -t 1 -U /nonexistent -e /bin/cat; echo $?
foo
0
$ echo foo | spamc -x -t 1 -U /nonexistent -e /bin/cat; echo $?
foo
0
$ echo foo | spamc -E -t 1 -U /nonexistent -e /bin/cat; echo $?
foo
0
$ echo foo | spamc -E -x -t 1 -U /nonexistent -e /bin/cat; echo $?
foo
0
My workaround is to launch spamc through a script, keep the message in a tempfile, and then launch
sendmail myself. (I pasted such a script into the wiki page.) It works, but it's awkward and less efficient.
Postfix documentation says:
"With the shell script as shown above you will lose a factor of four in Postfix performance for transit
mail that arrives and leaves via SMTP. You will lose another factor in transit performance for each
additional temporary file that is created and deleted in the process of content filtering."
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.