[Exim] "To" address problem Exim-Amavis-Clam

Góra strony
Delete this message
Reply to this message
Autor: Anand Renake
Data:  
Dla: exim-users
Temat: [Exim] "To" address problem Exim-Amavis-Clam
Hi,
The details:
OS - Redhat 7.3
MTA - Exim 3.36
Amavis ver: amavis-0.3.12 from amavis website.

I have setup and installed amavis with clamav support.
I have more than one virtual domains.

(i have not mentioned my hostname in this mail examples)

Whenever i send a mail the "to" address gets changed in
the mail but it reaches the destination. When i check up
with a mail client(like squirrelmail) i see:
"@my_hostname
as the "to" address.
Also when i see the mbox (i.e. inbox) file in an editor i see the "to"
address as
"username@some_virt_host.com"@my_hostname
How can i avoid this adding up of my host's name to the "to"
address?

The setup works well without amavis.
I can give more details if needed.

Please help.
Thank you.
--Anand Renake

Here is the exim configuration file.
Please note that it works perfectly without amavis and the commented
stuff cannot be uncommented since it breaks the things. Sorry to give all
details of exim, but given with good intentions.
___________________________________________________________

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


perl_startup = do '/etc/exim.pl'
dns_retry = 1


trusted_users = amavis


smtp_banner = "${primary_hostname} ESMTP Exim ${version_number} \
\#${compile_number} ${tod_full} \n\
We do not authorize the use of this system to transport unsolicited, \n\
and/or bulk e-mail."

#local_from_check = true
local_from_check = false
rfc1413_query_timeout = 2s


smtp_connect_backlog = 50
smtp_accept_max = 100

# primary_hostname =
deliver_queue_load_max = 3
receiver_verify = true
sender_verify = true
headers_sender_verify = true
auto_thaw = 1h
prohibition_message = "${lookup{$prohibition_reason}lsearch\
{/etc/eximrejects}{${expand:$value}}}"


# qualify_domain =

# qualify_recipient =

local_domains = lsearch;/etc/localdomains

message_filter = /etc/antivirus.exim
message_body_visible = 5000

receiver_verify_hosts = !127.0.0.1/8:0.0.0.0/0

# local_domains_include_host_literals

never_users = root

# host_accept_relay = localhost

host_accept_relay = +allow_address : lsearch;/etc/relayhosts : localhost

host_auth_accept_relay = *

relay_domains = lsearch;/etc/localdomains : lsearch;/etc/secondarymx

host_lookup = 0.0.0.0/0

# receiver_unqualified_hosts =
# sender_unqualified_hosts =

# rbl_domains = rbl.maps.vix.com
# rbl_domains = rbl.maps.vix.com
# rbl_domains = "blackholes.mail-abuse.org:dialups.mail-abuse.org"

# percent_hack_domains = *

#sender_host_accept = +allow_unknown:*
#sender_host_reject = +allow_unknown:lsearch*;/etc/spammers

#ignore_errmsg_errors_after = 2d
ignore_errmsg_errors_after = 1d

#timeout_frozen_after = 7d
timeout_frozen_after = 3d

tls_certificate = /etc/exim.crt
tls_privatekey = /etc/exim.key
tls_advertise_hosts = *


######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################


amavis:
driver = pipe
command = "/usr/sbin/amavis <${sender_address}> ${pipe_addresses}"
prefix =
suffix =
check_string =
escape_string =
# for debugging change return_output to true
return_output = false
return_path_add = false
user = amavis
group = amavis
path = "/bin:/sbin:/usr/bin:/usr/sbin"
current_directory = "/var/amavis"

remote_smtp:
driver = smtp
#transport_filter = "/usr/bin/outfilt"
#condition = ${if eq {$sender_address_domain}{somehost.com}{yes}{no}}


local_delivery:
driver = appendfile
file =
"${extract{5}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}}}}/m
ail/inbox"
delivery_date_add
envelope_to_add
return_path_add
user = $local_part
group = mail
mode = 0660

local_sa_delivery:
driver = appendfile
file =
"${extract{5}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}}}}/m
ail/inbox"
delivery_date_add
envelope_to_add
return_path_add
user = $local_part
group = mail
mode = 0660
transport_filter = "/usr/bin/spamc"


address_pipe:
driver = pipe
return_output

virtual_address_pipe:
driver = pipe
return_output
user = "${lookup{$domain}lsearch* {/etc/userdomains}{$value}}"
group = "${lookup{$domain}lsearch* {/etc/userdomains}{$value}}"

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

