dnp(_at_)netspace(_dot_)org writes:
I need to change the domain name in the MAILER-DAEMON message when
bouncing back messages. So, if I bounce back messages from say,
"mydomain.net", instead of "MAILER-DAEMON(_at_)mydomain(_dot_)net" I want
procmail to
use "MAILER-DAEMON(_at_)someotherdomain(_dot_)net". I took a look at the
Procmail FAQ
but could not figure out a way to achieve this. Any help would be
appreciated. Thanks in advance.
If the bounce is being generated by your MTA (i.e., before it gets to
procmail) then it's a matter of how you MTA canonifies that address.
<sendmail specific info follows>
If you're using sendmail, you'll have to hack the sendmail.cf. Let's
see, I *think* that with a .cf file generated using the 8.9.3 M4
generator you would need to add a rule to the S93 ruleset. Right
before the rule that reads:
R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
You would add:
R$n < @ *LOCAL* > $* $: $n < @ $j . @ someotherdomain.net > $2
Preferable would be to put the domain name into a variable and just
reference that:
DD someotherdomain.net
R$n < @ *LOCAL* > $* $: $n < @ $j . @ $D > $2
I'm not 100% sure that'll work, but maybe it'll give you ideas.
Philip Guenther