Stephen Allen wrote:
I adapted your idea and laid it out as below I've done it like this so it's
easier for me to change). It seems to work except that I can't get the
From: and To: fields added. The message is delievered correctly, so the
SENDMAIL part is working, but the From: & To: are being set to my user
default rather than what I want as shown.
:0
* ^X-Original-To:(_dot_)test-support(_at_)rowyerboat\(_dot_)com
| formail -kz \
-X Subject: \
-X In-Reply-To: \
-X Content-Type: \
-X MIME-Version: \
-X Content-Transfer-Encoding: \
-X Content-Disposition: \
-X Message-ID: \
-X References: \
-A "From: Stephen Allen <mytest(_at_)rowyerboat(_dot_)com>" \
-A "To: kp(_at_)anotherdomain(_dot_)com" \
| $SENDMAIL "$SENDMAILFLAGS" \
kp(_at_)anotherdomain(_dot_)com
The lack of -X overrides -A, and we really should have loop detection
for any forwarding, and it's $SENDMAILFLAGS, not $SENDMAIL, that needs
to be without quotes, so ...
:0
* ^X-Original-To:(_dot_)test-support(_at_)rowyerboat\(_dot_)com
* ! $ ^X-Loop: $\LOGNAME(_at_)$\HOST
| formail -kz \
-X Subject: \
-X In-Reply-To: \
-X Content-Type: \
-X MIME-Version: \
-X Content-Transfer-Encoding: \
-X Content-Disposition: \
-X Message-ID: \
-X References: \
-A "From: Stephen Allen <mytest(_at_)rowyerboat(_dot_)com>" -X From: \
-A "To: kp(_at_)anotherdomain(_dot_)com" -X To: \
-A "X-Loop: $LOGNAME(_at_)$HOST" -X X-Loop: \
| "$SENDMAIL" $SENDMAILFLAGS \
kp(_at_)anotherdomain(_dot_)com
____________________________________________________________
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