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?

cleanup -v shows the delay occurs just after cleanup_header_callback with
the delay proportional to attachment size. Delay will occur for any SMTP
session, including those from both localhost and remote servers. No header
or body checks are used at all for this postfix installation and I have
tried setting receive_override_options=no_header_body_checks on the off
chance but this did not affect the situation.

Included below are examples from /var/log/maillog of the delay via STMP
and it's absence via pickup. postconf -n, master.cf, a log of cleanup -v
for mail received by SMTP and the test attachment used are available from
http://sigmasys.co.uk/postfix/