virtual_sa_userdelivery:
driver = appendfile
file =
"${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/userdomains}{$
value}}}lsearch{/etc/passwd}{$value}}}}/mail/${domain}/${local_part}/inbox"
quota = "${if
exists{${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/u
serdomains}{$value}}}lsearch{/etc/passwd}{$value}}}}/etc/${domain}/quota}
{${loo
kup{$local_part}lsearch*{${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc

/userdomains}{$value}}}lsearch{/etc/passwd}{$value}}}}/etc/${domain}/quota}{$val

ue}}} {}}"
delivery_date_add
envelope_to_add
return_path_add
user = "${lookup{$domain}lsearch* {/etc/userdomains}{$value}}"
group = mail
transport_filter = "/usr/bin/spamc"
mode = 0660

virtual_userdelivery:
driver = appendfile
file =
"${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/userdomains}{$
value}}}lsearch{/etc/passwd}{$value}}}}/mail/${domain}/${local_part}/inbox"
quota = "${if
exists{${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/u
serdomains}{$value}}}lsearch{/etc/passwd}{$value}}}}/etc/${domain}/quota}
{${loo
kup{$local_part}lsearch*{${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc

/userdomains}{$value}}}lsearch{/etc/passwd}{$value}}}}/etc/${domain}/quota}{$val

ue}}} {}}"
delivery_date_add
envelope_to_add
return_path_add
user = "${lookup{$domain}lsearch* {/etc/userdomains}{$value}}"
group = mail
mode = 0660


address_reply:
driver = autoreply





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


#spam_filter:
# driver = forwardfile
# file = /etc/spam.filter
# no_check_local_user
# no_verify
# filter
# allow_system_actions

amavis_director:
condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
driver = smartuser
transport = amavis
# verify must be set to false, to avoid troubles with receiver and/or
# sender verify
verify = false


central_filter:
driver = forwardfile
file = /etc/vfilters/${domain}
no_check_local_user
no_verify
filter
file_transport = address_file
pipe_transport = virtual_address_pipe

virtual_aliases_nostar:
         driver = aliasfile
        file = /etc/valiases/$domain
        search_type = lsearch
        include_domain = true
        optional = true
        group = mail
        file_transport = address_file
        pipe_transport = virtual_address_pipe
        unseen


virtual_sa_user:
        driver = aliasfile
        transport = virtual_sa_userdelivery
        file =
"${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/userdoma
ins}{$value}}}lsearch{/etc/passwd}{$value}}}}/etc/${domain}/passwd"
        domains = lsearch;/etc/userdomains
        optional = true
        search_type = lsearch
        group = mail
        condition = "${perl{checksa}{$domain}}"


virtual_user:
        driver = aliasfile
        transport = virtual_userdelivery
        file =
"${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/userdoma
ins}{$value}}}lsearch{/etc/passwd}{$value}}}}/etc/${domain}/passwd"
        domains = lsearch;/etc/userdomains
        optional = true
        search_type = lsearch
        group = mail




virtual_aliases:
         driver = aliasfile
        file = /etc/valiases/$domain
        search_type = lsearch*
        include_domain = true
        optional = true
        group = mail
        file_transport = address_file
        pipe_transport = virtual_address_pipe


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

sa_localuser:
driver = localuser
transport = local_sa_delivery
condition = "${perl{checkusersa}{$local_part}}"


localuser:
driver = localuser
transport = local_delivery


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


# This director matches local user mailboxes.





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


amavis_router:
condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
driver = domainlist
route_list = "*"
transport = amavis
# verify must be set to false, to avoid troubles with receiver and/or
# sender verify
verify = false

lookuphost:
  driver = lookuphost
  transport = remote_smtp
headers_add = "X-AntiAbuse: This header was added to track abuse, please
include
 it with any abuse report\n\
               X-AntiAbuse: Primary Hostname - $primary_hostname\n\
               X-AntiAbuse: Original Domain - $original_domain\n\
               X-AntiAbuse: Originator/Caller UID/GID - [$originator_uid
$origin
ator_gid] / [$caller_uid $caller_gid]\n\
               X-AntiAbuse: Sender Address Domain -
$sender_address_domain\n"
        condition = "${perl{checkspam}}"


literal:
  driver = ipliteral
  transport = remote_smtp
headers_add = "X-AntiAbuse: This header was added to track abuse, please
include
 it with any abuse report\n\
               X-AntiAbuse: Primary Hostname - $primary_hostname\n\
               X-AntiAbuse: Original Domain - $original_domain\n\
               X-AntiAbuse: Originator/Caller UID/GID - [$originator_uid
$origin
ator_gid] / [$caller_uid $caller_gid]\n\
               X-AntiAbuse: Sender Address Domain - $sender_address_domain"
        condition = "${perl{checkspam}}"





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


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





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


# There are no rewriting specifications in this default configuration file.


fixed_plain:
driver = plaintext
public_name = PLAIN
server_condition = "${perl{checkuserpass}{$1}{$2}{$3}}"
server_set_id = $1

fixed_login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${perl{checkuserpass}{$1}{$2}}"
server_set_id = $1
# End of Exim configuration file