Domain Hiding - 1.58 vs 0.52

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Lee McLoughlin
Dátum:  
Címzett: exim-users
Tárgy: Domain Hiding - 1.58 vs 0.52
I've just tried to upgrade from my somewhat pre-historic 0.52 to the new
wizzo 1.58.

However the rules I was using to do domain re-writing no longer work.

The basic local setup has user mailboxes on a variety of hosts inside
doc.ic.ac.uk.  All local hosts share an aliases file with entries like
    lmjm: lmjm@???
so we know where really to send email.


However as far as both internal and external users are concerned they
should only ever see
    lmjm@???
the local host should not appear in the either the headers or any SMTP
envelope.


Under 0.52 this was all fairly easy to do with the attached configure
file (configure-0.52).

However this fails under 1.58. With the same configure file 1.58 thinks
that all local mail should be delivered on the local host! I'm guessing
it is applying the rewrite rules to the result of the alias lookup?

I've tried a variety of combinations and I can get pretty close but none
do all that I need (BTW how do you turn off Envelope-To: given that the
documented variable for doing it doesn't appear to work?)  I've attached
a config' file (configure-1.58-almost) that rewrites everything but To
fields in the envelope.  A test like:
    Mail lmjm@???
sends the message to triumph under 1.58 using configure-1.58-almost. 
Under 0.52 the message was, correctly, sent to swan.  BTW If I add
rewriting To fields then exim goes back to trying to deliver mail on the
local machine.


Sincerely puzzled
    Lee.

######################################################################
#                  Runtime configuration file for Exim               #
######################################################################



# This file is divided into several parts, all but the last of which are
# terminated by a line containing the word "end". The parts must appear
# in the correct order, and all must be present (even if some of them are
# in fact empty). Blank lines, and lines starting with # are ignored.



######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################


# Specify your host's canonical name here. If this option is not set, the
# uname() function is called to obtain the name.

#primary_hostname = epochal.doc.ic.ac.uk

# Specify the domain you want to be added to all unqualified addresses
# here. If this option is not set, the primary_hostname value is used.

qualify_domain = doc.ic.ac.uk

# If you want unqualified recipient addresses to be qualified with a different
# domain to unqualified sender addresses, specify the recipient domain here.
# If this option is not set, the qualify_domain value is used.

# qualify_recipient =

# Specify your local domains as a colon-separated list here. If this option
# is not set, the qualify_recipient value is used as the only local domain.
# If you do not want to do any local deliveries, uncomment the following line,
# but do not supply any data for it.

local_domains = "doc.ic.ac.uk"

# Implicitly add the hostname to the value of local_domains

local_domains_include_host


# No local deliveries will never be run under the uids of these users.

# Dont use this. Root might want mail !
# never_users = root

# These can submit mail without a full domain name
receiver_unqualified_nets = 146.169.0.0/255.255.0.0:155.198.0.0/255.255.0.0
sender_unqualified_nets = 146.169.0.0/255.255.0.0:155.198.0.0/255.255.0.0

# Allow a fair bit of simultaneous incoming mail!
smtp_accept_max=20

# Make sure *everything* gets a look-in once a day
auto_thaw = 24h

# Try 5 times to find a user (there is a built in 1 sec pause between tries)
finduser_retries = 5

end



######################################################################
#                      TRANPORTS CONFIGURATION                       #
######################################################################


# This transport is used for local delivery to user mailboxes.

local_delivery:
driver = appendfile;
file = /var/spool/mail/${local_part}

# This transport is used for handling pipe addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file.

address_pipe:
driver = pipe;
ignore_status,
return_output

# This transport is used for handling file addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file.

address_file:
driver = appendfile

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

smtp:
driver = smtp

end



######################################################################
#                      DIRECTORS CONFIGURATION                       #
######################################################################


# This director handles aliasing using a traditional /etc/aliases file.

system_aliases:
driver = aliasfile;
# file = /etc/aliases,
# search_type = dbm
file = mail.aliases,
search_type = nis0

# This director handles forwarding using traditional ~/.forward files.

userforward:
no_verify,
driver = forwardfile;
check_local_user,
seteuid,
file = .forward
filter

# This director matches local user mailboxes.

localuser:
driver = localuser,
transport = local_delivery;

end



######################################################################
#                      ROUTERS CONFIGURATION                         #
######################################################################


# This router routes to remote hosts over SMTP using a DNS lookup with
# default options.

lookuphost:
driver = lookuphost,
transport = smtp;

end



######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################


# This single retry rule applies to all domains and all errors. It specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 2 hours and increasing each time by a factor of 1.5, up to 16
# hours, then retries every 8 hours until 4 days have passed since the first
# failed delivery.

# Domain        Error        Retries
# ------        -----        -------


# This domain is the main cause of vast backlogs!
#*.ir            *        F,2h,15m; G,12h,2h,1.5; F,1d,8h
# Retrying more often should help them get rejected faster.
*.ir                    *               F,1d,15m


# Everyone else gets the default described above.
*            *        F,2h,15m; G,16h,2h,1.5; F,4d,8h


end



######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################


# Remove any leading (sub)-domain eg:    @triumph.doc.ic.ac.uk:user@???
#            convert to:    user@???
^@([^\.]*\.)?.doc.ic.ac.uk:(.*)$    $2
#
# If a sub-domain is given, eg:     user@???
#               convert to:    user@???
^(..*)@([^\.]*).doc.ic.ac.uk        $1@???
#
# If a no domain is given, eg:         user@triumph
#               convert to:    user@???
^([^@][^@]*)@([^\.]*)$            $1@???
#
# If a no domain is given, eg:         user
#               convert to:    user@???
^([^@][^@]*)$                $1@???


# End of Exim configuration file
######################################################################
#                  Runtime configuration file for Exim               #
######################################################################



# This file is divided into several parts, all but the last of which are
# terminated by a line containing the word "end". The parts must appear
# in the correct order, and all must be present (even if some of them are
# in fact empty). Blank lines, and lines starting with # are ignored.



######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################


# Specify your host's canonical name here. If this option is not set, the
# uname() function is called to obtain the name.

#primary_hostname = epochal.doc.ic.ac.uk

# Specify the domain you want to be added to all unqualified addresses
# here. If this option is not set, the primary_hostname value is used.

qualify_domain = doc.ic.ac.uk

# If you want unqualified recipient addresses to be qualified with a different
# domain to unqualified sender addresses, specify the recipient domain here.
# If this option is not set, the qualify_domain value is used.

# qualify_recipient =

# Specify your local domains as a colon-separated list here. If this option
# is not set, the qualify_recipient value is used as the only local domain.
# If you do not want to do any local deliveries, uncomment the following line,
# but do not supply any data for it.

local_domains = "doc.ic.ac.uk"

# Implicitly add the hostname to the value of local_domains

local_domains_include_host


# No local deliveries will never be run under the uids of these users.

# Dont use this. Root might want mail !
# never_users = root

# These can submit mail without a full domain name
receiver_unqualified_nets = 146.169.0.0/255.255.0.0:155.198.0.0/255.255.0.0
sender_unqualified_nets = 146.169.0.0/255.255.0.0:155.198.0.0/255.255.0.0

# Allow a fair bit of simultaneous incoming mail!
smtp_accept_max=20

# Make sure *everything* gets a look-in once a day
auto_thaw = 24h

# Try 5 times to find a user (there is a built in 1 sec pause between tries)
finduser_retries = 5

end



######################################################################
#                      TRANPORTS CONFIGURATION                       #
######################################################################


# This transport is used for local delivery to user mailboxes.

local_delivery:
driver = appendfile;
file = /var/spool/mail/${local_part},
envelope_to_add

# This transport is used for handling pipe addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file.

address_pipe:
driver = pipe;
ignore_status,
return_output

# This transport is used for handling file addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file.

address_file:
driver = appendfile;
envelope_to_add

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

smtp:
driver = smtp

end



######################################################################
#                      DIRECTORS CONFIGURATION                       #
######################################################################


# This director handles aliasing using a traditional /etc/aliases file.

system_aliases:
driver = aliasfile;
file = /etc/aliases,
search_type = lsearch
# file = mail.aliases,
# search_type = nis0

# This director handles forwarding using traditional ~/.forward files.

userforward:
no_verify,
driver = forwardfile;
check_local_user,
seteuid,
file = .forward
filter

# This director matches local user mailboxes.

localuser:
driver = localuser,
transport = local_delivery;

end



######################################################################
#                      ROUTERS CONFIGURATION                         #
######################################################################


# This router routes to remote hosts over SMTP using a DNS lookup with
# default options.

lookuphost:
driver = lookuphost,
transport = smtp;

end



######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################


# This single retry rule applies to all domains and all errors. It specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 2 hours and increasing each time by a factor of 1.5, up to 16
# hours, then retries every 8 hours until 4 days have passed since the first
# failed delivery.

# Domain        Error        Retries
# ------        -----        -------


# This domain is the main cause of vast backlogs!
#*.ir            *        F,2h,15m; G,12h,2h,1.5; F,1d,8h
# Retrying more often should help them get rejected faster.
*.ir                    *               F,1d,15m


# Everyone else gets the default described above.
*            *        F,2h,15m; G,16h,2h,1.5; F,4d,8h


end



######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################


# Remove any leading (sub)-domain eg:    @triumph.doc.ic.ac.uk:user@???
#            convert to:    user@???
^@([^\.]*\.)?.doc.ic.ac.uk:(.*)$    $2            hF
#
# If a sub-domain is given, eg:     user@???
#               convert to:    user@???
^(..*)@([^\.]*).doc.ic.ac.uk        $1@???        hF
#
# If a no domain is given, eg:         user@triumph
#               convert to:    user@???
^([^@][^@]*)@([^\.]*)$            $1@???        hF
#
# If a no domain is given, eg:         user
#               convert to:    user@???
^([^@][^@]*)$                $1@???        hF


# End of Exim configuration file