Re: [Exim] Exim 4.10 && Mysql && Autoreply/forward

Top Page
Delete this message
Reply to this message
Author: rgroesb
Date:  
To: masta
CC: exim-users
Subject: Re: [Exim] Exim 4.10 && Mysql && Autoreply/forward
> Roderick Groesbeek wrote:
>> This is a multi-part message in MIME format.
>> --
>> [ Picked text/plain from multipart/alternative ]
>>                             Howdy,

>>
>> Info:
>> ===
>> I'm currently implementing an e-mail server with only the users in a
>> mysql database. Now I'm a bit confused how the autoreply and forward
>> mechanism should be nicely configured/implemented.
>>


Thnx for your reply.
After reading the SPEC file, and analyzing some (most faulty) example
configurations on the net, I compiled the following working configuration.

~~
begin routers

# [Unk] autoreply Router

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


....

begin transports

# [Unk] autoreply
mysql_autoresponder_delivery:
  driver          = autoreply
  #log             = /var/log/mail/${local_part}@${domain}_vac_log
  #once            = /var/log/mail/${local_part}@${domain}_vac_once_db
  return_path     = ${local_part}@${domain}
  to              = ${sender_address}
  from            = ${local_part}@${domain}
#  subject         = ${lookup mysql{MYSQL_AUTORESP_SUB}}
#  subject         = "[AUTOREPLY] Re: ${header_subject}"
  subject         = "[AUTOREPLY]"
  text            = ${lookup mysql{MYSQL_AUTORESP_BODY}}
  file_expand
  user            = exim
  group           = exim
~~


However, I still find configuring Exim with Mysql a bit difficult, and
confusing sometimes. (Exim version >= 4.1?)
Probably because Exim is so powerfull.

Hence, trial-and-error'ing the configuration is still needed,
while I prefer analyzing-and-in-1-time-good-configuration method,
because it is more time-efficient.


For instance, some configuration parameters I would like to commit
to the exim_outgoing.conf repository, but probably will take quite
some trial-and-error are:

- Variable ($local_part, $domain, $header_*) expanding in the Mysql content
- .forward configuration (probably almost same framework as my autoreply
from above)
- Domain catch-all configuration like:
1@??? -->[database]--> /var/mysql_mail/1@???/new/...
2@??? -->[database]--> /var/mysql_mail/2@???/new/...
*@domain.nl -->[database]--> /var/mysql_mail/%@???/new/...


I'll probably come up with some working configuration after
some trial-and-error stages and implementing above wishlist.
But:
a) This will be Time-Consuming
b) This will not give me the idea that I have the perfect configuration
c) Will keep me tuning, changing, erroring an environment that should
be as messed with as less as possible.


You get my drift?


Anyway,
I hope some clarity on the exim-mysql configuration options possibilities
and the nice features, will evolve.


>
> ciao




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