[Exim] amavis (and spamassassin) and exim4 - mail not delive…

Top Page
Delete this message
Reply to this message
Author: Wolfgang.Fuertbauer
Date:  
To: exim-users
Subject: [Exim] amavis (and spamassassin) and exim4 - mail not delivered
I ran into some troubles while implementing amavis with
exim 4.01 and spamassassin:

before adding amavis (spamassassin was already there) it worked as
expected.
after adding the amavis sections, mail is not delivered;

what is my fault? please help

Thanks
Wolfgang

# sendmail -v wolfgang.fuertbauer@???
From: Wolfgang.fuertbauer@???
To: wolfgang.fuertbauer@???
Subject: Test

test
LOG: MAIN
<= root@??? U=root P=local S=312
linux-test:/tmp/amavis-perl-11 # LOG: MAIN
=> wolfgang.fuertbauer <wolfgang.fuertbauer@???> R=amavis_router
T=amavis
LOG: MAIN
Completed

Mainlog-example (from the above mail):
2002-03-19 11:40:33 16nH2K-0000uB-00 <= root@??? U=root P=local S=312
2002-03-19 11:40:35 16nH2h-0000uK-00 <= root@??? U=amavis P=scanned-ok
S=498 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:35 16nH2K-0000uB-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:35 16nH2K-0000uB-00 Completed
2002-03-19 11:40:37 16nH2j-0000uU-00 <= root@??? U=amavis P=scanned-ok
S=649 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:37 16nH2h-0000uK-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:37 16nH2h-0000uK-00 Completed
2002-03-19 11:40:39 16nH2l-0000ue-00 <= root@??? U=amavis P=scanned-ok
S=800 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:39 16nH2j-0000uU-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:39 16nH2j-0000uU-00 Completed
2002-03-19 11:40:41 16nH2n-0000uo-00 <= root@??? U=amavis P=scanned-ok
S=951 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:41 16nH2l-0000ue-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:41 16nH2l-0000ue-00 Completed
2002-03-19 11:40:43 16nH2p-0000uy-00 <= root@??? U=amavis P=scanned-ok
S=1102 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:43 16nH2n-0000uo-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:43 16nH2n-0000uo-00 Completed
2002-03-19 11:40:45 16nH2r-0000v8-00 <= root@??? U=amavis P=scanned-ok
S=1253 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:45 16nH2p-0000uy-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:45 16nH2p-0000uy-00 Completed
2002-03-19 11:40:47 16nH2t-0000vI-00 <= root@??? U=amavis P=scanned-ok
S=1404 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:47 16nH2r-0000v8-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:47 16nH2r-0000v8-00 Completed
2002-03-19 11:40:49 16nH2v-0000vS-00 <= root@??? U=amavis P=scanned-ok
S=1555 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:49 16nH2t-0000vI-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:49 16nH2t-0000vI-00 Completed
2002-03-19 11:40:51 16nH2x-0000vc-00 <= root@??? U=amavis P=scanned-ok
S=1706 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:51 16nH2v-0000vS-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:51 16nH2v-0000vS-00 Completed
2002-03-19 11:40:53 16nH2z-0000vm-00 <= root@??? U=amavis P=scanned-ok
S=1857 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:53 16nH2x-0000vc-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:53 16nH2x-0000vc-00 Completed
2002-03-19 11:40:55 16nH31-0000vw-00 <= root@??? U=amavis P=scanned-ok
S=2008 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:55 16nH2z-0000vm-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:55 16nH2z-0000vm-00 Completed
2002-03-19 11:40:58 16nH34-0000w6-00 <= root@??? U=amavis P=scanned-ok
S=2159 id=E16nH2K-0000uB-00@???
2002-03-19 11:40:58 16nH31-0000vw-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:40:58 16nH31-0000vw-00 Completed
2002-03-19 11:41:00 16nH36-0000wG-00 <= root@??? U=amavis P=scanned-ok
S=2310 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:00 16nH34-0000w6-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:00 16nH34-0000w6-00 Completed
2002-03-19 11:41:02 16nH38-0000wQ-00 <= root@??? U=amavis P=scanned-ok
S=2461 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:02 16nH36-0000wG-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:02 16nH36-0000wG-00 Completed
2002-03-19 11:41:04 16nH3A-0000wa-00 <= root@??? U=amavis P=scanned-ok
S=2612 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:04 16nH38-0000wQ-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:04 16nH38-0000wQ-00 Completed
2002-03-19 11:41:06 16nH3C-0000wk-00 <= root@??? U=amavis P=scanned-ok
S=2763 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:06 16nH3A-0000wa-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:06 16nH3A-0000wa-00 Completed
2002-03-19 11:41:08 16nH3E-0000wu-00 <= root@??? U=amavis P=scanned-ok
S=2914 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:08 16nH3C-0000wk-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:08 16nH3C-0000wk-00 Completed
2002-03-19 11:41:10 16nH3G-0000x4-00 <= root@??? U=amavis P=scanned-ok
S=3065 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:10 16nH3E-0000wu-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:10 16nH3E-0000wu-00 Completed
2002-03-19 11:41:12 16nH3I-0000xE-00 <= root@??? U=amavis P=scanned-ok
S=3216 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:12 16nH3G-0000x4-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:12 16nH3G-0000x4-00 Completed
2002-03-19 11:41:14 16nH3K-0000xP-00 <= root@??? U=amavis P=scanned-ok
S=3367 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:14 16nH3I-0000xE-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:14 16nH3I-0000xE-00 Completed
2002-03-19 11:41:16 16nH3M-0000xZ-00 <= root@??? U=amavis P=scanned-ok
S=3518 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:16 16nH3K-0000xP-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:16 16nH3K-0000xP-00 Completed
2002-03-19 11:41:18 16nH3O-0000xj-00 <= root@??? U=amavis P=scanned-ok
S=3669 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:18 16nH3M-0000xZ-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:18 16nH3M-0000xZ-00 Completed
2002-03-19 11:41:20 16nH3Q-0000xt-00 <= root@??? U=amavis P=scanned-ok
S=3820 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:20 16nH3O-0000xj-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:20 16nH3O-0000xj-00 Completed
2002-03-19 11:41:23 16nH3T-0000y3-00 <= root@??? U=amavis P=scanned-ok
S=3971 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:23 16nH3Q-0000xt-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:23 16nH3Q-0000xt-00 Completed
2002-03-19 11:41:25 16nH3V-0000yD-00 <= root@??? U=amavis P=scanned-ok
S=4122 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:25 16nH3T-0000y3-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:25 16nH3T-0000y3-00 Completed
2002-03-19 11:41:27 16nH3X-0000yN-00 <= root@??? U=amavis P=scanned-ok
S=4273 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:27 16nH3V-0000yD-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:27 16nH3V-0000yD-00 Completed
2002-03-19 11:41:29 16nH3Z-0000yX-00 <= root@??? U=amavis P=scanned-ok
S=4424 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:29 16nH3X-0000yN-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:29 16nH3X-0000yN-00 Completed
2002-03-19 11:41:31 16nH3b-0000yh-00 <= root@??? U=amavis P=scanned-ok
S=4575 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:31 16nH3Z-0000yX-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:31 16nH3Z-0000yX-00 Completed
2002-03-19 11:41:33 16nH3d-0000yr-00 <= root@??? U=amavis P=scanned-ok
S=4726 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:33 16nH3b-0000yh-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:33 16nH3b-0000yh-00 Completed
2002-03-19 11:41:35 16nH3f-0000z1-00 <= root@??? U=amavis P=scanned-ok
S=4877 id=E16nH2K-0000uB-00@???
2002-03-19 11:41:35 16nH3d-0000yr-00 => wolfgang.fuertbauer
<wolfgang.fuertbauer@???> R=amavis_router T=amavis
2002-03-19 11:41:35 16nH3d-0000yr-00 Completed
2002-03-19 11:41:35 16nH3f-0000z1-00 ** wolfgang.fuertbauer@???: Too
many "Received" headers - suspected mail loop
2002-03-19 11:41:35 16nH3f-0000z4-00 <= <> R=16nH3f-0000z1-00 U=exim
P=local S=5671
2002-03-19 11:41:35 16nH3f-0000z1-00 Completed
2002-03-19 11:41:37 16nH3f-0000z4-00 ** root@??? R=amavis_router
T=amavis: Child process of amavis transport returned 255 (could mean shell
command ended by signal 127 (Unknown signal 127)) from command:
/usr/sbin/amavis
2002-03-19 11:41:37 16nH3f-0000z4-00 Frozen (delivery error message)


