Re: dropping non-subscriber posts without acknowledgement

"David W. Tamkin" <[email protected]> Fri, 20 Aug 2004 21:55:05 -0500
Newsgroups gmane.mail.smartlist.user
Message-ID <[email protected]>
Richard A. DeMattia wrote:

> I have placed the following at the top of my rc.local.s00 script,
> but I find that nothing gets logged to the reject.nosub file, and posts with
> attachments from nonsubscribers get matched by recipes further down in this file.

> My testing list does not have foreign_submit set.

I can't quote the code here without its being badly rewrapped, but in 
short, $foreign_submit has no y in it, so the score will always be -2 
(if multigram returns a 0 exit code) or 0 (if multigram returns a 
non-zero exit code).  Neither of those is greater than 0, so procmail 
will never enter the braces.

Solution: add this condition

* 1^0

to the scoring part.  Then, if multigram returns failure, the final 
score will be +1 and procmail will enter the braces.  If multigram 
returns success, the final score will be -1 and procmail will skip the 
braced area.