[Exim] amavis - endless loop in condition ?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Yves Thommes
Date:  
À: exim-users
Sujet: [Exim] amavis - endless loop in condition ?
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hi


I got probably a problem with a condition in my amavis_router

I tried to setup an amavis router which allows my users to specify if
they want their mail to be scanned or not using a mysql table. Somebody
helped me already this morning to get the condition finally working.

But now I realized that when a user has enabled virus checking, the mail
ends up in an endless loop which drops the mail after about 20 loops.


This is the error I get in my exim log:

2003-07-17 16:54:09 19dA92-0007Dk-6d <= ythommes@???
H=blade.interact.lu [194.154.218.181] P=esmtp S=4238
id=000f01c34c73$8699c400$0601a8c0@grudge
2003-07-17 16:54:10 19dA94-0007Dy-JM <= amavis@???
U=amavis P=local S=4607 id=000f01c34c73$8699c400$0601a8c0@grudge
2003-07-17 16:54:10 19dA92-0007Dk-6d => test <test@???>
R=amavis_router T=amavis
2003-07-17 16:54:10 19dA92-0007Dk-6d Completed
2003-07-17 16:54:11 19dA95-0007EA-85 <= amavis@???
U=amavis P=local S=4746 id=000f01c34c73$8699c400$0601a8c0@grudge
2003-07-17 16:54:11 19dA94-0007Dy-JM => test <test@???>
R=amavis_router T=amavis
2003-07-17 16:54:11 19dA94-0007Dy-JM Completed

..repeats about 20 times, then...

2003-07-17 16:54:29 19dA9N-0007JX-V0 <= amavis@???
U=amavis P=local S=8499 id=000f01c34c73$8699c400$0601a8c0@grudge
2003-07-17 16:54:29 19dA9N-0007JL-9g => test <test@???>
R=amavis_router T=amavis
2003-07-17 16:54:29 19dA9N-0007JL-9g Completed
2003-07-17 16:54:29 19dA9N-0007JX-V0 ** test@???: Too many
"Received" headers - suspected mail loop
2003-07-17 16:54:30 19dA9N-0007JZ-WA <= <> R=19dA9N-0007JX-V0 U=mail
P=local S=9314



and these are my amavis lines from exim.conf

amavis_router:
 driver = accept
 log_as_local = false
  condition = "${if and { \
      {!eq \
             {$received_protocol}{scanned-ok}}\
      {eq \
         {${lookup mysql{SELECT checkvirus \
                         FROM users \
                         WHERE checkvirus='yes' \
                         AND username='$local_part' \
                         AND domain='$domain'}}}\
         {yes}} \
     }{yes}{no}}"
 errors_to = admin@???
 retry_use_local_part
 transport = amavis_transport
 no_verify


.

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




Thanks for your help.


Yves
--