[Exim] Relay to 2 domains

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Paulo Henrique Baptista de Oliveira
Datum:  
To: exim-users
Betreff: [Exim] Relay to 2 domains
    Hi all,
    I have to relay from an Exim server to 2 Exchange Servers (each with a
domain).
    I have configured exim like this but it works only when I sent mail for
only one recipient.
    With 2 or more recipients it fails to send separetely for each server.
    What can be wrong?
    TIA,        Paulo Henrique



queue_only = false
split_spool_directory = false
qualify_domain = teletrim.com.br
local_domains = localhost
local_domains_include_host = true
local_domains_include_host_literals = true
relay_domains = teletrim.com.br:cbcc.com.br
relay_domains_include_local_mx = true
never_users = root
host_lookup = *
host_accept_relay = 127.0.0.1:200.160.175.241
trusted_users = mail
smtp_verify = true
gecos_pattern = ^([^,:]*)
gecos_name = $1
smtp_accept_queue_per_connection = 500
freeze_tell_mailmaster = true
received_header_text = "Received: \
         ${if def:sender_rcvhost {from ${sender_rcvhost}\n\t}\
         {${if def:sender_ident {from ${sender_ident} }}\
         ${if def:sender_helo_name {(helo=${sender_helo_name})\n\t}}}}\
         by ${primary_hostname} \
         ${if def:received_protocol {with ${received_protocol}}} \
         (Exim ${version_number} #${compile_number} (Debian))\n\t\
         id ${message_id}\
         ${if def:received_for {\n\tfor <$received_for>}}"



local_delivery:
driver = appendfile
group = mail
mode = 0660
mode_fail_narrower = false
envelope_to_add = true
file = /var/spool/mail/${local_part}

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile

address_directory:
driver = appendfile
no_from_hack
prefix = ""
suffix = ""

address_reply:
driver = autoreply

procmail_pipe:
driver = pipe
command = "/usr/bin/procmail -d ${local_part}"
return_path_add
delivery_date_add
envelope_to_add
check_string = "From "
escape_string = ">From "
user = $local_part
group = mail

remote_smtp:
driver = smtp




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


system_aliases:
driver = aliasfile
file_transport = address_file
pipe_transport = address_pipe
file = /etc/mail/$domain/aliases
search_type = lsearch



smarthost:
driver = domainlist
transport = remote_smtp
route_list = * "${if match{${lc:$header_received:}}{for
<.*@cbcc\\.com\\.br>} {www.linuxsolutions.com.br} fail}" bydns_a


smarthost:
driver = domainlist
transport = remote_smtp
route_list = * "${if match{${lc:$header_received:}}{for
<.*@teletrim\\.com\\.br>} {init.linuxsolutions.com.br} fail}" bydns_
a


smarthost:
driver = domainlist
transport = remote_smtp
route_list = * "${if match{${lc:$header_from:}}{@cbcc\\.com\\.br}
{www.linuxsolutions.com.br} fail}" bydns_a


smarthost:
driver = domainlist
transport = remote_smtp
route_list = * "${if match{${lc:$header_from:}}{@cbcc\\.com\\.br}
{www.linuxsolutions.com.br} fail}" bydns_a


smarthost:
driver = domainlist
transport = remote_smtp
route_list = * "${if match{${lc:$header_from:}}{@teletrim\\.com\\.br}
{init.linuxsolutions.com.br} fail}" bydns_a



######################################################################
#                      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
# ------               -----       -------


#*                      *           F,2h,15m; G,16h,2h,1.5; F,4d,8h






# End of Exim configuration file