Re: [Exim] Stopping out-of-office auto-reply mail loops

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Konrad Michels
Dátum:  
Címzett: Andrew Lewis
CC: exim-users
Tárgy: Re: [Exim] Stopping out-of-office auto-reply mail loops
My config for vacation messages, for what its worth, looks as follows
and only ever sends one reply to any specific sender address:

In routers I have:

vacation:
        driver = accept
        check_local_user
        require_files = $home/.vacation
        no_verify
        # do not send reply to errors or lists
        senders = "! ^.*-request@.*:\
                   ! ^owner-.*@.*:\
                   ! ^root@.*:\
                   ! ^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} {yes}}"
        transport = vacation_reply
        unseen


In transports I have:

vacation_reply:
        driver = autoreply
        file = $home/.vacation
        file_expand
        log = $home/vacation.log
        once = $home/vacation.db
        from = $local_part@???
        to = $sender_address
        subject = "Re: $h_subject"
        text = "Dear $h_from\n\n\
        This is an automatic reply.  Please feel free to send
additional\n\
        mail to me, as only this one notice will be generated. The
following\n\
        is a pre-recorded message, sent on behalf of\n\
        ${local_part}@???:\n\
        ================================================\n\n"


On Fri, 2004-01-23 at 06:06, Andrew Lewis wrote:
> Hello,
>
> Currently I am experiencing problems where-in one user will set their
> out-of-office auto-reply on, and then mail another user who's auto-reply
> is on, causing an infinite mail-loop.
>
> I believe I can rate-limit these messages, which could be good, but I
> didn't get working when I set everything up. What I would really like to
> do is *check* if the sending address has auto-reply on and send no reply
> back if they do. How to implement this as a condition in my
> router/transport?
>
> I have:
>
> MYSQL_VACATIONEMAIL = SELECT email from vacation WHERE
> email='${quote_mysql:$local_part_prefix$local_part$local_part_suffix@$domain}' AND onvacation='yes'
> MYSQL_VACATIONSUBJECT = SELECT subject from vacation WHERE
> email='${quote_mysql:$local_part_prefix$local_part$local_part_suffix@$domain}'
> MYSQL_VACATIONMESSAGE = SELECT message from vacation WHERE
> email='${quote_mysql:$local_part_prefix$local_part$local_part_suffix@$domain}'
>
> vacation:
> driver = manualroute
> route_data = ${lookup mysql{MYSQL_VACATIONEMAIL}}
> unseen
> no_expn
> no_verify
> transport = vacation_user
>
> vacation_user:
> driver = autoreply
> from = ${local_part_prefix}${local_part}${local_part_suffix}@${domain}
> subject = "Re: $h_Subject"
> text = ${lookup mysql {MYSQL_VACATIONMESSAGE} {$value} fail }
> to = $reply_address
> log =
> /var/spool/exim/vacation/${local_part_prefix}${local_part}${local_part_suffix}@${domain}.log
> user = mail
>
> If I wanted to now have a condition like:
>
> MYSQL_SENDERONVACATION = SELECT email from vacation WHERE
> email='${quote_mysql:$reply_address}' AND onvacation='yes';
>
> How could I integrate that?
>
> If some-one can show me a working example of rate-limitting replies that
> would be cool too.
>
> Please CC me on your reply.
>
> Best Regards,
> AL.
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##

--
***********************************************************
* Konrad Michels
* IT Manager
* Surfkitchen Limited
* +441189298079
***********************************************************

The information contained in this message is confidential. It is
intended solely for the use of the individual or entity to whom it is
addressed and other authorised to receive it. If the reader of this
message is not the intended recipient, you are hereby notified that any
use, copying, dissemination or disclosure of this information is
strictly prohibited. If you are not the intended recipient, please
delete it immediately and contact the sender by e-mail or telephone.
Internet e-mails are not necessarily secure. SurfKitchen accepts no
responsibility either for breaches of confidence that may arise through
the use of this medium or for changes to any e-mail which occur after
the e-mail has been sent.