Re: [exim] Special routing for incoming non-SMTP mail: helpn…

Top Pagina
Delete this message
Reply to this message
Auteur: Mike Brudenell
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] Special routing for incoming non-SMTP mail: helpneeded urgently
Greetings -

On 8 Aug 2007, at 12:19, Philip Hazel wrote:

>> When a message can't be delivered because the recipient's mailbox is
>> full an entry gets added to the hints database. When a subsequent
>> message arrives delivery is attempted and, when it fails, Exim
>> appears to consult the hints database and then decides it should
>> immediately REJECT (as against defer) the incoming message.
>
> That shouldn't happen. (And doesn't here.) It should defer the
> delivery
> attempt.
>
>> If I sneakily delete the hints database and then send another test
>> message it gets deferred and held in the queue as I expect.
>>
>> I assume this is to try and keep the size of the queue small when a
>> recipient is known to have a full mailbox and messages keep
>> pouring in.
>
> The time for which it holds the message is controlled by the retry
> rules. Have you set up a short retry time for quota errors?


I have changed the retry time to be quite short whilst testing:

============================================================
begin routers

# This router sends all locally originating messages to a central
smart host.

send_local_origin_to_smart_host:
driver = manualroute
route_data = ${if eq{$sender_host_address}{} {mta.york.ac.uk} {}}
transport = remote_smtp


# This router routes all non-local addresses to a central smart host.

send_to_smart_host:
driver = manualroute
route_list = !+local_domains mta.york.ac.uk
transport = remote_smtp

    ...rest of routers...



begin retry

*                      *           F,5m,1m
============================================================


What I'm observing happening with the above routers in place and a
recipient whose mailbox is full is this:

============================================================

1.  Send "Message 1" to an address on the test server.
     Delivery is attempted.  Message gets deferred.


     Queue runs within the 5 minute maximum retry period attempt  
delivery
     and defer the message again.


     A queue run after the 5 minute period attempts delivery then  
constructs
     a delivery failure notification which is returned to the sender,  
and the
     incoming message removed from the queue.


2007-08-08 12:38:10 1IIjre-0001Hv-Dm <= pmb1@??? H=mail-
gw1.york.ac.uk [144.32.128.246] P=esmtp S=1339 id=4FEC13ED-6EF0-4A95-
A406-867386359427@???

2007-08-08 12:38:28 1IIjre-0001Hv-Dm ==
pmb1@??? R=localuser T=local_maildir_delivery
defer (49): Disc quota exceeded: failed to open tmp/
1186573108.H664934P4958.ums10.york.ac.uk (10 tries)


============================================================

2.  Now send "Message 2" to the same recipient on the test server.
     Delivery is attempted.  Exim then constructs a delivery failure  
notification
     which is returned to the sender, and the incoming message  
removed from the
     queue.


2007-08-08 12:45:46 1IIjz0-0001IG-11 <= pmb1@??? H=mail-
gw2.york.ac.uk [144.32.128.247] P=esmtp S=1340 id=0F61FEA5-6FFC-432B-
A6BF-00498683C6F4@???

2007-08-08 12:46:04 1IIjz0-0001IG-11 ==
pmb1@??? R=localuser T=local_maildir_delivery
defer (49): Disc quota exceeded: failed to open tmp/
1186573564.H231989P4978.ums10.york.ac.uk (10 tries)

2007-08-08 12:46:04 1IIjz0-0001IG-11 **
pmb1@???: retry timeout exceeded

2007-08-08 12:46:04 1IIjzI-0001IK-8j <= <> R=1IIjz0-0001IG-11 U=exim
P=local S=2157

2007-08-08 12:46:04 1IIjz0-0001IG-11 Completed

2007-08-08 12:46:04 1IIjzI-0001IK-8j => pmb1@???
R=send_local_origin_to_smart_host T=remote_smtp H=mta.york.ac.uk
[144.32.1

============================================================

3.  Next delete the "retry" hints database files:
         rm /var/spool/exim/dn/retry.*
     Send "Message 3" to the same recipient on the test server.
     Delivery is attempted.  Message gets deferred.


     Queue runs within the 5 minute maximum retry period attempt  
delivery
     and defer the message again.


     A queue run after the 5 minute period attempts delivery then  
constructs
     a delivery failure notification which is returned to the sender,  
and the
     incoming message removed from the queue.


2007-08-08 12:46:35 1IIjzn-0001IP-Ne <= pmb1@??? H=mail-
gw1.york.ac.uk [144.32.128.246] P=esmtp S=1339
id=EB764D09-655E-4803-87E2-AD866B871559@???

2007-08-08 12:46:54 1IIjzn-0001IP-Ne ==
pmb1@??? R=localuser T=local_maildir_delivery
defer (49): Disc quota exceeded: failed to open tmp/
1186573613.H991644P4987.ums10.york.ac.uk (10 tries)

============================================================

Using exim_dumpdb to look at the contents of the retry database...

Whilst the deferred message is waiting in the queue:

% exim_dumpdb /var/spool/exim retry
T:pmb1@??? 49 0 Disc quota exceeded
08-Aug-2007 12:46:54 08-Aug-2007 12:46:54 08-Aug-2007 12:47:54

And after it has eventually passed the 5 minute maximum retry period
and a delivery failure notification returned:

% exim_dumpdb /var/spool/exim retry
T:pmb1@??? 49 0 Disc quota exceeded
08-Aug-2007 12:46:54 08-Aug-2007 12:52:39 08-Aug-2007 12:53:39 *

(Note that a "*" has been added to the entry and the times updated.)


If I wait until after 12:53:39 (taken from the above hint entry) and
send another test message to the recipient address still causes one
delivery attempt and then the incoming message NOT to be deferred,
but instead removed from the queue with a delivery failure
notification being sent back:

2007-08-08 12:54:34 1IIk7W-0001Ij-P8 <= pmb1@??? H=mail-
gw1.york.ac.uk [144.32.128.246] P=esmtp S=1339 id=58627D50-3DF1-4C2E-
ABC5-AC9D458D0E99@???

2007-08-08 12:54:53 1IIk7W-0001Ij-P8 ==
pmb1@??? R=localuser T=local_maildir_delivery
defer (49): Disc quota exceeded: failed to open tmp/
1186574093.H28132P5007.ums10.york.ac.uk (10 tries)

2007-08-08 12:54:53 1IIk7W-0001Ij-P8 **
pmb1@???: retry timeout exceeded

2007-08-08 12:54:53 1IIk7p-0001Im-2N <= <> R=1IIk7W-0001Ij-P8 U=exim
P=local S=2156

2007-08-08 12:54:53 1IIk7W-0001Ij-P8 Completed

2007-08-08 12:54:53 1IIk7p-0001Im-2N => pmb1@???
R=send_local_origin_to_smart_host T=remote_smtp H=mta.york.ac.uk
[144.32.128.183]

2007-08-08 12:54:53 1IIk7p-0001Im-2N Completed

The retry database now looks like this:

%exim_dumpdb /var/spool/exim retry
T:pmb1@??? 49 0 Disc quota exceeded
08-Aug-2007 12:46:54 08-Aug-2007 12:54:53 08-Aug-2007 12:55:53 *

============================================================

Cheers,
Mike B-)

--
The Computing Service, University of York, Heslington, York Yo10 5DD, UK
Tel:+44-1904-433811 FAX:+44-1904-433740

* Unsolicited commercial e-mail is NOT welcome at this e-mail address. *