Yes this works!!!
Thanks a lot.
But now i have another problem.
All this works with sendmail for local users....
With postfix no.
You know about this??
I have a sym blink in /usr/sbin/sendmail that point to postfix and accept
----- Original Message -----
From: "Professional Software Engineering"
Sent: Friday, November 16, 2001 6:15 PM
Subject: Re: Forwarding with procmail
At 16:36 2001-11-16 +0100, Giuliano Cocchi wrote:
This is my problem.
I use Postfix as MTA and procmail as MDA.
I want that procmail filter all mail comed in in this way:
all mail coming from domai1 or domain2 must go to right destination but a
copy of this mail must go in my box.
No. The syntax of your match line is wrong (at a minimum, it is missing
the * at the beginning of the line which identifies it as a condition
rather than a delivery, but the syntax of the regexp is unlikely to match
DOMAIN constructs if you don't include a lead-in wildcard), and if you're
sending a COPY of the message, you need to specify the 'c'opy flag.
Even if you fixed these problems, you have the potential for a mail loop
here - if "my account" is local, the delivery should re-invoke the
/etc/procmailrc - which means it'll trip this rule again.
# add 'c' for COPY flag. Otherwise, you're changing simply directing
# the mail to your account, but not sending it along to the original
* ! ^X-Loop: myaccount(_at_)whereever
* ! ^TO_myaccount
| formail -A "X-Loop: myaccount(_at_)whereever" | $SENDMAIL myaccount
This would add a custom loop header, and tell sendmail to deliver it to
your other account. It shouldn't invoke if the loop header exists or if
you're already _supposed_ to be a recpient.
$SENDMAIL should probably be defined as the postfix path, and if postfix
any good as a sendmail drop-in replacement, it should accept the same
MAILER_DAEMON is another condition to consider excluding from the forward,
at least if your 'myaccount' is at the domains that you're processing this
on -- if the forward to myaccount bounces, it'll loop.
Sean B. Straw / Professional Software Engineering
Please DO NOT carbon me on list replies. I'll get my copy from the
procmail mailing list
procmail mailing list