Re: [exim] once_repeat in autoreply doesn't work as it shoul…

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Arkadiusz Miskiewicz
Kopio: exim-users
Aihe: Re: [exim] once_repeat in autoreply doesn't work as it should?
On Fri, 24 Sep 2004, Arkadiusz Miskiewicz wrote:

> uservacation_transport:
>    driver = autoreply
>    group = mail
>    once = /var/mail/${local_part}/vacation.db
>    # to use a flat file instead of a db specify once_file_size
>    once_file_size = 100K
>    once_repeat = ${lookup mysql{SELECT user_res.period FROM user_res LEFT JOIN 
> user ON user.id=user_res.id WHERE user.login='${local_part}'}}

>
> user_res.period is a text field which contains strings like 0s, 3d and so one.
>
> My problem is that even when lookup yields ,,0s'' then reply isn't sent every
> time - just first one.


0s means "never repeat". The manual states this:

    However, if "once_repeat" specifies a time greater than zero, the
    message is sent if that much time has elapsed since a message was
    last sent to this recipient.


Have you tried something like 1s?

> The other is a question: is vacation.db format safe for dynamicly changing
> once_repeat value? For example it's 1d, first email arrives from address X,
> reply is sent, second email arrives from X immediately, reply is not sent,
> now once_repeat is changed to 0s, third email arrives from X - will there be
> reply sent?


The once_repeat value is not remembered. What is remembered is when the
last message was sent. When the next message arrives, the once_repeat
value is expanded and, if it is greater than zero, and that much time
has elapsed, a new message is sent. But it must be greater than zero.

-- 
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