From: Wietse Venema (no email)
Date: Sun Mar 21 2010 - 18:06:11 EDT
> Postfix 2.6 running on OpenBSD works well as a mail server but there is
> one specific problem for which any advice is gratefully received.
> cleanup takes a long time to complete when email with attachments is
> received via SMTP but not when mail arrives via pickup. This presently
> causes problems for our webmail users as their HTTP session will often
> timeout as postfix may take several minutes for email with relatively
> large (2-3mb) attachments. can anyone shed any light on why this might be?
There is no fundamental reason why pickup->cleanup is slower than
smtpd->cleanup (other than different receive_override_options
settings in master.cf).
However, it is possible that you're sending mail INTO Postfix at
a slower rate than expected.
Specifically, you are sending mail into Postfix via the loopback
interface address. It would be instructive to see if the delay
goes away when you use the NON-localhost interface address instead.
The reason I mention this is that OpenBSD uses a large MTU on the
loopback interface (approx. 32 kbytes). If the mail sending app
uses a smaller write buffer, then it will experience NAGLE delays
of a tenth of a second or so, and that adds up with large messages.
If this is the problem, fix the app, or use the NON-localhost
interface address for mail submission.
> Mar 21 20:06:52 imp postfix/smtpd: connect from
> Mar 21 20:06:53 imp postfix/smtpd: 1BC4F4021E:
> Mar 21 20:06:53 imp postfix/cleanup: 1BC4F4021E:
> Mar 21 20:08:30 imp postfix/smtpd: disconnect from
> Mar 21 20:08:30 imp postfix/qmgr: 1BC4F4021E: from=<user at domain>,
> size=2870865, nrcpt=1 (queue active)
> Mar 21 20:12:23 imp postfix/pickup: B939C4021F: uid=1234 from=<user>
> Mar 21 20:12:23 imp postfix/cleanup: B939C4021F:
> Mar 21 20:12:23 imp postfix/qmgr: B939C4021F: from=<user at domain>,
> size=2874566, nrcpt=1 (queue active)