Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

  1. 19 Feb, 2021 2 commits
    • Rob Swindell's avatar
      Correct the parse_mail_address() argument order · e9329f6c
      Rob Swindell authored
      Issue introduced in previous commit to this file. The name arg(s) comes before the address arg(s).
      e9329f6c
    • Rob Swindell's avatar
      Recognize DNB blacklist exempted email addresses in From fields · 27079b33
      Rob Swindell authored
      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.
      27079b33
  2. 18 Feb, 2021 3 commits
  3. 15 Feb, 2021 3 commits
  4. 14 Feb, 2021 1 commit
  5. 05 Feb, 2021 1 commit
    • Rob Swindell's avatar
      Support quoted filenames in message subjects · 93208aa9
      Rob Swindell authored
      "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.
      93208aa9
  6. 24 Jan, 2021 1 commit
    • Rob Swindell's avatar
      Better charset handling of outbound mail · 9c8d7588
      Rob Swindell authored
      The default character set for outbound mail is now auto-determined (when not explicitly specified for a message) between UTF-8, ASCII, and CP437. The [mail] DefaultCharset setting (which fell-back to iso-8859-1 if blank) is no longer "a thing".
      
      Also: specify 8-bit content-transfer-encoding for the (potentially UTF-8 or CP-437) plain text portion of a MIME-encoded message with file attachment (7-bit was wrong) and pass down the text sub-type (e.g. could be "html") for inclusion in the mime-part header (don't assume text/plain, but still use that as default).
      
      Also: log an error when failing to delete an attached file (e.g. from data/file/*.out).
      9c8d7588
  7. 23 Jan, 2021 3 commits
    • Rob Swindell's avatar
      Close the mime part even when error opening file · 84009d35
      Rob Swindell authored
      If there was an error opening a file for attachment, the MIME part would be left unterminated.
      84009d35
    • Rob Swindell's avatar
      Don't support yields per x lines on SMTP receive · acede36f
      Rob Swindell authored
      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).
      acede36f
    • Rob Swindell's avatar
      Fix bug introduced in c90ba307 - line endings stripped from rx'd mail · dd121bcf
      Rob Swindell authored
      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.
      dd121bcf
  8. 21 Jan, 2021 1 commit
    • Rob Swindell's avatar
      Support single-part MIME-encoded messages in SMBLIB · c90ba307
      Rob Swindell authored
      This involved the removal of the content-transfer-decoding feature of the SMTP mail server since we need single-part MIME-attached file contents to be stored in their original encoded form (e.g. base64-encoded) and not in binary, for the message body text (where NULs aren't allowed, CR/LF is appended, etc).
      
      I accidentally made this change to smbtxt.c in the new_file_base branch and then copied over here, so there's some unrelated innocuous changes (comment header, removal of SMBCALL) that hopefully won't cause a merge conflict later.
      
      I don't actually receive single-part MIME attached files, so depending on others (e.g. Nelgin and Dream Master) to test for me.
      c90ba307
  9. 18 Jan, 2021 1 commit
    • Rob Swindell's avatar
      Safe string handling with config-load error messages · 99dbeb14
      Rob Swindell authored
      We were just trusting that the error strings would be shorter than 256 (usually), but since we're including paths and strerror() results, we really have no control over the length of the error strings. So enforce some healthy boundaries. This could explain the crashes that Divarin of Mutiny is seeing with SCFG on WinXP or maybe it was the truncsp(strerror()) stuff that was just removed as well. We'll see...
      99dbeb14
  10. 30 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Connection and logon linked lists need re-init for every recycle · b5d19603
      Rob Swindell authored
      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).
      b5d19603
  11. 27 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Don't allow forwarding-netmail loops · 48627415
      Rob Swindell authored
      Leave it to new users to do weird stuff and define a mail-forward loop. Outsmart them and don't allow forwarding when the destination is a local address (QWKnet, FidoNet, or Internet).
      48627415
  12. 13 Dec, 2020 1 commit
  13. 24 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Stop pretending to configure the JavaScript Context stack · c0cd8686
      Rob Swindell authored
      The argument to JS_NewContext that we were allowing to be configured was not the contest stack size, but rather:
      "The size, in bytes, of each "stack chunk". This is a memory management tuning parameter which most users should not adjust. 8192 is a good default value." - per Mozilla.
      
      So we're just going to use the suggested default, hard-coded.
      c0cd8686
  14. 21 Nov, 2020 2 commits
    • Rob Swindell's avatar
      Better FTN netmail gating support · 22faceee
      Rob Swindell authored
      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.
      22faceee
    • Rob Swindell's avatar
      The Received/trace header should contain the forward-path for "for" · 24021e05
      Rob Swindell authored
      instead of the potentially-alias'd delivery address. The angle-brackets
      (now included) appear to be standards-compliant.
      24021e05
  15. 20 Nov, 2020 2 commits
  16. 19 Nov, 2020 1 commit
  17. 07 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Fix sendmail bug introduced in 6851910b. · 3aacaa64
      Rob Swindell authored
      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 ..."
      3aacaa64
  18. 06 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · 8a7b7308
      Rob Swindell authored
      I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values.
      
      This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service).
      
      The new macros names are bit more descriptive as well.
      8a7b7308
  19. 05 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Detect and reject forged "from" fields in submitted msg headers · ba8d544c
      Rob Swindell authored
      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.
      ba8d544c
  20. 26 Oct, 2020 2 commits
    • Rob Swindell's avatar
    • Rob Swindell's avatar
      Use a mutex to serial message saving among multiple clients/threads · 8cea25da
      Rob Swindell authored
      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.
      8cea25da
  21. 25 Oct, 2020 1 commit
  22. 24 Oct, 2020 1 commit
    • Rob Swindell's avatar
      More log message overhaul. POP3 CAPA cmd support in transaction state. · 816ea9ed
      Rob Swindell authored
      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).
      
      816ea9ed
  23. 23 Oct, 2020 4 commits
  24. 22 Oct, 2020 1 commit
  25. 21 Oct, 2020 3 commits