procmail
[Top] [All Lists]

Re: Help with .procmailrc 2

1999-09-06 00:50:48
On Mon, 6 Sep 1999 09:40:12 +0200, "Mail Forward"
<diacom-all(_at_)diacom-systemhaus(_dot_)de> wrote:
all incomming mails should be forwarded to the username in
X-Envelope-To. only the username, for example: forward to "someone"
if x-env is <someone(_at_)somewhere(_dot_)com>
if this is not possible with a mail it must be forwarded to x(_at_)y(_dot_)z

A suitable recipe might be the following:

    :0
    * ^X-Envelope-To:[  <>]*\/[^        <>@]+
    ! "$MATCH"

    :0
    ! x(_at_)y(_dot_)z

The regular expression will match any non-whitespace non-broket non-@
characters after the initial whitespace/broket run. The whitespace
consists of one space and one tab, in both places.

If you're at all familiar with programming languages with regular
expression support such as sed, awk, or Perl, you should be able to
use that knowledge to construct valid and useful regular expressions
in Procmail, too. (grep is a good start, of course.)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Please turn off this "feature" in your "mail program". Thank you.

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition