• src/sbbs3/mailsrvr.c

    From rswindell@1:103/705 to CVS commit on Sun Jul 19 21: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).

    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Aug 29 13: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 myerror.log every day:SEND/TLS ... ERROR 'Received TLS alert message: Handshake failure' (-15) setting session active
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sun Aug 30 13: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 caseAdd another "get cryptlib error string" (at least, that's what I assume GCESstands for) that allows the log level to be specified, rather than derivedfrom 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 previouscommit to this file.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob@1:103/705 to Git commit to sbbs/master on Tue Oct 20 20: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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Tue Oct 20 21: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
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Thu Oct 22 01: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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Thu Oct 22 17: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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Thu Oct 22 21: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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Fri Oct 23 01:51:57 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/fd4692eade59d264c901fa40
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Exclude authenticated connections from MaxConcurrentConnections limitLike the Terminal Server, don't count authenticated connections against the MaxConcurrentConnections limit.Only authenticated users with passwords (not Guest) count as authenticated connections.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Fri Oct 23 01:53:14 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/a1aec694f1d420510239a516
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix printf format typo.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Oct 24 00: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).
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Oct 24 22: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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sun Oct 25 23: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/threadsThis 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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sun Oct 25 23: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
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Wed Nov 4 19: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 headersFor 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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Fri Nov 6 19: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 ..."
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Fri Nov 20 13: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-quotesParse 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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Nov 21 15: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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Nov 21 15:44:43 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/22faceeef77fe05b98d707f9
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Better FTN netmail gating supportRevert 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.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Tue Dec 29 23: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 recycleEach 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).
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Fri Jan 22 18: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 mailAn 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.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Fri Jan 22 18: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 receiveConsume the SMTP lines as fast as possible since the sender may be on thelocal network (or even local/loopback interface!) and could get way ahead andtimeout otherwise, resulting in the "premature evacuation" error (and dumpingof the received message) on the receive side. This resolves an observed issuewith sending large attachments to the mail server at very high rates and thesending client timing and disconnecting waiting for a response from the server(which was throttling the receive using YIELD).
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Dream Master@1:103/705 to Rob Swindell on Fri Jan 22 22: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
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sat Jan 23 01: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 fileIf there was an error opening a file for attachment, the MIME part would be left unterminated.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Thu Feb 4 21: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.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sun Feb 14 23: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 attachmentsThe new subject line parsing (with quoted-filename support) had a NULL-pointer deref built-in.Also fixed a few Coverity-reported issues.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Thu Feb 18 23: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 fieldsPreviously, 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.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Fri Feb 19 12: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 orderIssue introduced in previous commit to this file. The name arg(s) comes before the address arg(s).
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 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 attachmentsThe file attachments, when MIME-encoded, already include a MIME Content-typeheader field, so don't send another. This should fix issue #233.
    --- SBBSecho 3.13-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 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.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 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 forgedHelpful for debugging issues with this forgery detection logic (if there are any).
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 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 subsEliminate some of the infrequent SPAM posts to the SYNCPROG conference. Maybe make this behavior configurable?
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 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 messageSince 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.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 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, disablelog an error message and disable the transmit-relay in this detected-misconfiguration case.Fixes issue #315 reported by Nelgin.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)