• src/sbbs3/mailsrvr.c

    From rswindell@VERT to CVS commit on Sun Nov 27 20:01:07 2016
    src/sbbs3 mailsrvr.c 1.601 1.602
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv838

    Modified Files:
    mailsrvr.c
    Log Message:
    Beautify the email notification short-message (telegram) a bit:
    Don't repeat the full email address if no name was provided.
    Highlight the word "e-mail" (sorry, I know this should be in the text.dat).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Thu Dec 1 18:32:27 2016
    src/sbbs3 mailsrvr.c 1.603 1.604
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2491

    Modified Files:
    mailsrvr.c
    Log Message:
    Strip control characters from email header fields. They shouldn't be in there. SPAMMERS insert these either intentionally or mistakenly and they can defeat security checks (like mailauth.js).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Thu Dec 8 03:58:59 2016
    src/sbbs3 mailsrvr.c 1.605 1.606
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv803

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix bug introduced in 1.604 (stripping all ctrl chars from header fields of incoming mail): it turns out, stripping tabs (ctrl-i) is breaks many folded header fields (e.g. MIME-encoded messages).
    So, just strip bare carriage returns instead, as that was the original problem.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Mon Oct 23 00:23:59 2017
    src/sbbs3 mailsrvr.c 1.608 1.609
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28264

    Modified Files:
    mailsrvr.c
    Log Message:
    Report/log 1-based "reason" code when user cannot post via SMTP.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Nov 11 21:04:45 2017
    src/sbbs3 mailsrvr.c 1.609 1.610
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1362

    Modified Files:
    mailsrvr.c
    Log Message:
    Set the MSG_SPAM header attribute flag on SMTP-received SPAM (detected via DNSBL).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sun Nov 12 06:43:26 2017
    src/sbbs3 mailsrvr.c 1.610 1.611
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4818

    Modified Files:
    mailsrvr.c
    Log Message:
    Bounce mail back to the original email's reverse path (if/when available) rather than the "from" address. This is necessary for the listserver.js to properly recognize and process/delete bounce messages (e.g. posted to a sub
    by a local user aand exported to the list).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Nov 14 20:15:24 2017
    src/sbbs3 mailsrvr.c 1.612 1.613
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv19303

    Modified Files:
    mailsrvr.c
    Log Message:
    Finish the implementation of the mail proc debug log output file started in 2009 (r1.459): the file was never actually opened/read/logged. <sigh>



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Nov 16 00:28:29 2017
    src/sbbs3 mailsrvr.c 1.614 1.615
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Insure that bounce messages have a message-ID.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Nov 29 11:46:48 2017
    src/sbbs3 mailsrvr.c 1.617 1.618
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25443

    Modified Files:
    mailsrvr.c
    Log Message:
    When storing FidoNet netmail received via SMTP, don't include any "@addr" portion of the To: header field in the RECIPIENT name as FTN software
    doesn't typically expect/handle that.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Dec 28 01:08:32 2017
    src/sbbs3 mailsrvr.c 1.618 1.619
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24763

    Modified Files:
    mailsrvr.c
    Log Message:
    New POP3 server feature: Append "#nospam" to your login name/alias and any SPAM-tagged messages will not be listed/downloaded. This is useful if for example you use POP3 to download mail to your phone and have limited
    storage or sorting options. The SPAM-tagged messages will remain in your
    inbox on the BBS so you should use another POP3 or local mail client to download and delete those messages (which could potentially include
    false positives).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 00:04:57 2018
    src/sbbs3 mailsrvr.c 1.624 1.625
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6503

    Modified Files:
    mailsrvr.c
    Log Message:
    Add support for RFC3848 ESMTPA with clause.
    ESMTPS and ESMTPSA coming soon!



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 00:18:21 2018
    src/sbbs3 mailsrvr.c 1.625 1.626
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8028

    Modified Files:
    mailsrvr.c
    Log Message:
    Add support for other WITH clauses. We still need to add RFC8314 Section 4.3 support though.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Mar 6 01:18:59 2018
    src/sbbs3 mailsrvr.c 1.626 1.627
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8967

    Modified Files:
    mailsrvr.c
    Log Message:
    Add the protocol ("POP3" or "SMTP") and socket descriptor to all the
    "Enable to" (TLS-related) error messages. This might help a little to understand why these errors are happening and allow us to consider
    lowering the log level(s) of commonly-occuring cases from LOG_ERR.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 05:09:53 2018
    src/sbbs3 mailsrvr.c 1.627 1.628
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5008

    Modified Files:
    mailsrvr.c
    Log Message:
    Don't force TLS 1.0 for forwarded STARTTLS delivery. Cox may suck, but
    not everyone is that inept.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 05:32:55 2018
    src/sbbs3 mailsrvr.c 1.628 1.629
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv7342

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix retry-after-TLS error, and make log messages more useful.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 06:06:06 2018
    src/sbbs3 mailsrvr.c 1.629 1.630
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv12056

    Modified Files:
    mailsrvr.c
    Log Message:
    We need to actually recreate the socket before re-using it after a TLS failure... do that.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Mar 6 06:13:59 2018
    src/sbbs3 mailsrvr.c 1.630 1.631
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv12938

    Modified Files:
    mailsrvr.c
    Log Message:
    Update all the POP3 loglines to include the IP address or the authenticated user name (once authenticated).
    Lower the log level of the POP3S "Unable to set session active" messages, apparently these are normal occurence with drive-by bots and not error.log worthy.
    Fixed the !Cryptlib error in sock_recvbyte log output (sock, not socket).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 15:33:14 2018
    src/sbbs3 mailsrvr.c 1.631 1.632
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28693

    Modified Files:
    mailsrvr.c
    Log Message:
    Actually check the return value of sendmail_open_socket()




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 16:19:07 2018
    src/sbbs3 mailsrvr.c 1.632 1.633
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1428

    Modified Files:
    mailsrvr.c
    Log Message:
    Allocate an extra byte for the '-'/' ' between the response and the option.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 16:47:46 2018
    src/sbbs3 mailsrvr.c 1.633 1.634
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6072

    Modified Files:
    mailsrvr.c
    Log Message:
    Actually log the error string in the place it's most likely to be available... setting the session active.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 18:22:31 2018
    src/sbbs3 mailsrvr.c 1.634 1.635
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv18201

    Modified Files:
    mailsrvr.c
    Log Message:
    Split out the mx fallback/TLS negotiation/etc stuff into a separate function and fix all the things.

    Hopefully this allows fallback to plaintext after a TLS failure now.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tue Mar 6 18:31:28 2018
    src/sbbs3 mailsrvr.c 1.635 1.636
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv20762

    Modified Files:
    mailsrvr.c
    Log Message:
    Downgrade message that will be passed to bounce() on failure to LOG_INFO.
    If there's a problem, bounce() will re-log them as LOG_WARNING later.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Mar 6 20:08:49 2018
    src/sbbs3 mailsrvr.c 1.636 1.637
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv31197

    Modified Files:
    mailsrvr.c
    Log Message:
    Beautify the log output and make the agent/server names more consistent
    (e.g. "SUBMISSIONS Server" becomes "SMTPS Submission Agent", etc.).
    Removed the redundent "<protocol> Server listening" log lines.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Mar 7 00:20:14 2018
    src/sbbs3 mailsrvr.c 1.637 1.638
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21497

    Modified Files:
    mailsrvr.c
    Log Message:
    Treat *all* types of SMTP AUTH failures as "bad logins" for the sake of throttling, temp-banning, and filtering.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Wed Mar 7 04:20:54 2018
    src/sbbs3 mailsrvr.c 1.638 1.639
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv16079

    Modified Files:
    mailsrvr.c
    Log Message:
    Add missing break after session fails to be set active.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thu Mar 8 16:09:20 2018
    src/sbbs3 mailsrvr.c 1.639 1.640
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2346

    Modified Files:
    mailsrvr.c
    Log Message:
    We don't need any of this cleanup on TLS negotiation failure... in fact,
    free() the mailproc causes a double-free crash.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Mar 9 01:54:47 2018
    src/sbbs3 mailsrvr.c 1.640 1.641
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6739

    Modified Files:
    mailsrvr.c
    Log Message:
    Log the message number when failing to increment delivery attempt counter.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Mar 9 03:47:21 2018
    src/sbbs3 mailsrvr.c 1.641 1.642
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv19133

    Modified Files:
    mailsrvr.c
    Log Message:
    Remove "(ftn_addr)" portion of "To name", if it exists, in SMTP-submitted FidoNet netmail messages.
    Fix problem reported by Rastus and Nelgin.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Sat Mar 10 01:49:28 2018
    src/sbbs3 mailsrvr.c 1.644 1.645
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6284

    Modified Files:
    mailsrvr.c
    Log Message:
    Remove unused variable.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Sat Mar 10 04:15:35 2018
    src/sbbs3 mailsrvr.c 1.646 1.647
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24943

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix unaligned pointer access warnings from Clang.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Sat Mar 10 04:27:56 2018
    src/sbbs3 mailsrvr.c 1.647 1.648
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26510

    Modified Files:
    mailsrvr.c
    Log Message:
    Oh yeah, that's WAY cooler.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Sat Mar 10 05:50:29 2018
    src/sbbs3 mailsrvr.c 1.650 1.651
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6099

    Modified Files:
    mailsrvr.c
    Log Message:
    Re-fix warnings, but be sane about it this time.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Sat Mar 10 06:20:26 2018
    src/sbbs3 mailsrvr.c 1.651 1.652
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10244

    Modified Files:
    mailsrvr.c
    Log Message:
    Mail server is guilty too.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sun Mar 11 18:28:05 2018
    src/sbbs3 mailsrvr.c 1.652 1.653
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27486

    Modified Files:
    mailsrvr.c
    Log Message:
    A little more debug-level log output around the saving of receiving
    msgs and SPAM database lookup.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Mon Mar 12 15:11:05 2018
    src/sbbs3 mailsrvr.c 1.654 1.655
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv19157

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix incorrect log messages.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Mon Mar 12 16:11:18 2018
    src/sbbs3 mailsrvr.c 1.655 1.656
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26332

    Modified Files:
    mailsrvr.c
    Log Message:
    sendmail_open_socket() will close the passed socket if it's not INVALID_SOCKET So, we really should initialize sock to INVALID_SOCKET before calling it.

    This should fix the "random descriptors are closed" issue.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Mon Mar 12 16:20:18 2018
    src/sbbs3 mailsrvr.c 1.656 1.657
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27523

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix issue where the last line of a multi-line response wasn't searched
    for a match... which caused a memory leak.

    Thanks scan-build!



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Mon Mar 12 16:22:09 2018
    src/sbbs3 mailsrvr.c 1.657 1.658
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27789

    Modified Files:
    mailsrvr.c
    Log Message:
    Pedanticaly, rsp may not be three characters long (yes, it always will),
    so support that.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Mar 23 21:02:16 2018
    src/sbbs3 mailsrvr.c 1.660 1.661
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28321

    Modified Files:
    mailsrvr.c
    Log Message:
    More detailed log output when posting a message via SMTP (successfully
    or not).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sun Apr 1 04:22:48 2018
    src/sbbs3 mailsrvr.c 1.662 1.663
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv11916

    Modified Files:
    mailsrvr.c
    Log Message:
    Added a debug-level log msg ever 100 lines of received SMTP message text.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 5 21:14:06 2018
    src/sbbs3 mailsrvr.c 1.664 1.665
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10424

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix a couple of issues with external mail processors:
    - Since rev 1.556, mailproc_to_match[] would only ever contain one mail
    processor (index) value, even if the RCPT TO address matched multiple
    mail processor "To" keys in mailproc.ini, so only the first-matching
    mail processor (with a "To" key) would be executed for the msg.
    - mailproc_match, meaning the destination was a non-passthrough
    external mail processor, in which case the destination (RCPT TO) address
    may *not* match a valid local user account, would be set for *passthru*
    mail processors potentially resulting in the following error (and an
    undelivered mail message): !SMTP can't deliver mail to user #0
    only set mailproc_match to a valid mail proc index if the recipient matches a
    non-passthru mail processor.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 5 22:02:55 2018
    src/sbbs3 mailsrvr.c 1.665 1.666
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23480

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix get_ssl_cert() failure log message (wrong number of arguments).
    Was this pasted from somewhere else?


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 5 22:58:55 2018
    src/sbbs3 mailsrvr.c 1.666 1.667
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Enable GCC-assisted printf-style format/arg checking for lprintf() and
    resolve the resulting warnings.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Apr 6 14:51:33 2018
    src/sbbs3 mailsrvr.c 1.668 1.669
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1272

    Modified Files:
    mailsrvr.c
    Log Message:
    Attempt to address GCC v7 warnings raised by Nelgin:
    warning: format not a string literal and no format arguments [-Wformat-security]
    sockprintf(sock,sess,(char*)resp);
    sockprintf(socket,session,sys_error);



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Apr 7 03:01:41 2018
    src/sbbs3 mailsrvr.c 1.669 1.670
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4150

    Modified Files:
    mailsrvr.c
    Log Message:
    Resolve gcc version 5.4.0 warning:
    format not a string literal and no format arguments [-Wformat-security]


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Apr 18 03:00:39 2018
    src/sbbs3 mailsrvr.c 1.670 1.671
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv31889

    Modified Files:
    mailsrvr.c
    Log Message:
    Use a different source for the message number in smb_getmsghdr() failure
    error log message as the header is zeroed in this function and thus the
    message number previously read from the index, lost (zeroed) and useless.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Apr 18 03:06:36 2018
    src/sbbs3 mailsrvr.c 1.671 1.672
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv32536

    Modified Files:
    mailsrvr.c
    Log Message:
    Use the msg.idx.number as the message number in smb_getmsghdr() failure
    error messages (in the POP3 server) as the msg.hdr.number is zeroed by smb_getmsghdr() and potentially invalid when returning an error.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jun 11 17:00:34 2018
    src/sbbs3 mailsrvr.c 1.672 1.673
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27806

    Modified Files:
    mailsrvr.c
    Log Message:
    Added log output for a couple of instances where get_ssl_cert() could (previuosly) silently fail - in the sendmail_negotiate() and pop3_thread().
    If get_ssl_cert() can return -1 withOUT setting the estr argument to a
    non-NULL value, then we could still have silent failures (TBD).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Jul 19 20:18:36 2018
    src/sbbs3 mailsrvr.c 1.673 1.674
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix SMTP-sending mail bug when SMTP/TLS was successfully negotiated:
    The "max lines" parameter value passed to sockmsgtxt was using the cryptlib session number - this would truncate sent email bodies to some seemingly
    random number of lines. Introduced in rev 1.622.
    Also added a couple of helpful log lines to let the log-reader know if/when
    TLS was successfully negotiated for sendmail sessions.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Jul 19 23:50:22 2018
    src/sbbs3 mailsrvr.c 1.675 1.676
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv22084

    Modified Files:
    mailsrvr.c
    Log Message:
    Remove redundant calls to remove_mgs_instransit() from sendmail_open_socket()



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jul 30 17:29:52 2018
    src/sbbs3 mailsrvr.c 1.676 1.677
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix chk_email_addr() for strings which begin with a name, specifically for
    mail "To" and "From" header fields of the form: user name <user@addr> or
    "user name" <user@addr> - the email.can filtering would not work



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Oct 17 16:20:17 2018
    src/sbbs3 mailsrvr.c 1.677 1.678
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    More GCC printf warning fixes.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Oct 22 04:29:57 2018
    src/sbbs3 mailsrvr.c 1.678 1.679
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv18387

    Modified Files:
    mailsrvr.c
    Log Message:
    Lower the "MAIL BASE LOCKED" SMTP log message severity from critical
    to warning - this is normal/expected (e.g. when mail base is being
    backed-up).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Jan 4 19:08:09 2019
    src/sbbs3 mailsrvr.c 1.680 1.681
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv18110

    Modified Files:
    mailsrvr.c
    Log Message:
    Return a 250 "ok" response to mail received-and-forwarded rather than the
    251 response which was made optional in RFC2821 - to address privacy
    concerns.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 11 05:32:30 2019
    src/sbbs3 mailsrvr.c 1.685 1.686
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26532

    Modified Files:
    mailsrvr.c
    Log Message:
    RFC822 "To" fields can contain multiple names/addresses, so can't use
    strrchr() here to find terminating chars (quotes, parens, brackets).
    e.g. '"Joe Shmoe" <joe@shmoe.com>, "Fred Smith" <fred@smith.org>'
    would be parsed as 'Joe Shmoe" <joe@shmoe.com>, "Fred Smith'.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 11 05:44:31 2019
    src/sbbs3 mailsrvr.c 1.686 1.687
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28297

    Modified Files:
    mailsrvr.c
    Log Message:
    Parse the *first* email address found in "To" header fields, not the last.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 11 08:04:56 2019
    src/sbbs3 mailsrvr.c 1.687 1.688
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv16891

    Modified Files:
    mailsrvr.c
    Log Message:
    Set the (new) MIMEATTACH auxattr flag when receiving mail messages that contain MIME-encoded/embedded attachments.
    We probably will want to do this for SMTP-posted messages (to subs) too.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Apr 29 01:02:13 2019
    src/sbbs3 mailsrvr.c 1.689 1.690
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8474

    Modified Files:
    mailsrvr.c
    Log Message:
    Actually store the SMTP forward-path of received mail messages in the message headers



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Apr 29 01:45:01 2019
    src/sbbs3 mailsrvr.c 1.690 1.691
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix GCC warning: pointer targets in assignment differ in signedness



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed May 1 04:36:56 2019
    src/sbbs3 mailsrvr.c 1.691 1.692
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1989

    Modified Files:
    mailsrvr.c
    Log Message:
    Bug-fix: if the forward-path is in "<address>" notation, don't include the angle brackets in the "RCPT TO" command sent to the SMTP server. This is an old bug but now appears because we are now (recently) actually storing the SMTP forward-path in the message header.




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed May 1 04:44:03 2019
    src/sbbs3 mailsrvr.c 1.692 1.693
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4314

    Modified Files:
    mailsrvr.c
    Log Message:
    Don't auto-exempt "<<address>>", just "<address>"



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri May 3 00:00:12 2019
    src/sbbs3 mailsrvr.c 1.694 1.695
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27392

    Modified Files:
    mailsrvr.c
    Log Message:
    Set the MSG_SENT netattr attribute flag after sending an email via SMTP but after sending via POP3 (the MSG_READ attribute flag is already indicating that).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat May 11 05:23:50 2019
    src/sbbs3 mailsrvr.c 1.695 1.696
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5274

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix most likely cause of new crashes seen in mailsrvr, calls to smb_freemsgmem():
    bounce() is using a strange method of copying a message header in memory
    (not using smb_copymsgmem) and when it frees the message, ends up with a double-free of the 2 new smbmsg_t members (not header fields): text_subtype
    and text_charset.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu May 23 23:02:57 2019
    src/sbbs3 mailsrvr.c 1.696 1.697
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8254

    Modified Files:
    mailsrvr.c
    Log Message:
    Don't read the spamblock.cfg unnecessarily:
    We don't store (findable) hostnames in the file, so don't search for them. Don't search file if the host is listed in the spamblock_exempt.cfg file.
    If you have a really large spamblock.cfg file, this could result in the unnecessary reading of potential many megabytes of data for each inbound
    SMTP connection. We might want to read this file even less frequently and
    store the list in a searchable str_list_t or something.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Jun 22 04:19:41 2019
    src/sbbs3 mailsrvr.c 1.698 1.699
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv14834

    Modified Files:
    mailsrvr.c
    Log Message:
    MIME-encoded headers (header field values with RFC 2047 "encoded-words") are getting kind of crazy common now and being employed even when totally unnecessary (e.g. encoding strings that contain just plain ASCII):
    - normalize message header fields, when possible
    - normalize UTF-8 encoded characters, when possible (e.g. special punctuation
    chars)

    This allows text filters (e.g. subject.can, name.can) to work on MIME-encoded header fields and notifications about received e-mails are legible to humans.

    Encoded-words that contain actual non-ASCII/CP437 chars (e.g. foreign symbols, emojis) are left as encoded-words to be dealt with by whatever displays the message header.

    Special handling of folded normalized field values was necessary because
    "White space between adjacent 'encoded-word's is not displayed." (per RFC 2047)


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Jun 22 04:50:57 2019
    src/sbbs3 mailsrvr.c 1.699 1.700
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix warnings from GCC.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Jun 28 20:05:39 2019
    src/sbbs3 mailsrvr.c 1.700 1.701
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Translate UTF-8 "horizontal ellipsis" to 3 ASCII '.'s when normalizing MIME-encoded headers.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Jul 6 04:43:03 2019
    src/sbbs3 mailsrvr.c 1.701 1.702
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26117

    Modified Files:
    mailsrvr.c
    Log Message:
    Moved normalize_utf8() to src/enocde/utf8.c: utf8_normalize_str().



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Jul 6 05:04:41 2019
    src/sbbs3 mailsrvr.c 1.702 1.703
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix GCC warning about signedness.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Jul 6 19:10:43 2019
    src/sbbs3 mailsrvr.c 1.703 1.704
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5185

    Modified Files:
    mailsrvr.c
    Log Message:
    Double the size of the tmp buffer in parse_mail_address() (from 128 to 256 chars) so that massize MIME encoded header fields can be parsed successfull. :-|



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Jul 24 23:19:04 2019
    src/sbbs3 mailsrvr.c 1.705 1.706
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28008

    Modified Files:
    mailsrvr.c
    Log Message:
    Use new smb_msg_is_utf8() to set default MIME content-type charset to UTF-8 (e.g. for UTF-8 Fido or QWK netmail messages sent over SMTP or POP3).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Aug 2 05:17:29 2019
    src/sbbs3 mailsrvr.c 1.706 1.707
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17512

    Modified Files:
    mailsrvr.c
    Log Message:
    Use the RFC822* header fields, only when the actual header fields are MIME-encoded.
    If any RFC822* header field is a MIME-encoded UTF-8 string, then set the
    (new) auxattr MSG_HFIELDS_UTF8 flag. This will be used (soon, hopefully) to display UTF-8 encoded header fields to users. There's a gotchas here:
    - MIME-encoded header fields with other non-ASCII/8-bit charsets (e.g. CP437,
    ISO-8859) are still stored "as decoded", though the MSG_HFIELDS_UTF8 flag
    may be set *later* (which would be weird), resulting in a mixture of valid
    and invalid UTF-8 header fields. One solution would be to UTF-8-transcode all
    the non-UTF-8 header fields if *any* of them are UTF-8, but we wouldn't
    know which charset to translate *from*. Assuming CP437 isn't going to be
    correct 100% of the time - so punt for now and deal with it at display
    time. e.g. if the MSG_HFIELD_UTF8 auxattr flag is set, but an hfield contains
    invalid UTF-8 data, don't display as UTF-8 (e.g. treat as CP437). We don't
    have translations for other charsets (e.g. ISO-8859) setup yet anyway.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Aug 2 11:02:34 2019
    src/sbbs3 mailsrvr.c 1.707 1.708
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    mailsrvr.c
    Log Message:
    Resolve GCC warnings:
    pointer type mismatch in conditional expression
    format '%s' expects argument of type 'char *', but argument 5 has type 'void *'




    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Aug 3 01:30:50 2019
    src/sbbs3 mailsrvr.c 1.708 1.709
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8081

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix bug reported by PSI-Jack:
    Advertise STARTTLS support (in EHLO response) when *not* already using a TLS connection.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Aug 3 06:35:55 2019
    src/sbbs3 mailsrvr.c 1.709 1.710
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv15234

    Modified Files:
    mailsrvr.c
    Log Message:
    Don't retain linear-white-space between MIME encoded-words in header fields when decoding. Linear-white-space between regular atoms or between atoms
    and encoded words is retained (as a single space character, Yoda).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Aug 9 06:44:22 2019
    src/sbbs3 mailsrvr.c 1.710 1.711
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24768

    Modified Files:
    mailsrvr.c
    Log Message:
    Don't store the original RCPT TO argument (forward-path) when the message
    is being forwarded to an external email address. Introduced in rev 1.690, user-forwarded emails wouldn't work because sending envelope would contain
    the original forward-path. Thanks again to Alterego (ALTERANT) for testing
    this stuff and reporting issues with detail!



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sun Sep 1 03:25:38 2019
    src/sbbs3 mailsrvr.c 1.712 1.713
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21038

    Modified Files:
    mailsrvr.c
    Log Message:
    Bug-fix: wasn't actually using the MIME-decoded "From" header field. <sigh>



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Sep 4 04:16:48 2019
    src/sbbs3 mailsrvr.c 1.713 1.714
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4776

    Modified Files:
    mailsrvr.c
    Log Message:
    Don't put UTF-8 chars in the new e-mail user notification message/telegram.
    We don't yet support UTF-8 in node/user messages.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Sep 9 03:41:52 2019
    src/sbbs3 mailsrvr.c 1.714 1.715
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5433

    Modified Files:
    mailsrvr.c
    Log Message:
    Must parse the "name" from '"name" <user@addr>' before MIME-decoding the
    name. This is a fix for "From", but "To" and "CC" header fields would need
    a similar fix (not included in this commit).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Sep 24 05:35:47 2019
    src/sbbs3 mailsrvr.c 1.715 1.716
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6320

    Modified Files:
    mailsrvr.c
    Log Message:
    Remove the redundant /TLS's from the cryptlib error strings.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sun Mar 15 07:52:17 2020
    src/sbbs3 mailsrvr.c 1.717 1.718
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv30700

    Modified Files:
    mailsrvr.c
    Log Message:
    Typo.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 9 02:48:49 2020
    src/sbbs3 mailsrvr.c 1.720 1.721
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4643

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix bug introduced in previous commit of this file (8 months ago):
    If the RECIPIENTTOLIST header fields exists and the RFC822 header field
    does not exist, that means the original RFC822 "To" field was not MIME-encoded, which is the majority of email. The routine that converted an smbmsg_t to an RFC822 header did not use this new field however (ignored it). Whoops. So multiple recipients were reflect in the To field and the original destination address(es) in the To field weren't passed on either. Thanks, Frank!


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Apr 24 02:04:44 2020
    src/sbbs3 mailsrvr.c 1.722 1.723
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8466

    Modified Files:
    mailsrvr.c
    Log Message:
    REPLYTOLIST gets the RFC8822REPLYTO treatment. It was the last of the MIME-decoded header fields not to be handled appropriately in the mail server.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Apr 27 22:38:02 2020
    src/sbbs3 mailsrvr.c 1.723 1.724
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4141

    Modified Files:
    mailsrvr.c
    Log Message:
    When creating an FTN netmail message, set the "LOCAL" attribute flag in
    the net-attributes header fields.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 30 21:12:05 2020
    src/sbbs3 mailsrvr.c 1.724 1.725
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv15089

    Modified Files:
    mailsrvr.c
    Log Message:
    Set the KILLSENT network attribute for created Internet email messages when enabled in SCFG->Networks->Internet (new option).
    Do the same for FidoNet NetMail messages routed via SMTP.
    Only auto-delete sent Internet mail messges when either the KILLSENT
    network attribute flag is set or there was no SENDEREXT (from_ext) on the sent message.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue May 5 14:07:20 2020
    src/sbbs3 mailsrvr.c 1.725 1.726
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv9715

    Modified Files:
    mailsrvr.c
    Log Message:
    Don't send mail that has already been sent (but not deleted).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue May 5 14:44:44 2020
    src/sbbs3 mailsrvr.c 1.726 1.727
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17555

    Modified Files:
    mailsrvr.c
    Log Message:
    MSG_SENT is in the netattr field, not the attr field. Double-oops. Thanks Dan_C and Nelgin for bringing to my attention.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue May 5 16:53:35 2020
    src/sbbs3 mailsrvr.c 1.727 1.728
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv7688

    Modified Files:
    mailsrvr.c
    Log Message:
    *always* set the KILLSENT attribute flag on email/netmail received for relay via SMTP (regardless of the Internet/Fido netmail setting in SCFG).
    The sender should already have a copy (e.g. in their outbox), if they want to keep it.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jun 1 19:55:10 2020
    src/sbbs3 mailsrvr.c 1.729 1.730
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5122

    Modified Files:
    mailsrvr.c
    Log Message:
    Address problem reported by Nelgin via IRC with IPv6 DNS server address:
    SEND using auto-detected DNS server address: 2001:4860:4860::
    !SEND INVALID DNS server address: 2001:4860:4860::
    Fix off-by-one buffer overflow while at it.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jun 1 22:43:54 2020
    src/sbbs3 mailsrvr.c 1.730 1.731
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27071

    Modified Files:
    mailsrvr.c
    Log Message:
    Fix: IPv6 address problem reported by Nelgin via IRC.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jun 1 23:11:58 2020
    src/sbbs3 mailsrvr.c 1.731 1.732
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv30655

    Modified Files:
    mailsrvr.c
    Log Message:
    Revert previous commit: this was not a/the problem.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jul 20 01:11:17 2020
    src/sbbs3 mailsrvr.c 1.732 1.733
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv13436

    Modified Files:
    mailsrvr.c
    Log Message:
    Add FTN message-ID to SMTP->FTN gated email/netmail messages.
    FTN Reply-IDs are not added here (yet).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sat Aug 29 17:41:29 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/cdf1b613a690c62c3d8d538f
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Add one (lower severity) of cryptlib log messages in the mail server
    (e.g. errors become warnings) - I'm tired of seeing this in my
    error.log every day:
    SEND/TLS ... ERROR 'Received TLS alert message: Handshake failure' (-15) setting session active

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sun Aug 30 17:32:39 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/203935575588938fecb97bf7
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Only over-ride (lower the severity) of the cryptlib log msg for a single case

    Add another "get cryptlib error string" (at least, that's what I assume GCES stands for) that allows the log level to be specified, rather than derived
    from Cryptlib thinks the log level should be. Do this rather than adding one (lowering the severity) of every cryptlib log message as I did in the previous commit to this file.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob@VERT to Git commit to sbbs/master on Wed Oct 21 00:24:09 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/1161e2cfd91d12b76f2d7267
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Reject control chars in base64-decoded auth credentials (name/password)

    Also, if getuserdat() fails, don't count that as a failed login attempt.
    Also, track username and password of failed-login attempts of deleted or inactive user accounts.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Wed Oct 21 01:02:58 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/f4c8a61b08aaa0e073df48cf
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Resolve GCC warning: passing argument 5 of ‘xpms_accept’ from incompatible pointer type

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Thu Oct 22 05:36:21 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/68770a4ef6e4826c8c77a1bf
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Address inconsistencies in log message formats.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Thu Oct 22 21:35:37 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/6750004aab59e7902c5e2acc
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    RFC[2]821 does not allow a space between MAIL FROM:/RCPT TO: and the <addr>

    Weird that no mail server has ever complained; I guess they're all prettty "liberal in what they accept".

    Also, eliminated an unnecessary strcpy() call.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Fri Oct 23 01:46:09 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/6851910b53701135226934b4
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Add IP address or authenticated user name to SMTP server log messages.

    This might not be so great for IPv6 connections (let me know).

    Also, use macro for the maximum received SMTP bad command magic number.

    Fix-up the sender and recipient info included in log messages in the sendmail thread too.

    Bumped rev to 1.735.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Fri Oct 23 05:51:57 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/fd4692eade59d264c901fa40
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Exclude authenticated connections from MaxConcurrentConnections limit

    Like the Terminal Server, don't count authenticated connections against the MaxConcurrentConnections limit.

    Only authenticated users with passwords (not Guest) count as authenticated connections.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Fri Oct 23 05:53:14 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/a1aec694f1d420510239a516
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix printf format typo.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sat Oct 24 04:11:29 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/816ea9edb2677124f76bcb19
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    More log message overhaul. POP3 CAPA cmd support in transaction state.

    Log the IP address first in most log messages.
    Condense white-space in log messages to a single space.
    Log the server IP address of incoming connections.
    (more) Intelligent email address enclosure in angle-brackets.
    Better duplicate address comparison (just for log message).
    Fix wrong order of lprintf arguments in !UNKNOWN USER log message (new bug).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sun Oct 25 02:06:02 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/26638e25ade85142b42221b9
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    More log message updates.

    Putting IP addresses first.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Mon Oct 26 03:22:23 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/8cea25da893d72b9c13bf1ca
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Use a mutex to serial message saving among multiple clients/threads

    This work-around shouldn't be necessary, but at least on my Linux/Samba setup, when GitLab sends out notification emails to subscribers and creates 4+ simultaneous SMTP connections and sends email messages, sometimes (often) it ends up with a lock-timeout on the mail base. The file locking should handle the contention fine, but somehow I end up in scenarios where savemsg() takes 30 seconds to complete (the configured SMB lock-timeout is 30 seconds, likely not a coincidence) - and this causes other clients to timeout trying to lock the base. Just use a sharead-mutex here instead as a work-around. The wait time is indefinite, might want to consider using a timed-wait instead.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Mon Oct 26 03:27:49 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/d0faa35d1132891d0652eb2d
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Address warning: type defaults to ‘int’ in declaration

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Thu Nov 5 00:47:52 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/ba8d544c7f1a3340dd967fd1
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Detect and reject forged "from" fields in submitted msg headers

    For non-authenticated SMTP clients, if the "From:" header field contains a "name" which appears to be an email address (i.e. it has an '@' in it), and that address does not match the *actual* address in the "From:" field, reject the mail with an error message about the forged/mismatched address.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sat Nov 7 00:54:42 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/3aacaa64b56053c89bdc9c2b
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix sendmail bug introduced in 6851910.

    The "MAIL FROM" command argument must always be enclosed in angle-brackets. Some mail servers (e.g. gmail, aol) would reject messages not delivered in this manner, e.g.:
    mx-aol.mail.gm0.yahoodns.net replied with:
    "501 Syntax error in parameters or arguments tnmpmscs"
    instead of the expected reply:
    "250 ..."
    gmail-smtp-in.l.google.com replied with:
    "555 5.5.2 Syntax error. o6si11103060plk.317 - gsmtp"
    instead of the expected reply:
    "250 ..."

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Fri Nov 20 18:57:28 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/d6ec78eb57aad4118cd67879
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    MS Outlook can place names of to/from users in single-quotes

    Parse single-quoted "name" portion of email-addr header fields. I don't think this is going to fully solve the issue with FTN netmail gated to SMTP and replied via Outlook, but it's a start. Try that Nelgin.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sat Nov 21 20:00:52 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/24021e05aa64a7c4c84c787a
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    The Received/trace header should contain the forward-path for "for"

    instead of the potentially-alias'd delivery address. The angle-brackets
    (now included) appear to be standards-compliant.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sat Nov 21 20:44:43 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/22faceeef77fe05b98d707f9
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Better FTN netmail gating support

    Revert the previous change to the mailsrvr (don't try to parse the MS Outlook singled-quoted names in to/from header fields).

    Instead, use the new matchusername() to perform a liberal name match against the name portion of the destination email address and if it matches, go ahead and use the quoted-name field. Otherwise, use the name portion of the destination address as the TO field for the FTN netmail message.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wed Dec 30 04:10:06 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/b5d19603092a4f4c978e7313
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Connection and logon linked lists need re-init for every recycle

    Each list mutex is destroyed in the call to listFree() in cleanup(). Without a call to listInit(), the mutex is not recreated and thus the lists are no longer mutex-protected after a recycle. No negative consequences were observed from this issue, but a potential issue it is (was).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Jan 22 23:22:42 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/dd121bcf7f0a690659ba5858
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix bug introduced in c90ba307 - line endings stripped from rx'd mail

    An unrelated optimization (elimination of an unnecessary use of fprintf) resulted in a new bug that combined all lines from SMTP-received mail messages into a single long line, thus breaking all decoding ability of multi-part MIME messages (where blank lines are significant).

    Went ahead and replaced some other unnecessary uses of fprintf(), replaces with fputs() while at it.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Jan 22 23:30:28 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/acede36f01fcda7c4384c776
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Don't support yields per x lines on SMTP receive

    Consume the SMTP lines as fast as possible since the sender may be on the
    local network (or even local/loopback interface!) and could get way ahead and timeout otherwise, resulting in the "premature evacuation" error (and dumping of the received message) on the receive side. This resolves an observed issue with sending large attachments to the mail server at very high rates and the sending client timing and disconnecting waiting for a response from the server (which was throttling the receive using YIELD).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Dream Master@VERT/CIAD to Rob Swindell on Sat Jan 23 03:55:42 2021
    Re: src/sbbs3/mailsrvr.c
    By: Rob Swindell to Git commit to main/sbbs/master on Fri Jan 22 2021 06:22 pm

    An unrelated optimization (elimination of an unnecessary use of fprintf) resulted in a new bug that combined all lines from SMTP-received mail messages into a single long line, thus breaking all decoding ability of multi-part MIME messages (where blank lines are significant).

    Well, that makes perfectly good sense now. I got a couple messages this morning and they were one really long line. Thank you for fixing this. I'll update tonight.

    Brian Klauss <-> Dream Master
    Caught in a Dream | caughtinadream.com a Synchronet BBS

    ---
    ■ Synchronet ■ Caught in a Dream - caughtinadream.com
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jan 23 06:18:32 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/84009d35bf2f1295a0407699
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Close the mime part even when error opening file

    If there was an error opening a file for attachment, the MIME part would be left unterminated.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Feb 5 02:15:16 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/93208aa960574b21dd2c5ceb
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Support quoted filenames in message subjects

    "Old style" (e.g. FTN netmail) attachments put the filename(s) in the message subject. Supported quoted-filenames in the message subject (i.e. to support filenames with spaces in them) in addition to the traditional space-delimited filenames. Mixing quoted and space-delimited filenames (for multiple attached files) in a single message subject is supported.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Feb 15 04:17:15 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/8c28acaba05ac4cb96d245e4
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix exception (crash) when sending file attachments

    The new subject line parsing (with quoted-filename support) had a NULL-pointer deref built-in.

    Also fixed a few Coverity-reported issues.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Feb 19 04:00:43 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/27079b332cf5f21ef40fe1da
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Recognize DNB blacklist exempted email addresses in From fields

    Previously, any DNS blacklist-exempt email addresses (in ctrl/dnsbl_exempt.cfg) had to be used in the mail-envelope (the "MAIL FROM:" address) - that doesn't work for all senders that use re-mailers or whatever where you end-up with some *bounce* address as the envelope-sender.

    So now, clear the DNSBL results when the From header field is parsed and the sender was in fact an exempt sender. Note: the Subject line will still contain the SPAM tag if the subject was parsed first (came earlier in the message header). May need to address this limitation in the future if it turns out to be a problem (!).

    Lowercase the [smtp|smtps]spy.txt log file.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Feb 19 17:52:15 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e9329f6cdac406bf079f4347
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Correct the parse_mail_address() argument order

    Issue introduced in previous commit to this file. The name arg(s) comes before the address arg(s).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Mar 6 13:31:51 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/427e1cb4f8a502955459b0f9
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Don't send default MIME Content-type for msgs with attachments

    The file attachments, when MIME-encoded, already include a MIME Content-type header field, so don't send another. This should fix issue #233.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Apr 24 00:28:03 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/c21d535dc7b127e029c0203a
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix observed crashes at end of pop3_thread() and smtp_thread()

    "startup" was being deref'd after the caller free'd it because these thread functions were calling thread_down() before calling mail_close_socket(), which deref's startup which was subject to a race condition.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jul 31 13:00:34 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/02448be248a5393ec95d4eaa
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    When logging sender address forgeries, log the address being forged

    Helpful for debugging issues with this forgery detection logic (if there are any).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jul 31 13:00:34 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/56bc209648a1a198b6973384
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Don't allow unauthenticated DNS-blacklisted clients to post on subs

    Eliminate some of the infrequent SPAM posts to the SYNCPROG conference. Maybe make this behavior configurable?

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Nov 16 18:20:55 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/3c55d333a2103630ec874457
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Include twit-listed sender name in quotes in log message

    Since mail server log messages have their white-space condensed, it was not obvious why some sender's name would match a twitlist.cfg line that filters names beginning with a space: "\ *" because the initial space of the sender's name was condensed/combined with space before it in the log message.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Dec 30 14:31:31 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/82da48b3887373503a3ee17c
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    If SMTP-transmit-relay is enabled by no relay server, disable

    log an error message and disable the transmit-relay in this detected-misconfiguration case.

    Fixes issue #315 reported by Nelgin.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Feb 7 20:10:13 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/427599b46e19dc809a5fb268
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix compile issue in previous commit. <blush>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Mar 1 20:30:39 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/bff956a191a7427dc0acafe4
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix host name or IP address-based smtpspy.txt logging

    Caught by Coverity-scan (use of uninitialized variable, 'str') :-)

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Mar 7 17:53:41 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/304f72934c3e401e7cc92ea8
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix issue with smtpspy-listed names added in previous commit

    p (which is used after this) points into 'str', so we can't use 'str' as a temporary variable here.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Tue Feb 21 16:52:12 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/ce90be9ea7fcacddfd60628c
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix corrupted RFC822 msg headers when a header field was > 1024 chars

    When sending an SMB message header via SMTP or POP3, some header fields (lines) could potentially be longer than 1024 and yet sockprintf() was limited to sending 1024 bytes (actually 1022 plus CRLF). This could result in some messages not being sent correctly: header field truncated, not CRLR-terminated, and notably resulting in MIME message contents not being decoded properly in a message viewer/reader. Example (Content-Type is part of the previous header field/line):
    x-ms-exchange-antispam-messagedata-0:
    =?us-ascii?Q?cm9T1Q9G65VC/lKTTqhODKhy5lHT2y6WWMb/WyvJ+EeGEwYmY7ILhzE3yfNM?=
    =?us-ascii?Q?KeFWN9T/PqHBya1plKf/sHgaw0iRmI7Hq+u9Dp4bG8OqdniKQlK+Aa27oXMd?=
    =?us-ascii?Q?Hly6OEYaSu7jbhGGY89LF0gyRVqquqxkaMfpKvG+h4cQnnu4Tl8YAKeE39a2?=
    =?us-ascii?Q?lHW3372ulmb9jvvZU72J2RtZYkuoIr+Wsqhfyuj39wTZ/+C4qKCsYrmTxrki?=
    =?us-ascii?Q?fBZ4gMPzWkrcWAr7zPcXBg8bphJJB8VJFUjQyksA3EG4dtH8+TZeEcNNBmHf?=
    =?us-ascii?Q?oCGnV9wHr9HszzrSkkZ2GGyh3QZLHAVDNe7wDXSy7HJttZugf9kNqKGeaYQL?=
    =?us-ascii?Q?TpljH1aHPe7MiSP9Dmp/xHQ/DWQOZDx5guNS+iMciMt5p5ad+SkQye0hWRhd?=
    =?us-ascii?Q?usHvpllclzIee6lxJ0VSPAzHGlAOhtOolrHdDB2ODjvkEzU7L2Fj2f5x7p9q?=
    =?us-ascii?Q?9d6sUgSz7vZVx8yyR3KPq3jIX0QUnl0xr2Mix9xcmMNcg0yFLPcznqBdLVa8?=
    =?us-ascii?Q?IC7j0+8oy4BjYxr8Z3elxMC2JKq13gPYgR95cwm6hMDiZbMB4EW/J1uJhD/I?=
    =?us-ascii?Q?RIIqTZ+Ywt8nKOfXj6/a9Aauf0wN71QKKA+in7KY9oksIhkUGvWOrtJwkVDL?=
    =?us-ascii?Q?Q2UFrBBJyQHJgumj5Y+bG8FDk/55IfyV9XYEcsdLL4bCF+HX4QPHZCw4P+li?=
    =?us-ascii?Q?bRvN+UxOO8hgXVkgB1q8mNJ62yQuaj0AContent-Type: multipart/alternative;
    boundary="_000_SN6PR07MB454477F4C32C66D48BA0B02187A09SN6PR07MB4544namp_"

    Solved by using asprintf() instead of snprintf() for dynamic string formatting and allocation in one go. Using realloc() to expand the buffer for the appended/required CRLF.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Mon Feb 27 17:30:35 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/b19288125fb9470836cf50af
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Reject SMTP session from any client that sends illegally-long lines

    Log a warning message and send a "500 Line too long" before disconnecting any SMTP client that sends lines > 998 characters in length. Technically, we can handle lines up to 1023 characters, but then we could get out of sync with the client if it sends exactly 1023 chars and then a new-line char (which we would interpret as a blank line, separating the message header and body) - so just punt the client who doesn't obey the rules of the protocol.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Feb 27 17:32:16 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/7611f92f4057dae1dd11878a
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Resolve new GCC printf-format warning in new log message text

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Mon Feb 27 18:33:56 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/4c6cc08369da690cae967264
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Handle illegally-long received SMTP lines better

    SMTP commands have a shorter limit (510 versus 998) and the body text line limit needed to account for dot-stuffing.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Mar 2 01:11:32 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/2852540e7b592e32195f03b8
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix false FORGED mail header 'FROM' field detection/rejection

    Pretty much any From field that contains an '@' in the username portion
    was subject to comparison to the full email address, but clearly some of
    these rejected emails were not forge attempts:

    'Chris @ StubHub' vs 'events@mail.stubhub.com'
    'Eric S. Raymond (@esr)' vs 'gitlab@mg.gitlab.com'

    Fixed by requiring that the sender name is actually a well-formed Internet email address using smb_netaddr_type(), which was also recently improved to
    be more accurate.

    Unrelated change: include reverse-path (email address for bounces) in ILLEGALLY-LONG body and header line log messages (usually SPAM from what
    I can tell).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Mon Apr 3 19:54:50 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/0f4325eece0e65872ce008c9
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Publish SMTP[S] user authentications to the action/login/PROTOCOL topic

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Jun 4 11:45:29 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/fb11866c6dadbd6a8d861b77
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix potential NULL pointer deref in rblchk(), observed via segfault lately

    I'm not sure why this one only started popping up now, but h_addr_list is a NULL-terminated list and it makes perfect sense that the first entry could
    be the NULL-terminator.

    gethostbyname is obsolete/deprecated and we should address that in a separate commit.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Sun Jun 4 11:46:13 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/1f7cd77aef826d3256ae4e2e
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Check return value of fread()

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Nov 1 15:23:13 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/f689169a82124f18d5e4ccd9
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Close socket after logging the "REFUSED SESSION from blacklisted server" msg

    Fixes issue #670

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Dec 13 19:11:22 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/a35cb08fb0a5f69bbe11f010
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Better resource (e.g. client thread) management

    My mail server was suddenly and inexplicably creating thousands of SMTPS
    client threads, each with a unique remote IP address, and each eventually failing with the rather obscure log message (from cryptlib):
    dbg 'Cannot read item from object' (-41) setting session active

    Eventually (after not long, really), the server would run out of resources
    and fail in weird and wonderful ways (can't malloc, can't create JS runtime
    or context, etc.). The max_clients limit (100, as I have it set) wasn't being effectively-imposed on SMTPS connections.

    The root-cause: the active_clients (counter) wasn't incremented until *after* the cryptlib/TLS setup for SMTPS connections and SMTPS/TLS connections can
    take a long time to fail, resulting in a vulnerability to an effective denial of service attack.

    Raise the minimum severity of all cryptlib/TLS log messages from Debug to
    Info.

    Create wrappers for smtp_thread() [now smtp_client_thread()] and pop3_thread [now pop3_client_thread()] that handle basic resource management (thread counters, active client counters, the client socket).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Dec 13 22:26:09 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/7d9c8624f7d9c5e0fd1cd5a7
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix extra decrement of active_clients (added in previous commit)

    And fix some use of CRYPT_UNUSED instead of cryptlib session ID.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Dec 14 16:39:05 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/f43e852a170d27afdf6e33a4
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    SMTP mail server wasn't RFC 4954 compliant for "AUTH PLAIN" logins

    The base64-encoded credentials can either be supplied with the AUTH PLAIN command or in response to a 334 server-challenge. We only supported the
    former form and logged a warning ("Missing AUTH PLAIN argument") when we received the latter. No warning is logged now and the appropriate server-challege is sent and the response accepted and base64-decoded and
    parsed as before.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Dec 16 23:31:15 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/952a25f17aa96355e4c92e95
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    More commonization of "CLIENT BLOCKED" log messages

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Jan 22 19:40:40 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/62b866c243d9a8201c55b6fa
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    If cryptInit() fails, just disable TLS support

    But continue initializing/running for other non-TLS protocol support.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:00:48 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/fa5ae01239d3488112dae489
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Some more printf formats... mostly off_t but also a size_t and an time_t

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:11:24 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/76055e3d35e795f4ceeefb0e
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Add missing header?

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:20:25 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/f44997570fb796b34f99285f
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Aha! XP_PRIsize_t is a *size*, not a *type*.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:35:39 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/aaa82ca4c9a5aac286603272
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Oh damn, this is an off_t + size_t + 1... talk about the wild west of types!

    Both long long and long are reasonable for some mixes of platforms.

    Just punt, cast the whole thing to int64_t, and forget about it.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Feb 15 22:55:31 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/5cc3767eb1d56bb0db294f86
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Use fnopen() for auto-retry when opening dnsbl_exempt.cfg for append

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