[exim] Auto reply

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: pierre master
Data:  
Para: Exim-users
Assunto: [exim] Auto reply
Hi,

I have search for a solution to automatically send a respond mail when a a
special mailbox received a mail but i alwayws arrive on the vacation
solution.

Actually i have an exim 4.71-40.el5 on a CentOS Linux SMTPIN2
2.6.18-194.3.1.el5PAE #1 SMP Thu May 13 13:48:44 EDT 2010 i686 i686 i386
GNU/Linux

My exim conf :

# Macros definition
DELAY_INPUT = 10s

....

ACL

....

######################################################################
#                      ROUTERS CONFIGURATION                         #
######################################################################
begin routers



manual_domain:
  driver = manualroute
  local_part_suffix = +*
  local_part_suffix_optional
  condition = ${if !eq\
                {${lookup{$domain}wildlsearch{TRANSPORT_MAP}}}{}\
                {true}{false}\
               }
  route_data = ${lookup{$domain}wildlsearch{TRANSPORT_MAP}}
  transport = remote_smtp
  no_more


system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
file_transport = address_file
pipe_transport = address_pipe



######################################################################
#                     TRANSPORTS CONFIGURATION                       #
######################################################################
begin transports


devnull:
driver = pipe
command = "/bin/cat"

remote_smtp:
  driver           = smtp
  headers_remove   = Received
  rcpt_include_affixes
  delivery_date_add
  envelope_to_add
  hosts_avoid_tls = *


address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
maildir_format
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply


######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################
begin retry


*                      *           F,15m,1m; G,1h,15m,1.5; F,3d,1h



######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################
begin rewrite



######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################
begin authenticators




Exim actually forwards all mails to an exchange server.

I would like when a user test@??? received a mail, an automatic
respond send him :

Sorry the user to trie to join is no longer available. Thanks .....



My idea is to create a router like :



user_leave:
  driver = accept
  domains = +local_domains
  # user to put away message in a file called vacation.msg
  require_files = /root/user_leave.msg
  # do not reply to errors or lists or with ADV in the subject
  condition =  ${if or { \
                {match {$receiver_address} {test@???} \
                } {no} {yes}}
  no_expn
  # do not reply to errors or bounces or lists
  senders = ! ^.*-request@.*:\
            ! ^bounce-.*@.*:\
            ! ^.*-bounce@.*:\
            ! ^owner-.*@.*:\
            ! ^postmaster@.*:\
            ! ^webmaster@.*:\
            ! ^listmaster@.*:\
            ! ^mailer-daemon@.*:\
            ! ^root@.*
  transport = user_leave_transport
  unseen
  no_verify


######################################################################
#                      TRANSPORTS CONFIGURATION                      #
#...


user_leave_transport:
   driver = autoreply
   file =/root/user_leave.msg
   file_expand
   from = $local_part@???
   to = $sender_address
   subject = "Re: $h_subject"
   # text that will be included in message above
   text = "This is an automatic reply.  Please feel free to send
additional\n\
           mail, as only this one notice will be generated.\n\
           ================================================\n\n"



But of course it is not working.
I don t know if i need to create a local user to do this ,
if $receiver_address exit or if it is recipients, if i can place a message
in /root/user_leave.msg or in /home/exim or /home

Thanks for you help.

Pierre, a french user