[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vps-mail] Procmail - Allow from Domain



Thanks Scott,

Actually, what I did was simply put that into the top of the main procmailrc file, with it going to mailbox $DEFAULT (which was another question I had, but forgot to send) so that it would go to the intended recipient.

Thanks Again.

Kevin

----- Original Message ----- From: "Scott Wiersdorf" <scottw@xxxxxxxxxxxx>
To: <vps-mail@xxxxxxxxxxxx>
Sent: Thursday, November 03, 2005 12:58
Subject: Re: [vps-mail] Procmail - Allow from Domain


On Thu, Nov 03, 2005 at 12:24:17PM -0500, Kevin Plested wrote:
Is it possible to do this :

Check From Field, if "server.com" then bypass procmailrc.
Continue to process the rest of the e-mail that isn't "server.com".

In your main procmailrc file (/etc/procmailrc for vps1,
/usr/local/etc/procmailrc for vps2), put something like this:

 :0
 * H ?? ^From:.*@server\.com\>
 { SWITCHRC }

SWITCHRC tells procmail to switch to the specified rc file; when no rc
file is specified (as above: this is how you 'unset' a variable in
Bourne-shell and procmail), procmail simply exits (see procmailrc(5)
manpage).

Note that this recipe is a bit dangerous because many viruses and
worms will forge the From: header, so you could be opening up a hole
that way.

The more conditions you can apply to this case, the safer this recipe
will be (e.g., is the 'To' always the same also? Look for any
additional headers such as X-Organization or other tell-tale
information that would help establish the message's legitimacy.

Scott
--
Scott Wiersdorf
scottw@xxxxxxxxxxxx
======================================================================
This is <vps-mail@xxxxxxxxxxxx>       <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).



======================================================================
This is <vps-mail@xxxxxxxxxxxx>       <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).


Main Index | Thread Index
Match: Format: Sort by:
Search: