Autoresponder mit Exim und Squirrelmail
Will man einen automatischen Autoresponder (Abwesenheitsmeldung) für den urlaub einrichten so hat man bei Squirrel Webmail das "Courier_vacation"-Plugin zur Verfügung.
Leider arbeitet dies nicht auf Anhieb mit Exim zusammen.
Unter http://www.flatmtn.com/article/setting-exim#Exim4-6.10 habe ich eine Anleitung gefunden wie Exim dazu überredet werden kann, die Nachrichten zu erstellen:
######################################################################
    # ROUTERS CONFIGURATION #
    #...
     
    # This router delivers a "vacation" message if a file called 'vaction.msg'
    # exists in the home directory.
    uservacation:
    driver = accept
    domains = +local_domains
    # user to put away message in a file called vacation.msg
    require_files = $home/vacation.msg
    # do not reply to errors or lists or with ADV in the subject
    condition = ${if or { \
    {match {$h_precedence:} {(?i)junk|bulk|list}} \
    {eq {$sender_address} {}} \
    {match {$h_subject:} {(ADV|Adv)}} \
    } {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 = uservacation_transport
    unseen
    no_verify
     
    # ...
    userforward
    # ...
     
    ######################################################################
    # TRANSPORTS CONFIGURATION #
    #...
     
    local_delivery
    #...
     
    # This transport is used for vacation messages
    uservacation_transport:
    driver = autoreply
    file = $home/vacation.msg
    file_expand
    # if using MailScanner setup with two config files
    # must be able to write as the user exim runs as
    # because calling with -C will not run as root
    # http://www.exim.org/pipermail/exim-users/Week-of-Mon-20020715/041328.html
    once = /var/log/exim/vacation/$local_part-vacation.db
    # if not using MailScanner setup try something like
    #once = $home/.vacation.db
    # to use a flat file instead of a db specify once_file_size
    #once_file_size = 2K
    once_repeat = 14d
    from = $local_part@<I>domain.com</I>
    to = $sender_address
    subject = "Re: $h_subject"
    # text that will be included in message above what is in user's vacation.msg
    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"
    #...
     
    address_pipe:
    #...
    Wichtig zu erwähnen wäre noch, daß $home oder $file auch aus einer MySQL-Datenbank kommen könnte. zB file = ${lookup mysql{SELECT concat(home,'/vacation.txt') FROM imap_pop3 AS IP WHERE IP.email='${local_part}@${domain}' AND IP.id=IP.id AND IP.enabled=1 }}
Datum: 25.02.2011







