Hi!
I'm trying to tweak my procmail configuration to allow it forwarding my emails to another email account I have (a free email account accessible via a Web interface).
I really want to make sure that my hack won't create a mail loop (I already happened to me once with a simple .forward...).
The rules I wrote are as follows:
:0c
* $^To:.*\<$\LOGNAME\>
* !^FROM_DAEMON
* !^X-Loop:
myemailaddress@a.b.com
* !^FROM_myforwardaddress@c.d.com
* !^FROM_myemailaddress@a.b.com
{ LOG = "Mail message forwarded to
myforwardaddress@c.d.com" }
| formail -k -X "From:" -X "Subject:" \
-I "To:
myforwardaddress@c.d.com" -X "To:" \
-I "X-Loop:
myemailaddress@a.b.com" -X "X-Loop:" \
| $SENDMAIL $SENDMAILFLAGS -t
Basically, I'd like my email sent to my regular address (myemailaddress@a.b.com) to be forwarded to my web account (myforwardaddress@c.d.com).
My LOG line does not seem to work correctly, I always get the line in the log.
Also, if the message is not forwarded to
myforwardaddress@c.d.com, I get two messages in mail mailbox: the original message and the copy.
What should I change to make my forward work properly?