--On 2 April 2009 15:08:03 +1300 Steve Wray <steve.wray@???> wrote:
> Hi there,
>
> Some of our users have decided that its a great idea to put their
> *entire* email message into the subject line even when it is several
> paragraphs long.
Blimey! Out of interest, do you know what their email client is?
> (Some of these users do this and have email sigs which are also several
> paragraphs long so the email consists of a gigantic subject 'line' and
> the body of the email is just a huge 'disclaimer' sig, but I digress).
>
> Is there a nice way to limit subject line length to discourage this
> practice?
We do something similar for TO: and CC: headers, with these macros:
#################################################################
# Maximum permitted header lengths (unit is characters)(
MAX_CC = 4096
MAX_TO = 4096
# This condition tests that the To: header is less than MAX_TO characters.
LONG_TO_HEADERS = \
> { ${strlen:$h_To:} } {MAX_TO}
# This condition tests that the Cc: header is less than MAX_CC characters.
LONG_CC_HEADERS = \
> { ${strlen:$h_Cc:} } {MAX_CC}
# This is used by headers_remove
REMOVE_LONG_HEADERS = \
${if LONG_TO_HEADERS { : To }}\
${if LONG_CC_HEADERS { : Cc }}
# This is used by headers_add
CONCEALED_STRING = address list masked by postmaster:;
REPLACE_LONG_HEADERS = \
${if LONG_TO_HEADERS {\nTo: CONCEALED_STRING }}\
${if LONG_CC_HEADERS {\nCc: CONCEALED_STRING }}
And, this transport:
remote_smtp:
driver = smtp
no_delay_after_cutoff
headers_remove = \
Bcc \
REMOVE_LONG_HEADERS
headers_add = \
REPLACE_LONG_HEADERS
Should work for you if you just replace "To" with "Subject" and remove the
CC references.
> For reference, this is exim4 under Debian.
>
> Thanks!
>
>
>
> --
> Please remember that an email is just like a postcard; it is not
> confidential nor private nor secure and can be read by many other people
> than the intended recipient. A postcard can be read by anyone at the mail
> sorting office and expecting what is written on it to be private and
> secret is not realistic. Please hold no higher expectation of email.
>
> If you need to send confidential information in an email you need to use
> encryption. PGP is Pretty good for this.
--
Ian Eiloart
IT Services, University of Sussex
01273-873148 x3148
For new support requests, see
http://www.sussex.ac.uk/its/help/