tried to implement it as follows:

######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
#     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
# An address is passed to each router in turn until it is accepted.  #
######################################################################


begin routers

amavis_router:
#driver = domainlist
driver = accept
condition = "${if eq {received-protocol}{scanned-ok} {0}{1}}"
# route_list = "*"
transport = amavis

spamcheck_router:
driver = accept
condition = "${if eq {$received_protocol}{spam-scanned} {0}{1}}"
retry_use_local_part
transport = spamcheck


# This router routes to remote hosts over SMTP by explicit IP address,
# when an email address is given in "domain literal" form, for example,
# <user@???>. The RFCs require this facility. However, it is
# little-known these days, and has been exploited by evil people seeking
# to abuse SMTP relays. Consequently it is commented out in the default
# configuration. If you uncomment this router, you also need to uncomment
# allow_domain_literals above, so that Exim can recognize the syntax of
# domain literal addresses.

# domain_literal:
# driver = ipliteral
# transport = remote_smtp


# This router routes addresses that are not in local domains by doing a DNS
# lookup on the domain name. Any domain that resolves to a loopback
interface
# address (127.0.0.0/8) is treated as if it had no DNS entry. If the DNS
# lookup fails, no further routers are tried because of the no_more
setting,
# and consequently the address is unrouteable.

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 127.0.0.0/8
no_more

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################


