# Slow mail delivery from Postfix to Cyrus

## z0ny

Hello, for a while now I am suffering of slow mail delivery from Postfix to Cyrus. Authentication is done via MySQL, filtering by Amavisd-new.

Here's an example log that shows the problem:

```
Mar  9 22:48:22 server postfix/smtp[21704]: 6BCF9205337: to=<user@example.de>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.1, delays=0.14/0.01/0/1.9, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 594912053AF)

Mar  9 22:48:22 server postfix/qmgr[6832]: 6BCF9205337: removed

Mar  9 22:48:22 server master[21711]: about to exec /usr/lib64/cyrus/lmtpd

Mar  9 22:48:22 server lmtpunix[21711]: SQL backend defaulting to engine 'mysql'

Mar  9 22:48:22 server lmtpunix[21711]: executed

Mar  9 22:49:28 server lmtpunix[21711]: accepted connection

Mar  9 22:49:28 server lmtpunix[21711]: lmtp connection preauth'd as postman

Mar  9 22:49:28 server lmtpunix[21711]: Delivered: <user@sender.de> to mailbox: user.user^example^de

Mar  9 22:49:28 server lmtpunix[21711]: USAGE user.user^example^de user: 0.000000 sys: 0.000000

Mar  9 22:49:28 server postfix/pipe[21709]: 594912053AF: to=<user@example.de>, relay=cyrus, delay=66, delays=0.01/0.01/0/66, dsn=2.0.0, status=sent (delivered via cyrus service)

Mar  9 22:49:28 server postfix/qmgr[6832]: 594912053AF: removed
```

Please notice the delay between "executed" and "accepted connection" - over one minute in this case and that's not even a worst case log:

```
# grep "delay=.*cyrus" /var/log/mail.log |cut -d' ' -f 10|tail -n 10

delay=0.03,

delay=0.02,

delay=49,

delay=0.16,

delay=0.04,

delay=17,

delay=56,

delay=30,

delay=66,

delay=99,

#
```

Does anybody know what lmtpunix is doing here? Or some idea that helps me tracking the issue?

Thanks in advance.

----------

## z0ny

Problem solved.   :Smile:  The (virtual) server had not enough entropy available, since installing haveged everything runs fine again.

----------

