Skip to content
Snippets Groups Projects
  1. Jan 22, 2025
    • Rob Swindell's avatar
      Add new "PostTo" setting to (optionally) change the recipient of SMTP-posts · b8f2df8a
      Rob Swindell authored
      Messages posted to sub-boards via SMTP normally will have the recipient
      name/address as the "To" (RECIPIENT) value of the posted message. If the sysop
      wishes to replace this string (for all SMTP-posted messages) with a different
      string (e.g. "All") this is the setting to allow that.
      
      I do want web-scrapping spammers to collect the 'to' fields for my TLDR and
      Coverity-scan posts and post their own spam messages via email (any more).
      
      Also accommodate the new link list API (long -> int).
      b8f2df8a
  2. Jan 14, 2025
    • Rob Swindell's avatar
      First pass run of uncrustify (code beautification) · 45c8fa94
      Rob Swindell authored
      White-space changes only, exception being the rare insertion of NL before
      closing brace (couldn't find the option to disable that behavior).
      
      I excluded some header files (e.g. sbbs.h) since uncrustify seemed to be doing
      more harm than good there. I might just end up applying different set of rules
      to .h files.
      45c8fa94
  3. Nov 16, 2024
  4. Jan 20, 2024
    • Rob Swindell's avatar
      The great BOOL->bool conversion in xpdev · 118984e9
      Rob Swindell authored
      Still using BOOL where we need Win32 API compatibility.
      Using JSBool instead of BOOL or bool where it matters.
      Changed most relevant TRUE/FALSE to true/false too (though it's not as critical).
      
      You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case.
      Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case.
      
      For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef).
      
      I didn't convert UIFC yet.
      
      This addresses issue #698
      118984e9
  5. Dec 23, 2023
  6. Dec 20, 2023
  7. May 30, 2023
    • Rob Swindell's avatar
      Add option (for deon) to notify offline users of new received email (SMTP) msgs · 543620f3
      Rob Swindell authored
      The notification of offline users was removed from the mail server 13 years
      ago (commit 729eb16b) without a lot of fanfare or explanation. Add an
      option for notification of offline users (in addition to online users) for
      those sysops that want that behavior.
      
      Use the userdat is_user_online() function in place of the getnodedat() loop,
      which also wasn't considering nodes in "logon" status as having a user online.
      543620f3
  8. Mar 28, 2023
  9. Jan 02, 2023
    • Rob Swindell's avatar
      MQTT support overhaul, mainly for SBBSCTRL compatibility · eb5fdedb
      Rob Swindell authored
      The only difference in the data/scheme is that the "error" topic (error log) is now under each server rather than each host. I don't *think* there are any other changes from the MQTT consumer side.
      
      Still not done: subscribing (e.g. support for recycle or node-spy-input via MQTT) and NT services support.
      
      This change also includes a cool feature that will prompt the sysop if there's a timeout (30 seconds) while waiting for servers to shutdown gracefully and giving the sysop the option to abort (Cancel) the wait (and shutdown ungracefully) or continue the wait (OK).
      eb5fdedb
  10. Dec 12, 2022
  11. Dec 05, 2022
    • Rob Swindell's avatar
      Add support for systemd system state notifications · 7e320d92
      Rob Swindell authored
      When the systemd dev package (e.g. libsystemd-dev) is installed, we can use
      sd_notify() to inform systemd of Synchronet server state/status. The state
      values (READY, STOPPING, RELOADING) are "well known" while the status
      value is a free-form text string (the last lputs output).
      
      Eliminated the free-form status() callback from *startup_t.
      Eliminated the now-redundant started() callback from *startup_t.
      
      Eliminated the use of sbbs_status.c/h as nothing is using that interface
      and while I do plan on using a remote control/monitor interface, I'm
      considering use of a standard pub/sub lib and protocol.
      
      This commit is going to break the Windows sbbsctrl build for sure.
      Probably break the sbbsNTsvcs build.
      7e320d92
  12. Feb 25, 2022
    • Rob Swindell's avatar
      Add/use new text.dat strings for received Fido and Internet mail · a09cc070
      Rob Swindell authored
      - InternetMailReceived
      - InternetMailForwarded
      - FidoNetMailReceived
      - WithAttachment
      - FidoEchoMailReceived
      
      For The Millionaire, closing issue #254
      
      The first string (suppressed with %.0s) is an optional date/time stamp.
      
      This also deprecates (removes support for) the [mail] NewMailNotice and ForwardNotice keys from sbbs.ini.
      a09cc070
  13. Feb 08, 2022
  14. Apr 18, 2021
    • Rob Swindell's avatar
      Update sound (WAV) file play-on-event support in Windows build · b1d61c14
      Rob Swindell authored
      A "hack attempt" sound file is now supported in the Terminal Server, Mail Server,  and Services.
      
      "login" and "logoff" sound files are now supported in the Terminal Server, FTP Server, Web Server, Mail Server, and Services.
      This enhancement fixes Issue #157
      
      The following sound files may now be configured in the [Global] section of the ctrl/sbbs.ini file, if desired to set the default sound files for all servers/services in on place:
      - AnswerSound
      - LoginSound
      - LogoutSound
      - HangupSound
      - HackAttemptSound
      b1d61c14
  15. 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
  16. Oct 21, 2020
    • Rob Swindell's avatar
      Optionally limit concurrent connections to mail server · 51e91369
      Rob Swindell authored
      The mail (SMTP) server is a popular target of bots. Impose a maximum-concurrent-connections limit (optionally). Similar to the terminal server option, except, don't deduct the number of authenticated connections (I can add something like that if desired). The new config option is [mail] MaxConcurrentConnections in the ctrl/sbbs.ini (defaults to 0, no maximum).
      
      Fixed error responses in mail_server accept loop: was always sending POP3 error responses even if the connection was SMTP.
      
      Cleaned-up the service/port checking/logging in the mail_server accept loop: no strcmp() needed, log the protocol name (e.g. "SMTPS") instead of the service name (e.g. "submissions").
      51e91369
  17. Aug 16, 2020
  18. Mar 22, 2019
    • rswindell's avatar
      Use default calling convention (__cdecl) for DLL funcs in Borland builds. · bf82a889
      rswindell authored
      Fix age-old bug with Borland/C++Builder built executables (Windows):
      to achieve compatibility with  the default __cdecl symbol naming rules of
      Visual C++, we were using __stdcall convention for DLL functions when
      building code with Borland/C++Builder tools and using the default (__cdecl)
      convention when building with Microsoft (Visual C++) tools. Although this
      allowed symbols to be located when linking, the calling convention mismatch
      caused a stack cleanup issue that very rarely manifested itself in a bug
      (e.g. exception of some kind in sbbsctrl.exe, usually). Mismatching
      the calling conventions was unintentional (I thought the default for MSVC
      DLL functions was __stdcall) - but since the calls to MSVC-Built DLL functions
      worked 99% of the time, I didn't realize there was an underlying issue. So I
      now work-around the DLL symbol naming mismatch using a command-line option (-a)
      passed to implib in src/sbbs3/ctrl/makelibs.bat
      
      I had previously worked-around exceptions when calling MSVC DLL functions in
      sbbsctrl.exe by calling the problematic DLL functions from a timer tick handler
      rather than a user control (e.g. button) event handler. Those work-arounds can
      now be removed.
      
      The erroneous "DLLCALL" definition design pattern was replicated (copy/pasted)
      to many other projects' header files in cvs.synchro.net. In the future, we may
      want to just remove all instances of *CALL since they now serve no purpose and
      appear as useless "Kruft" (but do allow us to more-easily globally change DLL
      function calling conventions if/when necessary in the future).
      bf82a889
  19. Jul 20, 2018
  20. Apr 06, 2018
  21. Mar 19, 2018
  22. Mar 04, 2018
    • rswindell's avatar
      Use easier-to-understand .ini keys and options in the [mail] section · 4fbfe49d
      rswindell authored
      for new TLS-related settings:
      SubmissionsPort -> TLSSubmissionPort
      POP3SPort -> TLSPOP3Port
      USE_TLS_SUBMISSIONS_PORT -> TLS_SUBMISSION
      USE_POP3S_PORT -> TLS_POP3
      There was actuall a typo in the "USE_POP3S_PORT" string anyway. <shrug>
      4fbfe49d
    • deuce's avatar
      Add support for mail TLS ports. This adds two new keys to sbbs.ini Mail · a49b91d7
      deuce authored
      section:
      
      POP3SPort=995
      SubmissionsPort=465
      
      And two new mail options:
      USE_SUBMISSIONS_PORT
      USE_POP3SS_PORT
      
      These are the last of the two option bits for the mail server.
      a49b91d7
    • deuce's avatar
      Mail server support for Opportunistic TLS. · f1910cbe
      deuce authored
      Support STARTTLS in SMTP and STLS in POP3.  This includes the sendmail
      thread.  Clients can now be configured to use STARTTLS with Synchronet
      mail services, and Synchronet will attempt to deliver securely when
      possible (though it will fall back to plain text delivery when necessary.)
      
      This touches a *lot* of mail server stuff, so some instability is not
      unlikely.
      
      Of course, RFC8314 (Jan, 2018) officially recommends implicit TLS on the TLS
      ports now, so support for that should be next.
      f1910cbe
  23. Nov 15, 2017
  24. Aug 26, 2017
    • rswindell's avatar
      The SMTP received mail notice and forward notice (short messages/telegrams) · 53f8e5ec
      rswindell authored
      are now configurable via the following news keys in the [Mail] section of the
      sbbs.ini file:
      	NewMailNotice
      	ForwardNotice
      
      Using the newly updated string literal support to allow for Ctrl-A codes using
      C charater literal notation (\1) for control-A codes and standard C-escaping
      of carriage-return (\r), line-feed (\n), etc.
      Beginning and trailing space characters are also preserved (if specified) in
      the key values.
      
      The default strings are updated/different from what was previously hard-coded
      in mailsrvr.c. If you want the local timestamp (back) in the notice, change
      the '%.0s' in the default string to just '%s'.
      53f8e5ec
  25. Nov 28, 2016
  26. May 18, 2016
    • rswindell's avatar
      Implement IP temporary ban: · 7da4af1b
      rswindell authored
      By default, after 20 consecutive (unique) failed login attempts, *or*
      a failed login attempt wtih a name from the name.can filter file.
      The default temporary ban duration is 10 minutes.
      The temporary ban thershold is configurable via LoginAttemptTempBanThreshold
      in sbbs.ini and the ban duration is configurable via LoginAttemptTempBanDuration
      (in seconds).
      7da4af1b
  27. Aug 29, 2015
    • rswindell's avatar
      Fix broken dns_getmx() (since Ipv6 commit): mail_open_socket() no longer opens · a2b252a8
      rswindell authored
      a socket (and returns void), but mxlookup.c did not know this because it had
      its own prototype for this function (lazy, I know).
      - moved the prototypes for mail_open_socket and mail_close_socket to mailsrvr.h
      - use socket() to create the (single) socket (is not a multisock, does not do
        IPv6)
      - this was the cause of the "getting socket option type" errors in the
        error.log that began showing up recently. Good thing it had a "LOG_ERR"
        log level or I probably would not have noticed for a long time. :-)
      a2b252a8
  28. Aug 22, 2015
  29. Aug 20, 2015
    • deuce's avatar
      Update to 3.17a · dbbfabf1
      deuce authored
      New Features:
      - Multiple bindings for each service
        Use comma-separated interfaces on Interface= lines in the ini file.
        Default is now "0.0.0.0,::"
      - IPv6 support
      - TLS support for the webserver and (non-static) services
        New TLS option in services.ini (ie: Options=TLS)
      - Decrease LEN_SCAN_CMD to 35 chars, increase the CID field to 45 chars,
        and rename the MAIL_CMD string to IPADDR.  I think this frees up the
        note field for SysOp use.
      dbbfabf1
  30. Nov 20, 2014
  31. Jan 04, 2014
  32. Sep 10, 2011
    • rswindell's avatar
      Support non-blocking connects in the sendmail thread. · 245d1e6d
      rswindell authored
      The connect timeout is now configurable in sbbs.ini [Mail] ConnectTimeout
      (default = 30 seconds), set to 0 for blocking connections (and OS-default
      timeout).
      245d1e6d
    • rswindell's avatar
      Mail server improvements: · bf674809
      rswindell authored
      - if configured max recipients = 0 means unlimited (for all users)
      - max recipients limit is applied to pending send emails (non-M-exempt users)
      - M-restricted users can not receive unauthenticated SMTP mail messages
      - Introduced inbox msg limit (for non-M-exempt users) with sbbs.ini [Mail]
        MaxMsgsWaiting value (default: 100), 0 = unlimited
      bf674809
  33. Sep 01, 2011
  34. Oct 25, 2009
    • rswindell's avatar
      Added errormsg callback function pointer to all startup structures to allow · e5da08ed
      rswindell authored
      error counting/logging/messages to be handled by front-end (e.g. control panel)
      regardless of log_level setting.
      Mail server now filters blocked-subjects before applying DNSBL tag.
      Received message header TO and FROM fields are no longer checked against the
      email.can file for SMTP-authenticated clients.
      SMTP MAIL FROM and RCTP TO addresses are no longer checked against the
      email.can file for SMTP-authenticated clients.
      Statistics are displayed in a more legible manner when the mail server is
      terminated.
      The msgs_received stats counter now includes blocked and ignored messages too.
      e5da08ed
  35. Aug 14, 2009
    • rswindell's avatar
      Added JS load() search path extensibility: · f45e2156
      rswindell authored
      Configurable via ctrl/sbbs.ini file JavaScriptLoadPath key value
      (comma-separate listed of search directories), default value is "load".
      This list is exposed in the JS object model via the js.load_path_list array
      (may be modified by scripts).
      For JSexec, the default load path list may be over-ridden with the '-i' option.
      For relative load paths (e.g. not beginning with '/' or '\'), the path is
      assumed to be a sub-directory of the (configurable) mods or exec directories
      and is searched accordingly.
      So, by default, load("somefile.js") will search in this order:
      mods/load/somefile.js
      exec/load/somefile.js
      mods/somefile.js
      exec/somefile.js
      f45e2156
Loading