Skip to content
Snippets Groups Projects
  1. Mar 08, 2021
  2. Mar 06, 2021
    • Rob Swindell's avatar
      Allow fine-grained control over JavaScript compiler options via *.ini · b82be101
      Rob Swindell authored
      JavaScriptOptions bit-field can be set in sbbs.ini and jsexec.ini to over-ride the default JS compiler options which have been changed from 0 to (options previously only used by JSDoor):
      JIT | METHODJIT | COMPILE_N_GO | PROFILING
      
      * JIT - TraceMonkey
      * METHODJIT - JägerMonkey
      * COMPILE_N_GO - compile-time scope chain resolution of consts
      * PROFILING - Choose between TraceMonkey and JägerMonkey at compile-time based on profiling results
      
      Other options available but not enabled by default:
      * STRICT - warn on debious practice (i.e. similar to "use strict")
      * WERROR - convert warnings to errors
      * VAROBJFIX -  use last object on scope chain as the ECMA 'variables object'
      * RELIMIT - Throw exception on any regular expression which backtracks more than n^3 times, where n is length of the input string
      * ANONFUNFIX - Disallow function () {} in statement context per ECMA-262 Edition 3.
      * METHODJIT_ALWAYS - Always whole-method JIT, don't tune at run-time.
      
      Also:
      - Fixed JS warning string formatting (missing space separator).
      - Removed an extraneous new-line in lprintf() call in mailsrvr.
      - Added basic assertEq() global method to jsexec, required when running SpiderMonkey test scripts.
      b82be101
    • Rob Swindell's avatar
      Don't send default MIME Content-type for msgs with attachments · f875593a
      Rob Swindell authored
      The file attachments, when MIME-encoded, already include a MIME Content-type
      header field, so don't send another. This should fix issue #233.
      f875593a
  3. Mar 04, 2021
    • Rob Swindell's avatar
      Ignore filenames in subject that aren't valid filenames, e.g. "Fwd:" · e6f7ab9c
      Rob Swindell authored
      There were 2 bug identified by issue #230:
      - the "Fwd:" prefix being added to the message subject was being treated as a filename. I first thought to just remove this subject tag, but then thought it best to just ignore obviously invalid filenames in the subject in the first place.
      
      - when forwarding files to a netmail address, the 'to' extension (user number) is 0, so the file will be in the data/file/####.out directory of the sender instead.
      
      We have 4 places (at least) where the message subjects are parsed and only one of those places currently supports quoted filenames (e.g. with spaces in them) and some of the others (e.g. QWK) don't support multiple filenames at all. That should be fixed.
      e6f7ab9c
  4. Feb 22, 2021
  5. Feb 19, 2021
    • Rob Swindell's avatar
      Correct the parse_mail_address() argument order · ba5f06d0
      Rob Swindell authored
      Issue introduced in previous commit to this file. The name arg(s) comes before the address arg(s).
      ba5f06d0
    • Rob Swindell's avatar
      Recognize DNB blacklist exempted email addresses in From fields · fda59d76
      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.
      fda59d76
  6. Feb 18, 2021
  7. Feb 15, 2021
  8. Feb 14, 2021
  9. Feb 05, 2021
    • Rob Swindell's avatar
      Support quoted filenames in message subjects · bd117e89
      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.
      bd117e89
  10. Jan 24, 2021
    • Rob Swindell's avatar
      Better charset handling of outbound mail · 41847fa7
      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).
      41847fa7
  11. Jan 23, 2021
    • Rob Swindell's avatar
      Close the mime part even when error opening file · bbc06cb3
      Rob Swindell authored
      If there was an error opening a file for attachment, the MIME part would be left unterminated.
      bbc06cb3
    • Rob Swindell's avatar
      Don't support yields per x lines on SMTP receive · cf8c5664
      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).
      cf8c5664
    • Rob Swindell's avatar
      Fix bug introduced in e9f56e5d - line endings stripped from rx'd mail · 459893f5
      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.
      459893f5
  12. Jan 21, 2021
    • Rob Swindell's avatar
      Support single-part MIME-encoded messages in SMBLIB · e9f56e5d
      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.
      e9f56e5d
  13. Jan 18, 2021
    • Rob Swindell's avatar
      Safe string handling with config-load error messages · 4a13b65d
      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...
      4a13b65d
  14. Dec 30, 2020
    • Rob Swindell's avatar
      Connection and logon linked lists need re-init for every recycle · 7a331c29
      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).
      7a331c29
  15. Dec 27, 2020
    • Rob Swindell's avatar
      Don't allow forwarding-netmail loops · 7d80f345
      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).
      7d80f345
  16. Dec 13, 2020
  17. Nov 24, 2020
    • Rob Swindell's avatar
      Stop pretending to configure the JavaScript Context stack · a9a1b9e5
      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.
      a9a1b9e5
  18. Nov 21, 2020
    • Rob Swindell's avatar
      Better FTN netmail gating support · efa8c523
      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.
      efa8c523
    • Rob Swindell's avatar
      The Received/trace header should contain the forward-path for "for" · ba920fb7
      Rob Swindell authored
      instead of the potentially-alias'd delivery address. The angle-brackets
      (now included) appear to be standards-compliant.
      ba920fb7
  19. Nov 20, 2020
  20. Nov 19, 2020
  21. Nov 07, 2020
    • Rob Swindell's avatar
      Fix sendmail bug introduced in 48fada56. · 77d0a2e1
      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 ..."
      77d0a2e1
  22. Nov 06, 2020
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · ec20d959
      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.
      ec20d959
  23. Nov 05, 2020
    • Rob Swindell's avatar
      Detect and reject forged "from" fields in submitted msg headers · 2aafd333
      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.
      2aafd333
  24. Oct 26, 2020
    • Rob Swindell's avatar
    • Rob Swindell's avatar
      Use a mutex to serial message saving among multiple clients/threads · 3f3f6c26
      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.
      3f3f6c26
  25. Oct 25, 2020
  26. Oct 24, 2020
    • Rob Swindell's avatar
      More log message overhaul. POP3 CAPA cmd support in transaction state. · b4582ecf
      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).
      
      b4582ecf
  27. Oct 23, 2020
Loading