procmail
[Top] [All Lists]

Re: forwading and wildcards

2001-11-22 09:34:22

Remember that procmail doesn't use "wildcards", it uses regular
expressions.  Read the procmail documentation to see how it deals
with regular expressions.  A "*" is not a wildcard, it's an element
of a regexp that indicates repetition of the preceding atom.  If
this doesn't make sense to you, read the man page for re_format.

Read the docs on the MATCH variable.  You can try something like:

        :0
        * ^(To|CC):[     ]\/(_dot_)*(_at_)server(_dot_)server0(_dot_)de
        * MATCH ?? ^\/[^(_at_)]+
        ! $MATCH(_at_)server(_dot_)server0(_dot_)de

?

And don't forget the TAB in the first condition.  You may have to make
the initial condition a little fancier, and/or trim MATCH a little more
to make sure you don't get non-address parts of the To line, but this
should get you started.

p


On Thu, Nov 22, 2001 at 01:15:57PM +0100, Jonas Meurer wrote:

Hello,
I've set up a mailinglist and for that every mail to
mailinglist[-owner|-request|-admin](_at_)server(_dot_)server0(_dot_)de has to 
be forwardet
to 
mailinglist[-owner|-request|-admin](_at_)server(_dot_)server0(_dot_)de(_dot_) 
The reason is
that mails from the inet are automaticly forwardet to 
jmeurer(_at_)gmx(_dot_)de and
so jmeurer(_at_)gmx(_dot_)de has to forward them with procmail. Ok, until now 
I make
this with an entry for every adress in .procmailrc.
But is there a way to set up wildcards? So that every mail to 
*(_at_)server(_dot_)server0(_dot_)de is forwardet to 
*(_at_)server(_dot_)server0(_dot_)de?
:0:
* *(_at_)server(_dot_)server0(_dot_)de
! *(_at_)server(_dot_)server0(_dot_)de   does this work? Or can I fetch the 
receiver-adress
in an other way? As example
:0:
* *(_at_)server(_dot_)server0(_dot_)de
! $receiver_adress

Is there a way to do this?

Thanks + bye
  Jonas

-- 
|    .-.    |  2nd mail: bilbo(_dot_)beutlin(_at_)mail(_dot_)de | 
jmeurer.dnsalias.org
|    /v\    |  ******************************************************
|  /(   )\  |  **** Linux is like a wigwam:                      ****
|   ^^ ^^   |  ****   no windows, no gates and an apache inside! ****
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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