Forcing dccproc to always exit with success

Paul Wright paul.wright@pobox.com
Fri Jun 13 12:52:39 UTC 2003


I wanted to use the client side whitelist with dccproc to filter out mail
which is suspicious because it looks like it should have a Fuz2 but
doesn't:

many hex Fuz2 00000000 00000000 00000000 00000000

However, this makes dccproc exit with a non-zero exit status for
messages which trip this check. Exiting with a non-zero status halts
delivery in my context, but doesn't bounce the message (I'm using
dccproc with Exim, which takes the non-zero status as a sign that
something has gone wrong, and defers delivery). I thought that it'd be
useful for people using dccproc with something other than procmail to be
able to force a zero exit status. 

Below my signature is a diff of the 1.1.36 dccproc.c against my hacked
about version. I'm using the -x option for exitting with zero status all
the time. I've left the exit status from catching a signal alone.

Hope this is useful to people in similar situations.

-- 
Paul Wright | http://pobox.com/~pw201 |


40a41
> static u_char always_exok = 0;
99c100
< 		   "usage: [-VdAQCHER]  [-h homedir] [-m map] [-w whiteclnt]"
---
> 		   "usage: [-xVdAQCHER]  [-h homedir] [-m map] [-w whiteclnt]"
135c136
< 			   "VdAQCHERh:m:w:T:a:f:g:S:t:c:i:o:l:L:")) != EOF) {
---
> 			   "xVdAQCHERh:m:w:T:a:f:g:S:t:c:i:o:l:L:")) != EOF) {
136a138,141
>                 case 'x':
>                         always_exok = 1;
>                         break;
> 
556,558c561,570
< 	exit((honor & (DCC_HONOR_SRVR_ISSPAM | DCC_HONOR_LOCAL_ISSPAM)) != 0
< 	     ? EX_NOUSER
< 	     : EX_OK);
---
>         if (always_exok)
>         {
>             exit (EX_OK);
>         }
>         else
>         {
>             exit((honor & (DCC_HONOR_SRVR_ISSPAM | DCC_HONOR_LOCAL_ISSPAM)) != 0
>                     ? EX_NOUSER
>                     : EX_OK);
>         }




More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.