Re: [exim] Problems with amavis and spamassassin on exim 4.3…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jens Strohschnitter
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Problems with amavis and spamassassin on exim 4.30

> I found a "big" problem in my config, using exim 4.30 with amavis
> and spamassassin 2.64.
> Infected mails will be delivered to local users, when they come
> from external servers. When I try to send a test on the local
> server to a local user, the virus will be detected and the mail
> will not be delivered.
> So what could be the missmatch of my configuration. I tried to
> test the mailing with exim -bt eximtest on local machine:
>
> eximtest@???
> router = spamcheck_director, transport = spamcheck
>
> On a system with amavis but without spamassassin the output of
> exim -bt looks like:
>
> testuser@???
> router = amavis_director, transport = amavis
>
> My exim.conf can be found on:
>
> http://home.arcor.de/kmc5ass/exim.conf
>
> Hope someone can help me to find out whats the problem of my
> config ...
>


Hi list,

I have found out that the problem seems to be a problem of
the "domains" entry.

If I set my entry from actual:

domains = lsearch;/opt/exim/data/spamcheck_domains
to
domains = ! +local_domains

the mails will be scanned for viruses. But now the mails
will not be checked for spam.

Here are my directors and routers for amavis and spam
Hope these infos will help:


begin transports

######################################################################
#                            SPAMASSASSIN                            #
######################################################################
spamcheck:
  driver = pipe
  batch_max = 100
  command = /usr/sbin/exim -oMr spam-scanned -bS
  current_directory = "/var/spool/spamd"
  home_directory = "/var/spool/spamd"
  user = mail
  group = mail
  log_output = true
  return_fail_output = true
  message_prefix =
  message_suffix =
  no_return_path_add
  transport_filter = /usr/bin/spamc
  use_bsmtp



######################################################################
#                       AMAVIS SCANMAIL                              #
######################################################################
amavis:
  driver = pipe
  check_string =
  command = "/usr/sbin/amavis -f ${sender_address} -d ${pipe_addresses}"
  current_directory = "/var/spool/amavis"
  escape_string =
  group = amavis
  headers_add = "X-Virus-Scanned: Auf Viren gescanned bei Maildurchlauf 192.168.1.2 RWZ Rhein-Main eG"
  message_prefix =
  message_suffix =
  path = "/bin:/sbin:/usr/bin:/usr/sbin"
  no_return_output
  no_return_path_add
  user = amavis


begin routers

######################################################################
#                       AMAVIS SCANMAILS                             #
######################################################################
amavis_router:
  driver = manualroute
  condition = "${if or{ {eq {$received_protocol}{scanned-ok}} \
              {eq {$received_protocol}{spam-scanned}} } {0}{1}}"
  domains = ! +local_domains
  route_list = *
  transport = amavis


######################################################################
#                            SPAMASSASSIN                            #
######################################################################
spamcheck_director:
  driver = accept
  condition = "${if and { \
                {eq \
                {${lookup{$local_part@$domain} \
                lsearch{/opt/exim/data/do_not_scan_recpt}{0}{1} \
                }}{1}} \
                { and { \
                {!def:h_X-Spam-Flag:} \
                {!eq {$received_protocol}{local}} \
                {!eq {$received_protocol}{spam-scanned}} \
                } \
                } \
                } {1}{0}}"
  domains = lsearch;/opt/exim/data/spamcheck_domains
  #domains = ! +local_domains
  retry_use_local_part
  transport = spamcheck
  no_verify
  senders = !lsearch;/opt/exim/data/do_not_scan_senders





--
Regards,

     Jens Strohschnitter


-------------------------------------
*!!!LINUX LINUX LINUX LINUX LINUX!!!*

* http://www.jens-strohschnitter.de *
-------------------------------------
Set the controls for 
         the heart of the sun
-------------------------------------