On Tue, 2004-07-20 at 18:25 +0700, Sergey Sysoev wrote:
> In case if anyone sends mail to user@old-domain-[1,2,3].com I want
> message to be delivered to specified recipient (at specified domain)
>
> AND
>
> send autoreply to sender for example 'Your message has been delivered
> to recipient user@??? BUT domain expire soon, please use
> address user@???'
I'd use a vacation style mechanism for this:
obsolete_domain:
driver = accept
verify = false
domains = old-domain1.com : old-domain2.com
# Don't send autoreplies to common administrative addresses.
senders = ! : !^.+-request@ : !^owner-.+@ : !^.+-owner@ : !^postmaster@ : \
!^listmaster@ : !^mailer-daemon@ : !^root@ : !^.+-admin@ : \
!^.+=.+\\..+@
transport = send_obsolete
unseen
and the transport:
send_obsolete:
driver = autoreply
log = /var/lib/exim/obsolete.log
once = /var/lib/exim/obsolete.db
from = ${local_part}@${domain}
to = $sender_address
subject = Re: ${escape:$h_subject:}
text = "\
Dear $h_from:\n\n\
This is an automatic reply. ${local_part}@${original_domain} is\n\
obsolete blah blah blah.\n\n\
"
untested, of course, but dug out of our own vacation stanzas.
--
Kjetil T.