[Exim] catch all in exim with mysql (the file)

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Paulo Henrique Baptista de Oliveira
Date:  
À: exim-users
Sujet: [Exim] catch all in exim with mysql (the file)
--
    Hi all,
    I'm reading the FAQ and docs at exim.org to implement catch all
emails (emails that are errors but arrive to one email account).
    I'm a little confused because I use exim+mysql and dont know where to
put the "*" caracter in lsearch?!?!
    I'm sending the directors part of my exim.conf.
    TIA,        Paulo Henrique


--
######################################################################
#                      DIRECTORS CONFIGURATION                       #
#             Specifies how local addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#   A local address is passed to each in turn until it is accepted.  #
######################################################################


# director para auto-reply
send_message:
driver = smartuser
transport = send_message
condition = "${if eq{$local_part}{${lookup mysql {MYSQL_AUTOREPLY_USER}{$value}}} {1}{0}}"
unseen

# Check if user is an alias in mysql database
# MYSQL
virtual_aliases:
driver = aliasfile
search_type = mysql
query = MYSQL_ALIAS
include_domain = true

# This allows local delivery to be forced, avoiding alias files and
# forwarding.

real_local:
prefix = real-
driver = localuser
transport = local_delivery

# This director handles aliasing using a traditional /etc/aliases file.
# If any of your aliases expand to pipes or files, you will need to set
# up a user and a group for these deliveries to run under. You can do
# this by uncommenting the "user" option below (changing the user name
# as appropriate) and adding a "group" option if necessary.

system_aliases:
driver = aliasfile
file_transport = address_file
pipe_transport = address_pipe
file = /etc/aliases
search_type = lsearch
# #user = list
# Uncomment the above line if you are running smartlist

# MYSQL
system_aliases:
driver = aliasfile
domains = LOCAL_DOMAINS
file = /etc/aliases
search_type = lsearch
# user = exim
file_transport = address_file
pipe_transport = address_pipe

# This director runs procmail for users who have a .procmailrc file

procmail:
driver = localuser
transport = procmail_pipe
require_files = ${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail
no_verify

# This director handles forwarding using traditional .forward files.
# It also allows mail filtering when a forward file starts with the
# string "# Exim filter": to disable filtering, uncomment the "filter"
# option. The check_ancestor option means that if the forward file
# generates an address that is an ancestor of the current one, the
# current one gets passed on instead. This covers the case where A is
# aliased to B and B has a .forward file pointing to A.

# For standard debian setup of one group per user, it is acceptable---normal
# even---for .forward to be group writable. If you have everyone in one
# group, you should comment out the "modemask" line. Without it, the exim
# default of 022 will apply, which is probably what you want.

#userforward:
# driver = forwardfile
# file_transport = address_file
# pipe_transport = address_pipe
# reply_transport = address_reply
# no_verify
# check_ancestor
# file = .forward
# modemask = 002
# filter

# MYSQL
userforward:
driver = forwardfile
domains = LOCAL_DOMAINS
file = .forward
no_verify
no_expn
check_ancestor
# filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply

# This director matches local user mailboxes.

#localuser:
# driver = localuser
# transport = virtual

# MYSQL
localuser:
driver = localuser
domains = LOCAL_DOMAINS
transport = local_delivery

# MYSQL
virtual_local_user:
domains = ${lookup mysql {MYSQL_USER}{$value}}
driver = smartuser
transport = virtual_delivery

virtual_forward:
driver = aliasfile
domains = lsearch;/etc/mail/dominios
condition="${if exists {/etc/mail/${domain}/forward}{yes}}"
file = /etc/mail/${domain}/forward
search_type = lsearch
user = mail
qualify_preserve_domain

# MYSQL
virtual_localuser:
driver = aliasfile
domains = lsearch;/etc/mail/dominios
transport = virtual
#file = /etc/mail/${domain}/passwd
file = /etc/passwd
search_type = lsearch

# Check for wild card match '@'@domain in mysql database
virtual_all_alias:
driver = aliasfile
search_type = mysql
query = MYSQL_ALL_ALIAS
include_domain = true

--