[exim] Deferred messages disappearing, message "Completed" p…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Schramm, Dominik
Data:  
Para: exim-users
Asunto: [exim] Deferred messages disappearing, message "Completed" prematurely
Hi,

We experienced a very strange behavior that seems contrary to the 
specification (the logs indicate that). I hope someone here can
shed some light on what happened. Am I missing something here?!

Thanks in advance
and kind regards,
Dominik Schramm


Scenario:
    We have two identically configured mail servers 
    (server1.mydomain.de, 10.16.24.97, and server2.mydomain.com, 
    10.16.24.196) with two queues -- incoming and outgoing -- each. 
    They are running the Ubuntu 7.10 exim4-daemon-heavy version 4.67-5build1.
    The servers are both reachable from the Internet, they have the 
    same MX priority and are thus roughly equally loaded. The 
    outgoing daemons use a system filter to set up unseen deliveries. 
  
Problem:
    A message coming into our network should be sent on to 
    copyaddress@??? by an unseen delivery (see below); this 
    fails without any consistent error being logged, the message in 
    question simply disappears from the queue after being delivered 
    to the original recipients. Normally this works fine (it has for 
    six months), only yesterday did we have errors of the same kind 
    on both mail servers, which work indepently of each other. 
      
    The only unusual thing about yesterday was that the 
    destination mail servers for the domain "outside.com" were 
    all down between 10:55 am and 11:25 am, and errors were logged 
    accordingly ("Connection timed out"). I would have expected that 
    the mail message to "outside.com" remain on the queue and be 
    processed by subsequent queue runners according to the retry 
    rules. Instead, there was one mainlog message "retry time not 
    reached" or "defer (110): Connection timed out", and after that 
    "Completed", and the messages was nowhere to be found any more. 
    
    Here are two complete log examples from server1 (extracted with 
    exigrep, but checking the logs line by line reveals that exigrep 
    did not miss anything) -- rejectlog and paniclog are empty, and 
    the other syslog log files contain nothing interesting: 
  
    2008-06-18 10:57:25 1K8tTp-0002DV-Ir <= edi@... [4.5.6.7] P=esmtp S=6728 id=z05dafk5I8tKRu.RZmta@...
    2008-06-18 10:57:28 1K8tTp-0002DV-Ir => order.copy <system-filter> R=procmail T=procmail_pipe
    2008-06-18 10:57:28 1K8tTp-0002DV-Ir => order@??? R=imap_pop3_server2 T=remote_smtp H=10.16.24.196 [10.16.24.196]
    2008-06-18 11:00:37 1K8tTp-0002DV-Ir mailserver-2.outside.com [9.10.11.12] Connection timed out
    2008-06-18 11:03:10 1K8tTp-0002DV-Ir Spool file is locked (another process is handling this message)
    2008-06-18 11:03:46 1K8tTp-0002DV-Ir mailserver-1.outside.com [9.10.11.11] Connection timed out
    2008-06-18 11:03:46 1K8tTp-0002DV-Ir == copyaddress@??? <system-filter> R=dnslookup T=remote_smtp defer (110): Connection timed out
    2008-06-18 11:05:01 1K8tTp-0002DV-Ir Completed

    2008-06-18 11:10:00 1K8tg0-00038u-BU <= nospam@... [1.2.3.4] P=esmtp S=4364
    2008-06-18 11:10:01 1K8tg0-00038u-BU => order.copy <system-filter> R=procmail T=procmail_pipe
    2008-06-18 11:10:01 1K8tg0-00038u-BU == copyaddress@??? <system-filter> R=dnslookup T=remote_smtp defer (-53): retry time not reached for any host
    2008-06-18 11:10:01 1K8tg0-00038u-BU => order@??? R=imap_pop3_server2 T=remote_smtp H=10.16.24.196 [10.16.24.196]
    2008-06-18 11:15:01 1K8tg0-00038u-BU Completed

Configuration details:
  
    root@server2:~# cat /etc/exim4/exim4_outgoing.conf
    ...
    system_filter = /etc/exim4/cfg_system_filter.txt
    ...

    root@server2:~# cat /etc/exim4/cfg_system_filter.txt
    # Exim filter

    if    error_message or not first_delivery
       or $sender_host_address is "10.16.24.97"
       or $sender_host_address is "10.16.24.196"
    then
       finish
    endif

    if foranyaddress $recipients ( $thisaddress   is    order@???
                              or   $thisaddress   is    order.2@??? )
    then
        unseen deliver order.copy@??? errors_to it-operations@???
    endif
    if foranyaddress $recipients ( $thisaddress   is    order@??? )
    then
        unseen deliver copyaddress@??? errors_to it-operations@???
    endif