SUMMARY" Generating two outgoing email messages from one

From: Morry Katz (katz@rpal.com)
Date: Fri Jan 25 1991 - 12:12:39 CST


incoming message
Reply-to: katz@rpal.rockwell.com

Problem:
How to generate two outgoing email messages from one incoming message.

Application:
We are changing our domain name and I want to notify users of mail
sent to the old domain during a short transition period during which
both sets of domain names will be functional.

Solution:
(Too many people gave similar suggestions to waste the net badwidth to
list them all)
Modify sendmail.cf so that all messages sent to the old domain are
routed to a new mailer which sends the message to a shell script or
program. This shell script or program is then responsible for
generating and sending both the original message and the warning
message.

Detailed Solution:
I modified sendmail.cf, ruleset 6 to catch old addresses and replace
the old domain name with the string OLDDOMAIN, much as other rules
replace ones domain with LOCAL. I modified ruleset 0 to send mail
to addresses including OLDDOMAIN to a new mailer. I created a new
mailer. modeled after ether and prog, which calls a script named
/usr/local/bin/olddomain. The shell csript gets the incoming message
from standard in. Sends this message via /usr/lib/sendmail to the new
address for the user which is passed to the script by the first
invocation of sendmail. The script then extracts the header from the
incoming message, prepends a warning to it, and sends the resultant
message via sendmail to the same user. For safety sake, I cache the
incoming message in /usr/spool/mqueue in case the system crashes
during the aforementioned process.

If anyone needs further details or wants the actual code, just send me
some email.
------------------------------------------------------
Morry Katz
Rockwell Science Center
administrator@rpal.rockwell.com (machine administration issues)
katz@rpal.rockwell.com (other)
------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:10 CDT