On Mon, Oct 16, 2017 at 11:13:22AM -0600, Curtis wrote:

> I am experimenting with setting the
> smtp_line_length_limit to 9999999 (almost 10MB).   I had wondered if I might
> run into an internal upper limit that Postfix might not allow, but it seemed
> to accept 9999999 without complaint.  This has allowed these DKIM signed
> messages to come through without issue.

Another option to consider is to enable DKIM verification at the
border gateway, with the results of that verification recorded in
a standards conformant "Authentication-Results" header.  Downstream,
some clients (including IIRC sufficiently recent Exchange/Outlook)
can be configured to use/trust the Authentication-Results header,
instead of doing their own DKIM signature checks.

> My questions are:
> 
> 1. Considering that we're not using this setup for outbound mail, could
> there be some downsides to setting the smtp_line_length_limit this high?

Some downstream MTAs or MUAs might not be able to handle arbitrarily
long lines.  If yours do, then you're fine.

Note that even inbound MTAs sometimes send bounces, and so end up
sending outbound mail.  You might consider leaving the default
limits in place for the "smtp" transport, and only raising/removing
the limit for the "relay" transport.  Then make sure that inbound
mail uses "relay" (which you should do anyway).

> 2. Is there a limit to how high this setting can be set?  Would setting it
> to something like 50MB cause issues for Postfix in terms of stability?

No issues.  Postfix processes long lines in chunks, and can handle
arbitrarily many chunks.  The message size limit will ultimately
limit the longest message line.

You can set smtp_line_length_limit to 0, which means "no limit".
On a 32-bit system, Postfix would then be able process lines of up
to 2GB, and on a 64-bit system lines of up to 2^63-1 bytes.  In
practice your message size limit will be smaller than either.

-- 
        Viktor.

Reply via email to