Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Servers > "To" header problem Exim-Amavis-Clamscan

Forgot Password?
 Servers   Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 03-31-2004   #1 (permalink)
Linux Newbie
 
Join Date: Feb 2004
Location: India
Posts: 132
"To" header problem Exim-Amavis-Clamscan

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)
Quote:
Problem:
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 hosts 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 : ( . 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 = *

end

################################################## ####################
# 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}l search*{/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}l search*{/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


end



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


end



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

end



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

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

end



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

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

end

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
__________________
You are the one Linux!
anand is offline  



Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 06:22 AM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1