[Exim] Fordwardfile problem

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Manuel Molina
Data:  
Para: exim-users
Assunto: [Exim] Fordwardfile problem
Hello to all!

     I'm setting up a mail service with an openldap directory service. I
already have two directors for local delivery and alternateaddress
supported by the ldap service. I'm in trouble with the third director,
who is responsible of forwarding messages if the correct ldap field of
the user is checked (mailforwardingaddress). Please check the lines
below to see my work. Actually it seems to bypass the forward part, and
go directly to the 'local_delivery' part.
     Can anyone give me a hint of what's wrong ? (look at the 'reenvio'
director )


-------parts of configure file -------------

####    BEGIN MACROS    ####
LDAP_BASE_ALT = o=laley
LDAP_BASE = ou=${domain},o=laley
LDAP_ATTRIBUTES =
mailID,mailMessageStore,mailQuota,mailHost,mailForwardingAddress,mailAlternateAddress
LDAP_FILTER_ALT =
(&(mailAlternateAddress=${local_part}@${domain})(objectclass=mailClass)(mailStatus=1))
LDAP_FILTER =
(&(mailID=${local_part}@${domain})(objectclass=mailClass)(mailStatus=1))
####    END MACROS    ####



######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################


# A transport is used only when referenced from a director or a router
that
# successfully handles an address.


# This transport is used for delivering messages over SMTP connections.

remote_smtp:
driver = smtp

# This transport is used for local delivery to user mailboxes in
traditional
# BSD mailbox format. By default it will be run under the uid and gid of
the
# local user, and requires the sticky bit to be set on the /var/mail
directory.
# Some systems use the alternative approach of running mail deliveries
under a
# particular group instead of using the sticky bit. The commented
options below
# show how this can be done.

local_delivery:
  driver = appendfile
  maildir_format
  create_directory = true
  directory = "${extract {mailMessageStore}{${lookup ldap
{ldap:///LDAP_BASE?LDAP_ATTRIBUTES?sub?LDAP_FILTER}}}}"
  quota = "${extract {mailQuota}{${lookup ldap
{ldap:///LDAP_BASE?LDAP_ATTRIBUTES?sub?LDAP_FILTER}}}}"
  quota_warn_threshold = "90%"
  quota_warn_message = "\
                To: $local_part@$domain\n\
                Subject: [Administrativa] Aviso de cuota.\n\n\
                Este mensaje ha sido creado automaticamente \
                por el servicio de entrega de correo.\n\n\
                La ocupacion de su buzon es superior \
                al 90% de la cuota.\n\
                Para liberar espacio debe borrar algun mensaje.\n\n\
                Gracias.\n"


# file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
# group = mail
user = nobody
group = nobody
mode = 0660

# This transport is used for handling pipe deliveries generated by alias
# or .forward files. If the pipe generates any standard output, it is
returned
# to the sender of the message as a delivery error. Set
return_fail_output
# instead of return_output if you want this to happen only when the pipe
fails
# to complete normally. You can set different transports for aliases and
# forwards if you want to - see the references to address_pipe in the
directors
# section below.

address_pipe:
driver = pipe
return_output


# This transport is used for handling deliveries directly to files that
are
# generated by aliasing or forwarding.

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add


# This transport is used for handling autoreplies generated by the
filtering
# option of the forwardfile director.

address_reply:
driver = autoreply

alternate_delivery:
  driver = appendfile
  create_directory = true
  maildir_format
  directory = "${extract {mailMessageStore}{${lookup ldap
{ldap:///LDAP_BASE_ALT?LDAP_ATTRIBUTES?sub?LDAP_FILTER_ALT}}}}"
  quota = "${extract {mailQuota}{${lookup ldap
{ldap:///LDAP_BASE_ALT?LDAP_ATTRIBUTES?sub?LDAP_FILTER_ALT}}}}"
  quota_warn_threshold = "90%"
  quota_warn_message = "\
                To: $local_part@$domain\n\
                Subject: [Administrativa] Aviso de cuota.\n\n\
                Este mensaje ha sido creado automaticamente \
                por el servicio de entrega de correo.\n\n\
                La ocupacion de su buzon es superior \
                al 90% de la cuota.\n\
                Para liberar espacio debe borrar algun mensaje.\n\n\
                Gracias.\n"


# file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
# group = mail
user = nobody
group = nobody
mode = 0660





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


# Local addresses are those with a domain that matches some item in the
# "local_domains" setting above, or those which are passed back from the
# routers because of a "self=local" setting (not used in this
configuration).


# This director handles aliasing using a traditional /etc/aliases file.
#
##### NB NB You must ensure that /etc/aliases exists. It used to be the
case
##### NB NB that every Unix had that file, because it was the Sendmail
default.
##### NB NB These days, there are systems that don't have it. Your
aliases
##### NB NB file should at least contain an alias for "postmaster".
#
# 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.
Alternatively, you
# can specify "user" on the transports that are used. Note that those
# listed below are the same as are used for .forward files; you might
want
# to set up different ones for pipe and file deliveries from aliases.

##### Aqui van los directors de MMC

reenvio:
driver = forwardfile
condition = ${extract {mailForwardingAddress}{${lookup ldap
{ldap:///LDAP_BASE?LDAP_ATTRIBUTES?sub?LDAP_FILTER}}} {yes} {no}}
data = "${extract {mailForwardingAddress}{${lookup ldap
{ldap:///LDAP_BASE?LDAP_ATTRIBUTES?sub?LDAP_FILTER}}}}"
# headers_add = COMENTARIO: ${extract {mailForwardingAddress}{${lookup
ldap {ldap:///LDAP_BASE?LDAP_ATTRIBUTES?sub?LDAP_FILTER}}}} no_verify
no_expn

alterno:
driver = smartuser
condition = ${extract {mailAlternateAddress}{${lookup ldap
{ldap:///LDAP_BASE_ALT?LDAP_ATTRIBUTES?sub?LDAP_FILTER_ALT}}} {yes}
{no}}
headers_add = "${lookup ldap
{ldap:///LDAP_BASE_ALT?LDAP_ATTRIBUTES?sub?LDAP_FILTER_ALT} {COMENTARIO:
alterno $value} {COMENTARIO: alterno: no encontrado}}"
transport = alternate_delivery

entrega_local:
driver = smartuser
condition = ${if match {${extract {mailID}{${lookup ldap
{ldap:///LDAP_BASE?LDAP_ATTRIBUTES?sub?LDAP_FILTER}}}}
{^([a-zA-Z0-9._-]*)\$} {yes} {no}}}
headers_add = "${lookup ldap
{ldap:///LDAP_BASE?LDAP_ATTRIBUTES?sub?LDAP_FILTER} {COMENTARIO: entrega
local $value} {COMENTARIO: entrega local: no encontrado}}"
transport = local_delivery


-----------------------------------

     Thanks in advance,


        Manuel Molina Cuberos / http://easy.to/deluxe
        IP Sistemas           / http://www.ipsistemas.com