dropping non-subscriber posts without acknowledgement
The tremendous proportion of spam from non-subscribers has prompted me to attempt to drop all posts to my mailing list from nonsubscribers, without sending any acknowledgement at all - to avoid the bounced email multiplication factor. I have been tinkering with rc.local.s00 in an attempt to do this, but not with very much success. 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 hope was that if this recipe were matched, that no further processing of the message would be done, and that it would not be delivered nor rejected. My testing list does not have foreign_submit set. :0 * 9876543210^0 foreign_submit ?? y * -2^0 ? formail -X"From " -xFrom: -xReply-To: -xSender: -xResent-From: \ -xResent-Reply-To: -xResent-Sender: -xReturn-Path: | \ multigram -b1 -m -l$submit_threshold -L$domain \ -x$listaddr -x$listreq accept accept2 { :0 c | formail -i "Subject: ***Aug20 mod drop msg from non-subscriber***"|\ $SENDMAIL -oi $maintainer :0 A reject.nosub } Any assistance is appreciated - thank you in advance. -- Rick DeMattia <rad@nshore.org> The secret of the universe is|^&*||x|NO CARRIER
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.
participants (2)
-
David W. Tamkin
-
Richard A. DeMattia