Re: [Exim] exim autoreply question

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Sergey Sysoev
CC: exim-users
Betreff: Re: [Exim] exim autoreply question
On Tue, 20 Jul 2004, 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@???'


Use a router with the "unseen" option to send the automatic response.
Here is an example that I used in the Exim course I have just run:

auto_warning_router:
  driver = accept
  <some conditions>                 <=== put your domain check here
  transport = warning_transport
  unseen


And here's the transport:

warning_transport:
  driver = autoreply
  user = exim
  file = /usr/local/mail/warning.txt
  file_expand
  from = postmaster@???
  to = $sender_address
  subject = Re: Your mail to \
            $local_part@$domain


Alternatively, you can do this in a system filter. Here's another
example from the Exim course:

# Exim filter
if $recipients contains obs.domain.example
then
  mail
    from postmaster@???
    subject "Warning: obsolete domain used"
    file /var/mail/obs-warn-message
    once /var/mail/obs-warn-oncelog
    once_repeat 3d



--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book