<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>procmail filter reject with reason fails</title> 
  <pubDate>Fri, 10 Apr 2026 09:21:04 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7520</link> 
  <atom:link rel="self" type="application/rss+xml" title="procmail filter reject with reason fails" href="https://bugs.horde.org/ticket/7520/rss" /> 
  <description>procmail filter reject with reason fails</description> 
 
   
   
  <item> 
   <title>When I use INGO&#039;s reject with reason under procmail, I end u</title> 
   <description>When I use INGO&#039;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=&quot;no.address.here&quot;

}



If I send a message from &quot;cs911&quot;, the message doesn&#039;t get delivered, but I don&#039;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&#039;s not quite clear if EXITCODE does what was intended.



The procmail session goes like this:



procmail: Match on &quot;^From: .*cs911&quot;

procmail: Assigning &quot;EXITCODE=Do&quot;

procmail: Assigning &quot;not&quot;

procmail: Skipped &quot;send&quot;

procmail: Skipped &quot;.&quot;

procmail: Assigning &quot;HOST=no.address.here&quot;

procmail: HOST mismatched &quot;bron&quot;

From cs911@blah.com Thu Oct 16 15:44:40 2008

 Subject: test

  Folder:           



Quoting the &quot;Do not send&quot; doesn&#039;t fix it.



</description> 
   <pubDate>Thu, 16 Oct 2008 19:57:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7520#t49767</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit dc9c17041bae</title> 
   <description>Changes have been made in Git (master):

commit dc9c17041bae1cce78576b3dfaa9c3b3456ce09f
Author: Jan Schneider &lt;jan@horde.org&gt;
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</description> 
   <pubDate>Fri, 01 Feb 2013 12:54:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7520#t76520</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
