Exim routing problems

marcster

New member
Joined
Feb 3, 2011
Messages
1
Hello there,

i'm trying to properly set up a virtual debian lenny machine with exim4/sa-exim/amavisd-new/clamav. but i have some problems in configuring the correct routing with amavis.

this linux-relay should scan all incoming mails for malware and spam and forward them to an exchange-server.
currently i'm using sa-exim (which is working pretty decent) for spamchecking the incoming mails. i'd like to use amavisd-new/clamav for malwarechecking.

right now only the mails to [email protected] are transported by amavis, not the incoming mails to other recipients.. these are routed via the internal router. they are even scanned 2x by sa-exim then.
i dunno why this is happening.

when i uncomment to domains = +local_domains in the amavisd-new routers-section of my exim4.conf are all mails are transported by amavis but not properly checked by clamav.

well i thought i set the rights properly:
my /etc/group:

amavis:x:119:clamav,exim,amavis,Debian-eximsrv-spam

>srv-spam:/var/tmp# ls -al
>srw-rw-rw- 1 amavis amavis 0 25. Jan 07:47 clamav.socket

i think i've read way too many tutorials by now. i'm pretty confused. Any help is greatly appreciated.

thank you in advance for helping a noob.

>exim4 -bt
>[email protected]
>router = amavis, transport = amavis
>host localhost [127.0.0.1]
>[email protected]
>router = internal, transport = remote_smtp
>host servername.localdomainname.local [172.16.0.2]

this is my exim4.conf:
Code:
############# INITIAL SETTINGS ######################

# set some defaults values and read in config files #

#####################################################
.include /etc/exim4/exim-local-settings.txt

# If you are running exim4-daemon-heavy or a custom version of Exim that
# was compiled with the content-scanning extension, you can cause incoming
# messages to be automatically scanned for viruses. You have to modify the
# configuration in two places to set this up. The first of them is here,
# where you define the interface to your scanner. This example is typical
# for ClamAV; see the manual for details of what to set for other virus
# scanners. The second modification is in the acl_check_data access
# control list.

av_scanner =clamd: /var/tmp/clamav.socket   
local_interfaces = 0.0.0.0.25 : 127.0.0.1.10025
local_scan_path = /usr/lib/exim4/local_scan/sa-exim.so

domainlist relay_to_domains = /etc/exim4/exim-accept-from-this-list-of-domains.txt

hostlist relay_from_hosts = /etc/exim4/exim-accept-from-this-list-of-ip-adresses.txt


domainlist local_domains =

acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data

trusted_users = exim
trusted_groups = exim

never_users = root


############# ACCEPT SETTINGS #######################

# set rules for accepting messages here #

#####################################################
begin acl
acl_check_rcpt:
accept hosts = :
deny local_parts = ^.*[@%!/|] : ^\\.
accept local_parts = postmaster
domains = +local_domains
accept domains = +relay_to_domains
endpass
deny message = DNSBL listed at $dnslist_domain\n$dnslist_text
dnslists = zen.spamhaus.org:bl.spamcop.net:cbl.abuseat.org:psbl.surriel.com
message = relay not permitted at this server
verify = recipient
accept hosts = +relay_from_hosts
deny message = relay not permitted at this server
accept

#############ACL / DATA-Part##################
acl_check_data:
#CLam-AV

warn    message = This message contains a virus or other harmful content ($malware_name)
demime = *
malware = *

#alles Andere durchlassen

accept
############# ROUTER SETTINGS #######################

# set rules for selecting a transport #

#####################################################

begin routers

amavis:
driver = manualroute
condition = "${if eq {$interface_port}{10025} {0}{1}}"
# if scanning incoming mails, uncomment the following line and
# change local_domains accordingly
# domains = +local_domains
transport = amavis
route_list = "* localhost byname"
self = send

redirect:
driver = redirect
data = ${lookup{$local_part@$domain}lsearch{/etc/exim4/exim-redirect-mail-for-this-list-of-users.txt}}

internal:
driver = manualroute
domains = +relay_to_domains
transport = remote_smtp
route_data = ${lookup{$domain}partial-lsearch{/etc/exim4/exim-deliver-mail-to-these-servers.txt}}


dnslookup_relay_to_domains:
debug_print = "R: dnslookup_relay_to_domains for $local_part@$domain"
driver = dnslookup
domains = ! +local_domains : +relay_to_domains
transport = remote_smtp
same_domain_copy_routing = yes
no_more


############# TRANSPORT SETTINGS ####################

# set rules for delivery transports #

#####################################################
begin transports

remote_smtp:
driver = smtp

amavis:
driver = smtp
port = 10024
allow_localhost
 
I'm guessing you're in the wrong place. DirectAdmin forums are generally used by people who run DirectAdmin webhosting server administration software. It appears from your included exim4.conf file that you do not run our exim configuration.

Jeff
 
Back
Top