• src/sbbs3/mailsrvr.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Saturday, September 28, 2024 01:22:04
    https://gitlab.synchro.net/main/sbbs/-/commit/5564eb67e84e55e8a6dcbb0e
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    MIME-encode words that contain non-ASCII values in text header fields

    (e.g. to, from, subject) ... when transmitting to other hosts (e.g. POP3 clients or other SMTP hosts).

    For messages that contain CP437 or UTF-8 chars in these fields and were *not* imported into the BBS via SMTP or POP3, these header fields would be transmitted to other hosts with the raw CP437 or UTF-8 chars, thus violating POP3 and SMTP protocols and likely resulting in garbage displayed in message readers.

    The fix is to encode (using MIME "encoded words", per RFC 2407) where necessary.

    Since moderm mail clients (e.g. Thunderbird) don't see to support CP437
    charset in MIME encoded header fields, always translate to UTF-8 first.

    We probably should be translating message body text to UTF-8 as well, for maximum compatibilty with modern mail readers, but this commit doesn't address body text issues with CP437-encoded content. That'll come later.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net