procmail
[Top] [All Lists]

Anti-Spam Tactic.....

2006-03-19 04:14:53
Howdy folks;

Is there a way to capture _ALL_ sendmail output to the internet, pipe it through
procmail, and then pipe it back to sendmail for output to the net?

Apperently a bunch of spammers have been back dooring my site for some time now,
to the point where some sites have blacklisted me.  I've managed to shut most
of them out for the time being, but some of them are being particularly
insistant.  Basically, what I want to accomplish here, is to have procmail
perform a couple of checks.

1. If its mail local to my site, deliver it in the normal manner.
2. If its outgoing mail, check it for the presence of a particular header line.
   If the line is present, its from me, remove the line, and send it out.
   If the line is absent, its a spammer, send it to /dev/null.

According to the procmailex man file, (down near the end):

       An entirely different application for procmail would be to
       conditionally apply filters to a certain  (outgoing)  text
       or  mail.   A  typical  example  would be a filter through
       which you pipe all outgoing mail, in order  to  make  sure
       that it will be MIME encoded only if it needs to be.  I.e.
       in this case you could start procmail in the middle  of  a
       pipe like:

          cat newtext | procmail ./mimeconvert | mail 
chris(_at_)where(_dot_)ever

So as near as I can figure, somewhere in the /etc/rc files, I'd need to add
something like:

          sendmail | procmail ./headercheck | sendmail

Minus the appropriate, "-options", of course.

I have no idea of how to add the header line for those few mails I need to use
netscape for, but for std text mail, which is mostly what I do, the elmheaders
file works just fine.

Oh yeah, I'm doing UUCP over TCP to pick up my mail on an hourly basis.

Is the above even remotely do-able?
Thanks for any/all help.

Bill

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>