procmail
[Top] [All Lists]

Re: Moving/undeliver messages from outside domain to particular address

2006-08-10 07:19:31
On Thu, Aug 10, 2006 at 01:07:06PM +0500, Imran wrote:

How I can move/undeliver messages From: outside mydomain.com To:
a particular address of mydomain say abc(_at_)mydomain(_dot_)com, I am using
procmail with sendmail and have no experience to write procmail
scripts.

1)  Please don't use the term "mydomain.com" as a generic
replacement for "some domain of mine."  There really is a
mydomain.com, and it has hundreds of thousands of customers,
and for a long time I was one.  I was scratching my head for
a moment wondering what the heck you were talking about.
(Dotster bought the business a couple of years ago and
proceeded to screw it up badly.  They leak -- whether on
purpose for $ or because of sloppy security, I do not know --
all addresses that come through their forwarding services to
spammers.  This is worthy of a lawsuit, I can tell you.)

2) I don't know what you mean by "move/undeliver".  Do you want
simply to decline delivery of the messages to the user's mail
folders?  Or do you want to post-process mail folders that
already exist to remove the offending messages?

If you want to decline delivery from outside the local host,
I suggest you do that in sendmail and save yourself and your
servers the effort of dealing with the extra traffic.  If you
don't want to do that for some reason, then -- assuming you mean
you want to process new mail with this rule, not post-process
old mail -- it's also not hard in procmail.  But you should read
Nancy McGough's Quick Start pages to help you get started with
procmail, and, of course, "man procmailex" and "man procmailrc"
to start.

http://www.ii.com/internet/robots/procmail/qs/


In any case:


   :0  # in brackets below are a caret, a space and a tab
   *  ^To:(.*\<)?abc(_at_)domain\(_dot_)tld
   * !^From:(_dot_)*(_at_)domain\(_dot_)tld
   /dev/null

Dallman

____________________________________________________________
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>