[Exim] once_repeat && database lookup

Top Page
Delete this message
Reply to this message
Author: Roderick Groesbeek
Date:  
To: exim-users
Subject: [Exim] once_repeat && database lookup
Howdy,

Info:
===
My autoreply configuration boiled down to the following:

~~
begin routers

# [Unk] autoreply Router

mysql_autoresponder:
  driver        = accept
  condition     = ${lookup mysql{MYSQL_AUTOREPLY_COND}{$value}fail}
#  condition    = ${if and { \
#                           { \
#                             ${if match {   \
#                               ${lookup
mysql{MYSQL_AUTOREPLY_COND}{$value}} \
#                               } {1}  {yes} {no} } \
#                           } \
#                           { \
#                             ${if or {{match {$h_precedence:}
{(?i)junk|bulk|list}}  {eq {$sender_address} {}}} {no} {yes}} \
#                           } \
#                         } \
#                  }
   transport    = mysql_autoreply_delivery
   errors_to    = postmaster@$domain
   unseen
   no_verify
   no_expn


...

begin transports

# [Unk] autoreply
mysql_autoreply_delivery:
  driver          = autoreply
  log             = /var/log/mail/${local_part}@${domain}_autoreply_log
  once            = /var/log/mail/${local_part}@${domain}_autoreply_once_db
#  once_repeat     = 0s
  once_repeat     = ${lookup mysql{MYSQL_AUTOREPLY_ONCE_REPEAT}}
  once            = ${lookup mysql{MYSQL_AUTOREPLY_ONCE_REPEAT}}
  return_path     = ${local_part}@${domain}
  to              = ${sender_address}
  from            = ${local_part}@${domain}
  subject         = ${if match { ${lookup
mysql{MYSQL_AUTOREPLY_SUB_COND}{$value}} }{1}  { ${lookup
mysql{MYSQL_AUTOREPLY_SUB}{$value}}}{[AUTOREPLY] Re: $header_subject:}  }
  text            = ${expand: ${lookup mysql{MYSQL_AUTOREPLY_BODY}}}
  file_expand
  user            = exim
  group           = exim
~~


Now the problem is that 'once_repeat' option is not database enabled.
~~
LOG: PANIC DIE
Exim configuration error in line 487:
invalid time value for once_repeat
~~

A quick look into the source pointed me to
"transports/autoreply.c" [readonly] line 42 of 679
where 'opt_time' is enabled for this option.

~~
  { "once_repeat",       opt_time,
      (void *)offsetof(autoreply_transport_options_block, once_repeat) },
~~


The readconf_readtime is not ${lookup ...} style enabled?


Question:
=======
What do you guys recommend?
- Changing the opt_time option into some other one which *can* use ${lookup
...} and remain functionality.
- Patching some piece of source (readconf.c, etc.)
- Building multiple transport configuration parts with FIXED 'once_repeat'
values in the configuration file.


Have a nice weekend!


Vriendelijke Groet,

Roderick
--
Pettemerstraat 12A                                  T r I p l e
1823 CW Alkmaar                                         T
Tel. +31 (0)72-5129516
fax. +31 (0)72-5129520                              Automatisering
www.triple-it.nl                                 "Laat uw Net Werken!"