[exim] exim for outgoing notification service

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Andy Bennett
Ημερομηνία:  
Προς: exim-users@exim.org
Αντικείμενο: [exim] exim for outgoing notification service
Hi,

I'm trying to use exim as an outgoing relay to deliver notification
eMail to users of an app. When activity occurs we keep a record of it
and when it's time to send out the digests, each user who has supplied
their eMail address has a personalised mail built for them that includes
all their notifications for that time period.

Often many of our users are have eMail addresses that are on the same
domain as each other. However, because the eMails are personalised,
unlike a mailing list, they are submitted to exim over the course a few
milliseconds rather than simultaneously. This is long enough for the
first messages to be routed, begin delivery, complete delivery and close
the connection.

Eventually we have a lot of back-to-back sessions open and the other
party starts saying things like

"421 Too many concurrent SMTP connections; please try again later."

I think there's another error message we see related to too frequent
connection attempts as well but I can't find it in the log at the moment.


Often this results in messages sitting on the queue for a while whilst
we either wait for our timeouts to expire or theirs.


What I'd like to do is maintain timely delivery of mail, but insert some
delays between the end of the message and the closing of the connection
in case another message for the same host comes along.

I've Googled around and found two options:

+ Queueing mail

+ serialize_hosts


If I use a queue runner then I'll enforce an expected delivery latency
of at half the queueing period. It'd be nice if I get it to only queue
if there has recently been a message delivered to that host. The
expectation would be that if there is more than one message then more
are likely to follow. i.e. deliver messages immediately but try harder
to aggregate messages that arrive in a short interval.


I can't find much detail on serialize_hosts, especially the implications
of setting it to '*' or how to reliably set up the DB cleanup jobs.

I'm not sure if this is the correct thing to use as the problem is that
the message arrival period is slightly larger than the message delivery
time.

It also seems that use of serialize_hosts leads to a lot of noise in the
logs about connection limits being reached when messages are submitted
concurrently.



I'd be happy to receive advice about how to best configure Exim for
smooth outgoing workloads given a bursty and lumpy input.







Regards,
@ndy

--
andyjpb@???
http://www.ashurst.eu.org/
0x7EBA75FF