6.0.0-alpha12
6/12/25

[#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 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

History
02/01/2013 12:54:28 PM Jan Schneider Assigned to Jan Schneider
Taken from Matt Selsky
State ⇒ Resolved
Milestone ⇒ 3.0.3
 
02/01/2013 12:54:20 PM 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
10/19/2008 10:33:07 PM Jan Schneider State ⇒ Assigned
Assigned to Matt Selsky
 
10/16/2008 07:57:17 PM jas (at) cse (dot) yorku (dot) ca Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ procmail filter reject with reason fails
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
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.




Saved Queries