# A transport is used only when referenced from a router that successfully
# handles an address.

begin transports

# This transport is used for delivering messages over SMTP connections.

remote_smtp:
driver = smtp


# This transport is used for local delivery to user mailboxes in
traditional
# BSD mailbox format. By default it will be run under the uid and gid of
the
# local user, and requires the sticky bit to be set on the /var/mail
directory.
# Some systems use the alternative approach of running mail deliveries
under a
# particular group instead of using the sticky bit. The commented options
below
# show how this can be done.

local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
# group = mail
# mode = 0660


# This transport is used for handling pipe deliveries generated by alias or
# .forward files. If the pipe generates any standard output, it is returned
# to the sender of the message as a delivery error. Set return_fail_output
# instead of return_output if you want this to happen only when the pipe
fails
# to complete normally. You can set different transports for aliases and
# forwards if you want to - see the references to address_pipe in the
routers
# section above.

address_pipe:
driver = pipe
return_output


# This transport is used for handling deliveries directly to files that are
# generated by aliasing or forwarding.

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

# This transport is used for handling autoreplies generated by the
filtering
# option of the userforward router.

address_reply:
driver = autoreply

amavis:
driver = pipe
check_string =
command = "/usr/sbin/amavis -f ${sender_address} -d ${pipe_addresses}"
current_directory = "/var/amavis"
escape_string =
user = amavis
group = amavis
message_prefix =
message_suffix =
path = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
no_return_output
no_return_path_add
# for debugging change return_output to true

spamcheck:
driver = pipe
check_string =
command = "/usr/local/bin/spamcheck.pl ${sender_address}
${pipe_addresses}"
current_directory = "/tmp"
escape_string =
user = exim
group = exim
message_prefix =
message_suffix =
path = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
no_return_output
no_return_path_add
# for debugging change return_output to true

mfG

----------------------------------------------------------
Wolfgang Fuertbauer,          wolfgang.fuertbauer@???
c/o EBEWE Pharma Ges.m.b.H Nfg.KG   Tel: +43 7665 8123 315
Mondeseestrasse 11                  Fax: +43 7665 8123 11
4866 Unterach, Austria