* On [010516 16:24] Scott Pitsley <Pitsley(_dot_)Scott(_at_)fsd(_dot_)com>
wrote:
I am new to procmail and am trying to use it to help with a domain name
change.
Currently I accept mail for @olddomain.com and @newdomain.com. I want any
message that comes in to uname(_at_)olddomain(_dot_)com to generate a message
to the
sender
and recipient that says olddomain.com is going away on "date" in the future
please use uname(_at_)newdomain(_dot_)com(_dot_)
This seems similar to the vacation auto-responder mentioned in the
manpage procmailex, however you would need to adjust it a bit to come
up with something like this:
:0 Whc:
* $^To.*<youremailaddress>
* !FROM_DAEMON
#avoid sending this to mailer daemons and mailing-lists
#you may want to add the addresses of people/lists you don't
#want to send this message to like this:
#! From.*(<address1>|<address2>|etc...)
* !^X-Loop: <youremailaddress>
#avoid sending this to yourself! :-)
| (formail -rI"Precedence: junk" \
-A"X-Loop: <youremailaddress>" ; \
echo "I have moved my email account to,"; \
echo "<newemailaddress>, your message has been forwarded there."; \
echo "please update your address-book."; \
) | $SENDMAIL -oi -t
#I presume you can see the syntax for adding lines.
# echo "your text" newline(;), line continues (\).
#This recipe also assumes that sendmail is your MTA.
#Having sent this message, you now want to forward the
#mail to your new address:
:0
! <newemailaddress>
I cannot figure out how to do this. I am using procmail in conjunction with
sendmail 8.11. Any help would be appreciated.
I hope the above helps, if I've made any silly mistakes, I'm sure
they'll be pointed out, in any case, you may want to add a recipe
before this one to keep backups, just in case.
Lawrence
--
Lawrence Mitchell | http://members.tripod.co.uk/EVSvienna/
wence(_at_)gmx(_dot_)li | He didn't look mad, but they never did.
-- (Terry Pratchett, Strata)
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail