Re: [exim] how to detect if address aliased?

Etusivu
Poista viesti
Vastaa
Lähettäjä: Giuliano Gavazzi
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] how to detect if address aliased?

On Sat, 10 Dec 2005, Jakob Hirsch wrote:

>
> Could you post your routers section?
>


sorry, it's a bit of a mess, but I post it anyway (this is not on a
production server!)

I include the transport section too. (I should include also some ACLs,
the ones for local sender verification)

Thanks

begin routers

dnslookup:
    driver = dnslookup
    domains = ! +local_domains
    transport = remote_smtp
    address_data = $sender_address
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 169.254.0.0/16 :
192.168.0.0/16
    headers_remove = X-Sender : X-X-Sender
    no_more



# The remaining routers handle addresses in the local domain(s).




# aliases/allowed addresses are in DOMAINS_DIR/$domain/alias
# and GLOBAL_DIR/alias.


# domain aliases, for optionally suffixed local_parts
system_aliases_unspec:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{DOMAINS_DIR/$domain/alias}}
domains = +local_domains
file_transport = address_file
pipe_transport = address_pipe

# domain aliases, catch all suffixes
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{DOMAINS_DIR/$domain/alias}}
domains = +local_domains
file_transport = address_file
pipe_transport = address_pipe

# common aliases
system_aliases_global:
    driver = redirect
    allow_fail
    allow_defer
    data = ${lookup{$local_part}lsearch{GLOBAL_DIR/alias}}
    domains = +local_domains
    local_part_suffix_optional
    local_part_suffix = -* : +*
    file_transport = address_file
    pipe_transport = address_pipe



# check auth id is consistent with declared sender
local_sender_verify:
    driver = redirect
    verify_only
    verify_sender
    allow_fail
    allow_defer
    data = $authenticated_id
    local_part_suffix_optional
    local_part_suffix = -* : +*
    domains = +local_domains
    condition = ${if eq{$local_part}{$authenticated_id}{no}{yes}}
    fail_verify_sender



# in all the following routers I should check that the luser is the
# RHS of an alias and decline otherwise
userforward:
    driver = redirect
    domains = +local_domains
    user = $local_part
    check_local_user
    file = $home/.forward
    no_verify
    no_expn
    check_ancestor
    local_part_suffix_optional
    local_part_suffix = -* : +*
    file_transport = address_file
    pipe_transport = address_pipe
    reply_transport = address_reply




#this router does a system level per recipient filtering
#essentially just copying the file to a backup address
# ***unused now***, but it is the one who already uses address_data
central_filter:
    driver = redirect
    address_data = $sender_address
    errors_to = root@MAINDOMAIN
    local_part_suffix_optional
    local_part_suffix = -* : +*
    check_local_user
    check_owner = false
    domains = +local_domains
    file = FILTERS_DIR/$local_part
    no_verify
    allow_filter
    allow_freeze




# vacation message
uservacation:
driver = redirect
allow_filter
hide_child_in_errmsg
ignore_eacces
ignore_enotdir
reply_transport = vacation_reply
no_verify
domains = +local_domains
check_owner = false
user = smmsp
require_files = $home/.vacation/vacation.txt
file = FILTERS_DIR/_vacation/_vacation
group = mail
unseen



# This router matches local user mailboxes
# here I explicitly check they are RHS
# ***** PROBLEM this does not allow global aliases
# and does something already done by some alias router

localuser:
 driver = accept
 check_local_user
 domains = +local_domains
 condition = ${lookup{${if match
{$original_local_part}{\N([^-+@]+)\N}{$1}fail}}\
        lsearch{DOMAINS_DIR/$original_domain/alias}{yes}{no}}
 local_part_suffix_optional
 local_part_suffix = -* : +*
 transport = local_delivery
 address_data = $sender_address
 headers_remove =
X-Spam-Report:X-Spam-Score:X-Spam-Score-Int:X-XPoint-AntiAbuse:X-Spam-Status:X-Spam-Level:X-Spam-Checker-Version:X-Fortune:X-Disclaimer






begin transports


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

remote_smtp:
    driver = smtp
    return_path = $address_data
    interface = OUTINTERFACE
    command_timeout = 8m



local_delivery:
    driver = appendfile
      user = $local_part
    group = mail
    return_path = $address_data
    mode_fail_narrower = false
    delivery_date_add
    envelope_to_add
    return_path_add
    directory = $home/Maildir
    maildir_format
    mode = 0660



address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add


address_reply:
driver = autoreply

vacation_reply:
driver = autoreply