Summary | procmail filter reject with reason fails |
Queue | Ingo |
Queue Version | 1.2.1 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | jas (at) cse (dot) yorku (dot) ca |
Created | 10/16/2008 (6083 days ago) |
Due | |
Updated | 02/01/2013 (4514 days ago) |
Assigned | 10/19/2008 (6080 days ago) |
Resolved | 02/01/2013 (4514 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | 3.0.3 |
Patch | No |
Taken from Matt Selsky
State ⇒ Resolved
Milestone ⇒ 3.0.3
commit dc9c17041bae1cce78576b3dfaa9c3b3456ce09f
Author: Jan Schneider <jan@horde.org>
Date: Fri Feb 1 13:53:57 2013 +0100
[jan] Use more portable procmail recipe for rejects (
Bug #7520).ingo/docs/CHANGES | 1 +
ingo/lib/Script/Procmail/Recipe.php | 27 ++++++++++++++++++++++++---
ingo/package.xml | 4 +++-
3 files changed, 28 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/dc9c17041bae1cce78576b3dfaa9c3b3456ce09f
Assigned to Matt Selsky
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ procmail filter reject with reason fails
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
something that looks like this in .procmailrc:
##### test this out #####
:0
* ^From: .*cs911
{
EXITCODE=Your message is rejected.
HOST="no.address.here"
}
If I send a message from "cs911", the message doesn't get delivered,
but I don't get the error message either.
From the procmail man page re: EXITCODE:
By default, procmail returns an exitcode of zero (success) if it
successfully delivered the
message or if the HOST variable was misset and there were no more
rcfiles on the command
line; otherwise it returns failure. Before doing so, procmail
examines the value of this
variable. If it is set to a positive numeric value, procmail will
instead use that value as
its exitcode. If this variable is set but empty and TRAP is set,
procmail will set the exit-
code to whatever the TRAP program returns. If this variable is not
set, procmail will set it
shortly before calling up the TRAP program.
re: HOST
If this is not the hostname of the machine, processing of the current
rcfile will immediately
cease. If other rcfiles were specified on the command line, processing
will continue with the
next one. If all rcfiles are exhausted, the program will terminate,
but will not generate an
error (i.e., to the mailer it will seem that the mail has been delivered).
It's not quite clear if EXITCODE does what was intended.
The procmail session goes like this:
procmail: Match on "^From: .*cs911"
procmail: Assigning "EXITCODE=Do"
procmail: Assigning "not"
procmail: Skipped "send"
procmail: Skipped "."
procmail: Assigning "HOST=no.address.here"
procmail: HOST mismatched "bron"
From cs911@blah.com Thu Oct 16 15:44:40 2008
Subject: test
Folder:
Quoting the "Do not send" doesn't fix it.