Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

smarthost and multiple messages per connection

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


alexu at ucd

Mar 2, 2010, 10:40 AM

Post #1 of 3 (592 views)
Permalink
smarthost and multiple messages per connection

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

By default, exim establishes a separate connection to a remote smtp
server, even if this remote server is configured as exim's only smart host.

Since our smarthost does not allow more than 10 connections per minute,
it causes significant delays in mail delivery with default configuration.

We have since reconfigured our exim, which now runs with the following
options:

Listener:
/usr/sbin/exim4 -bd -odqs

Queue Runner:
/usr/sbin/exim4 -oP /var/run/exim4/eximqr.pid -qq2m

Mail now queues fine, but when queue runner starts up, it still seems to
establish individual connection per each message, despite -qq option:

2010-03-02 15:45:59 Start queue run: pid=5686 -qq

... skipping 10 successfully delivered messages ...

2010-03-02 15:46:01 1NmUHO-0001Rx-0g SMTP error from remote mail server
after initial connection: host <smarthost> [XX.XX.XX.XX]: 421 Connection
not accepted at this time

... skipping undelivered messages ...

2010-03-02 15:46:02 End queue run: pid=5686 -qq

Any idea what else can be missing in the following configuration?

# /etc/default/exim4
EX4DEF_VERSION=''

QUEUERUNNER='separate'
QUEUEINTERVAL='2m'
COMMONOPTIONS=''
QUEUERUNNEROPTIONS=''
QFLAGS='q'
SMTPLISTENEROPTIONS='-odqs'


Many thanks,
Alexander

- --
Alexander Ufimtsev
Web Software Developer
School of Computer Science and Informatics
University College Dublin, Belfield, D4, Ireland
T: +353 1 716 2926 F: +353 1 269 7262



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFLjVuqANNyqVq3ICERAviFAJ9ZeeswBWxgThz/bDd0pXDs+dHpMwCghlCT
Fnu5cwmlctgb8AsKOfnHE0E=
=iJ8k
-----END PGP SIGNATURE-----

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Lena at lena

Mar 3, 2010, 6:04 AM

Post #2 of 3 (568 views)
Permalink
Re: smarthost and multiple messages per connection [In reply to]

> From: Alexander Ufimtsev

> By default, exim establishes a separate connection to a remote smtp
> server, even if this remote server is configured as exim's only smart host.
>
> Since our smarthost does not allow more than 10 connections per minute,
> it causes significant delays in mail delivery with default configuration.

Try:

remote_smtp:
driver = smtp
serialize_hosts = *

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


alexu at ucd

Mar 3, 2010, 10:24 AM

Post #3 of 3 (568 views)
Permalink
Re: smarthost and multiple messages per connection [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2010-03-03 14:04, Lena wrote:
> > By default, exim establishes a separate connection to a remote smtp
> > server, even if this remote server is configured as exim's only smart host.
> >
> > Since our smarthost does not allow more than 10 connections per minute,
> > it causes significant delays in mail delivery with default configuration.
>
> Try:
>
> remote_smtp:
> driver = smtp
> serialize_hosts = *
>

This did not help :-(

I have finally solved the problem though, so I'll answer my own question
in hope that it will be useful for others: it was sufficient to turn off
TLS.

Exim does not work efficiently with TLS due to the nature of its
implementation (process fork for each message delivery). As a result, it
tries to start and stop multiple TLS sessions within the same
unencrypted SMTP: the behaviour that is not precisely described by an
appropriate RFC. If restarting TLS fails, it drops the connection and
re-establishes it, which happened in this case.

More info is here:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch39.html#SECTmulmessam


To turn off TLS, the following had to be added to remote_smtp
(remote_smtp_smarthost in my case) section:

remote_smtp:
driver = smtp
hosts_avoid_tls = *



Many thanks,
Alexander

- --
Alexander Ufimtsev
Web Software Developer
School of Computer Science and Informatics
University College Dublin, Belfield, D4, Ireland
T: +353 1 716 2926 F: +353 1 269 7262


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFLjqlWANNyqVq3ICERApSZAJ44nLe1KBw90xR9WrsDumMdlzTkMQCfUXLK
lqfaJEbHBcj6l3NjJ64wfXo=
=zepF
-----END PGP SIGNATURE-----

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.