• How to reject incorrect utf8 headers?

    From om@om@iki.fi (Otto J. Makela) to comp.mail.sendmail on Tue Mar 17 13:25:25 2026
    From Newsgroup: comp.mail.sendmail

    We are running a Sendmail-based main mail server. In addition to this,
    we run several Sympa/Postfix-based mailing list servers which use this
    server for both incoming and outgoing mails.

    In spite of Sendmail not advertising SMTPUTF8, every so often we get
    email messages handed over to it that have 8-bit headers. Latest example
    was a multipart/signed message from Spain to one of our mailing lists,
    which included these headers for the signature part:

    Content-Type: application/pkcs7-signature; name="smime.p7s"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename="smime.p7s"
    Content-Description: Firma criptogrbfica S/MIME

    Note the unencoded utf8 in the last header. Sendmail accepted this in
    spite of no encoding, and forwarded it to the mailing list server.
    When the mailing list server Postfix had processed the message and tried
    to hand it back to the mail server for sending out to the world it
    realized Sendmail not advertising SMTPUTF8, and decided this message undeliverable because of this.

    This meant that 100% of the list recepients were suddenly "bouncing",
    which of course is a bit of an emergency at the list server.

    I'm trying to figure out what would be the least painful course of
    action right now:

    1. switch Sendmail to not accept unencoded utf8
    2. switch Postfix to forward unencoded utf8 even without SMTPUTF8
    [for bad hysterical raisins we cannot right now implement option
    3. enable SMTPUTF8 on Sendmail, but will certainly do in the future]

    How would one go about implementing option 1 in Sendmail?
    --
    /* * * Otto J. Makela <om@iki.fi> * * * * * * * * * */
    /* Phone: +358 40 765 5772, ICBM: N 60 10' E 24 55' */
    /* Mail: Mechelininkatu 26 B 27, FI-00100 Helsinki */
    /* * * Computers Rule 01001111 01001011 * * * * * * */
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Claus =?iso-8859-1?Q?A=DFmann?=@INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org to comp.mail.sendmail on Tue Mar 17 12:36:38 2026
    From Newsgroup: comp.mail.sendmail

    Otto J. Makela wrote:
    We are running a Sendmail-based main mail server. In addition to this,

    In spite of Sendmail not advertising SMTPUTF8, every so often we get
    email messages handed over to it that have 8-bit headers. Latest example

    If you want to reject e-mails with headers using 8-bit chars,
    then see doc/op.*:

    5.6. H -- Define Header
    ...
    A secondary syntax allows validation of headers
    as they are being read. To enable validation, use:

    HHeader: $>Ruleset
    HHeader: $>+Ruleset

    The indicated Ruleset is called for the specified
    Header, and can return $#error to reject or quarantine
    ...

    and use a regex to allow only printable characters.
    --- Synchronet 3.21d-Linux NewsLink 1.2