Re: [Exim] autoreply using vacation program

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Steve Haslam
Date:  
À: exim_users
Sujet: Re: [Exim] autoreply using vacation program
On Wed, Jun 13, 2001 at 02:16:15PM +0100, Sujit Choudhury wrote:
> In the Exim FAQ, there is an explanation of vacation program on mail hub
> (Q0431). It works fine only if the staff were on the mail hub!
> The other example (Q9813), when there is no local user points to example
> C019. If I understand correctly, it will be necessary to re-load the
> configuration file each time a user goes to holiday or come back from
> holiday. Is there any way of getting round this problem and use the
> vacation program on staff server?


I'm confused- your mail is going in to the hub and then out to
external systems where the staff will read it?

A setup that requires you to reload the config file every time someone
changes their vacation status is evil IMHO. We have a local LDAP
server and allow people to configure their vacation status in their
LDAP entry:

# DIRECTOR
ldapvacation:
  driver = localuser
  transport = ldapvacation_transport
  unseen
  no_expn
  no_verify
  user = ${local_part}
  # do not reply to errors or lists
  senders = "! ^.*-request@.*:\
              ! ^owner-.*@.*:\
              ! ^.*-admin@.*:\
              ! ^postmaster@.*:\
              ! ^listmaster@.*:\
              ! ^mailer-daemon@.*"
  # do not reply to errors and bounces or lists
  condition = "${if or {{match {$h_precedence:} {(?i)junk|bulk|list}} {eq {$sender_address} {}}} {no} {${lookup ldap{ldap:///ou=People,o=Excite,c=GB??sub?(&(objectClass=excitePerson)(uid=${local_part})(vacationMessage=*))}{yes}{no}}}}"


# TRANSPORT
ldapvacation_transport:
  driver =  autoreply
  user = ${local_part}
  once = ${home}/vacation-once.db
  once_repeat = 2d
  log  = ${home}/vacation-log.txt
  return_message = true
  text = "\
 ------                                                ------\n\n\
 This message was automatically generated by email software\n\
 The delivery of your message has not been affected.\n\n\
 This message will be repeated no more often than every 2 days.\n\n\
 ------                                                ------\n\n\
${lookup ldap{ldap:///ou=People,o=Excite,c=GB?vacationMessage?sub?(uid=${local_part})}{$value}fail}"
  #to = "${sender_address}"
  to = "${if def:h_Errors-To: {$h_Errors-To:} {$sender_address}}"
  subject =  "${if def:h_Subject: {Autoreply: $h_Subject:} {I am on vacation}}"


It's somewhat messy, but it seems to work nicely.

Anyway, my point is that if you have a director that dispatches local
users off to satellite storage systems, you can drop a director like
this (notably with "unseen", "no_verify", "no_expn") ahead of it. The
mail will still be delivered to the satellite, and the vacation notice
will be sent from the hub.

HTH

SRH
-- 
+              Steve Haslam              |       W: +44-20-7447-1839       +
+      Engineering Grunt, Excite UK      |       M: +44-7775-645618        +
. I'm killing things with this razor blade, making sure a price gets paid  .