5.3.0-git
2014-12-23

[#7520] procmail filter reject with reason fails
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 2008-10-16 (2259 days ago)
Due
Updated 2013-02-01 (690 days ago)
Assigned 2008-10-19 (2256 days ago)
Resolved 2013-02-01 (690 days ago)
Milestone 3.0.3
Patch No

History
2013-02-01 12:54:28 Jan Schneider Milestone ⇒ 3.0.3
State ⇒ Resolved
Taken from Matt Selsky
Assigned to Jan Schneider
 
2013-02-01 12:54:20 Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

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
2008-10-19 22:33:07 Jan Schneider State ⇒ Assigned
Assigned to Matt Selsky
 
2008-10-16 19:57:17 jas (at) cse (dot) yorku (dot) ca Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ procmail filter reject with reason fails
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
When I use INGO's reject with reason under procmail, I end up with 
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.