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

  1. 04 Apr, 2021 1 commit
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · fcf58640
      Rob Swindell authored
      This won't impact Synchronet as it has a separate signal handling
      thread, but we still need to behave properly for processes that
      don't.  I'm also saying that ENOMEM does not indicate a disconnection,
      though it may be better to pretend it was disconnected...
  2. 22 Feb, 2021 1 commit
  3. 15 Feb, 2021 2 commits
  4. 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.
  5. 25 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Add/use new FTN "BBSID" control paragraph (kludge line) · f257f2ff
      Rob Swindell authored
      Advertise the system's QWK-ID (a.k.a. BBS ID) in exported echomail messages. This will allow correlation of avatars that were imported via SYNCDATA carried via QWKnet (e.g. DOVE-Net) with messages imported from those same BBSes via FTN.
      The alternative was to have SYNCDATA Avatar messages include all the AKAs of each BBS (in the body text), but that was looking like a rather complicated solution. This approach (the BBSID kludge) seems a much simpler solution.
      I still need to implement the JS side of this solution however (for avatar lookups using the FTN BBSID), but this was the first important step.
  6. 22 Dec, 2020 1 commit
  7. 11 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Support forwarding of single-part HTML emails, add "Fwd:" subject prefix · d79e9514
      Rob Swindell authored
      When forwarding a single-part MIME-encoded HTML email, the preamble (original message header info) and any user comments, need to be HTML-encoded.
      Add the commonly-used "Fwd: " prefix to the default message subject, when forwarding.
      This required that smb_getplaintext() no longer always-NULLify the message's text_subtype (e.g. "html"). For single-part messages, this element was getting freed and NULLed.
      Add/use a new SMBLIB convenience function to add a string header field, but only if non-NULL: smb_hfield_string()
  8. 10 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Overhauled message forwarding, allow comments · 7b5c33e2
      Rob Swindell authored
      No longer derive the new message header from the original - too many problems. Simplified the forwarding support smblib (multiple SENDER* and RECIPIENT* header fields no longer expected/supported). Technically, the FORWARDED header field really serves no important purpose now.
      A comment can be passed into forwardmail() or (if NULL), will be prompted for. There is an issue where the added comment can be obscured by the receiving mail program if the original message is a multi-part MIME message. Not sure the best solution for that. Still a WIP in that regard.
  9. 09 Dec, 2020 1 commit
    • Rob Swindell's avatar
      When a message has been forwarded, invalidate the "to" ext/net ptrs · 05104f13
      Rob Swindell authored
      The convenience pointers to_ext and to_net need to be invalidated (nullified) if we are going to allow forwarding from local email boxes to network mail and keep all the original message header fields in tact.
      The "Forwarded" field must now be added *before* any new recipient information (local user extension or network address of the forwarding destination).
      This is part of the solution to request #83, #108, and #141.
  10. 26 Sep, 2020 1 commit
    • Rob Swindell's avatar
      Add smb_msg_type() and smb_msg_count() for index-based msg counting. · a3e430e0
      Rob Swindell authored
      In support of message bases with vote-messages and poll-closures:
      smb_msg_type() returns an enum smb_msg_type inferred from the combination
      of attribute flags specified (should match msghdr_t.type).
      smb_msg_count() calculates the number of message index records of the
      specified type(s) (a bit-field) by reading the message base index file. This
      value should only used for info/display purposes, so no locking is performed
      to return the result as fast as possible.
      This allows an accurate number of "posts" (posted *messages*) to be queried
      and displayed to a user when appropriate (e.g. instead of
      smb.status.total_msgs or just the size of the index file divided by the size
      of an index record). In that case, since vote messages and poll closures
      aren't displayed as messages to users, exclude those from the count to reduce
      confusion. For message bases that don't support voting, this scheme is not
  11. 16 Aug, 2020 1 commit
  12. 07 May, 2020 1 commit
    • rswindell's avatar
      smb_hfield_add_netaddr(): · e673eb2c
      rswindell authored
      Don't strip the "user@" portion of a *NETADDR header field if the specified net-type is NET_NONE.
  13. 14 Apr, 2020 2 commits
    • rswindell's avatar
      Some very old, yet inconsistent, behavior of smb_hfield_add() could pretty · 717b99ee
      rswindell authored
      easily result in a message body being added to a message base with no
      accompanying message header: if the header data was 0-length, the hfield_dat
      was not actually allocated and the applicable smbmsg_t convenience pointer was
      not set accordingly. This had the side effect that if a message were to be
      imported with a blank recipient ("To" field), the header was not created at
      all (to support mutliple header, single body msgs, i.e. bulkmail).
      The other functions that set the convenience pointers do not treat 0-length
      header field data special, so this was inconsistent behavior.
      Most message types (e.g. networks) don't want 0-length "to" fields, but that
      shoudl be enforced somewhere else, not here.
    • rswindell's avatar
      On Windows, smb_addmsg() was slow because smb_updatethread() was slow: · 210e6901
      rswindell authored
      So on Windows, calling unlock() on a file region that you don't have locked,
      incurs a delay. Likewise, calling lock() on a file region that already have
      locked incurs a delay. These delays were seriously throttling message imports
      on Windows (e.g. importing echomail or QWK packets). What should take a few
      seconds, was taking minutes with noticeable delays. This code has been
      performing redundant locks/unlocks for over 15 years, so I can only conclude
      that the performance penalty is a new behavior introduced in recent version(s)
      of Windows.
  14. 04 Apr, 2020 1 commit
  15. 30 Jul, 2019 1 commit
    • rswindell's avatar
      Define some new SMB hfield types: · a8709616
      rswindell authored
      - REPLYTOLIST (a mime-decoded version of RFC822REPLYTO)
      - RECIPIENTLIST (a mime-decoded version of RC822TO)
      - RFC822CC (a mime-encoded version of SMB_CARBONCOPY)
      - RFC822ORG (a mime-encoded version of SMB_ORGANIZATION)
      - RFC822SUBJECT (a mime-encoded version of SUBJECT)
      The RFC822* hfields are only created when necessary: there was a MIME-encoded
      hfield value received (e.g. by the mailsrvr) for the corresponding hfield.
      The to_list and replyto_list convenience pointers now point to the MIME-decoded
      (plain text) version of these header fields, since that's what everyone
      normally wants to see and use.
      The MIME-encoded flavors (RFC822*) are stored for relaying via SMTP or POP3
      and retaining all data (no normalization or decoding).
      A new auxattr bit has been defined: MSG_HFIELDS_UTF8 (happens to be the same
      as P_UTF8 - snicker). This bit will be set in msg.hdr.auxattr when one or more
      hfield values are in UTF-8 format. When this flag is not set, all hfield values
      are assumed to be CP437 for backwards compatibility.
      Since we are using a single flag, all header fields have to use the same
      encoding (either CP437 or UTF-8). When the hfield values are all plain ASCII,
      there's no difference between CP437 and UTF-8 and the MSG_HFIELDS_UTF8 flag
      is not expected to be set, though setting it shouldn't hurt. The RFC822* hfield
      values should also include US-ASCII text (using MIME-encoding for any 8-bit
      smb_get_hfield() function prototype change: the 3rd argument changed from
      an hfield_t* to an hfield_t**, so that the caller can actually change the
      hfield type (in memory) if they wish. Nobody seemed to be passing any non-NULL
      3rd argument value, so this changed appeared safe to make.
  16. 25 Jul, 2019 1 commit
    • rswindell's avatar
      Store FidoNet charset control line values as their own (new) SMB hfield type: · 6000e4f1
      rswindell authored
      with its own smbmsg_t convenience pointer: ftn_charset.
      this allows greater control over when/how this header field is exported.
      Constify smb_msg_is_utf8().
      Note that the "Editor" hfield type should hold any FTN "NOTE" control line
      values (where msg editor details/version are normally propagated over FidoNet).
  17. 23 Jul, 2019 1 commit
  18. 20 Jul, 2019 1 commit
  19. 18 Jul, 2019 1 commit
  20. 08 Jul, 2019 1 commit
  21. 06 Jul, 2019 1 commit
    • rswindell's avatar
      Created new SMBLIB function: smb_msg_is_utf8() which reutrns TRUE if the passed · d2df590f
      rswindell authored
      message body is UTF-8 encoded. This works for either messages received via FTN
      (with the "CHRS: UTF-8" control paragraph) or MIME-encoded messages (e.g.
      Internet e-mail).
      This is to be used by things to display messages. If the viewer (e.g. user's
      terminal) supports UTF-8, just send through as-is. If not, translation (e.g. to
      CP437) or filtering may be needed.
  22. 05 May, 2019 1 commit
  23. 04 May, 2019 1 commit
    • rswindell's avatar
      smb_getplaintext and smb_getmsgtxt(...,GETMSGTXT_PLAIN) will now fall-back · 41edfbbc
      rswindell authored
      to a text/html part of a multi-part MIME encoded message if no text/plain part
      Changed smbmsg_t.charset to smbmsg_t.text_charset.
      Added smbmsg_t.text_subtype (e.g. "plain" or "html").
      Fixed issue with parsing parsed plain-text when the charset was the last
      element of the MIME-part header.
  24. 03 May, 2019 1 commit
    • rswindell's avatar
      Change the message priority scheme from: · c8a8ddec
      rswindell authored
      the (never used) SMB_PRIORITY 32-bit hfield (0 = default/highest priority), to
      a new fixed message header field (8-bit) following the X-Priority header field
      numbering scheme: 1 = highest, 3 = normal, 5 = lowest and 0 = unspecified.
  25. 30 Apr, 2019 1 commit
  26. 29 Apr, 2019 2 commits
  27. 11 Apr, 2019 2 commits
  28. 10 Apr, 2019 1 commit
  29. 09 Apr, 2019 1 commit
  30. 06 Apr, 2019 1 commit
    • rswindell's avatar
      smb_copymsgmem() fix: · 3debb32c
      rswindell authored
      Did not clear/set convenience pointers (e.g. msg.subj), so they would point
      to the source message hfield_dat buffers which may be freed or garbage.
      Apparently nothing that used smb_copymsgmem() used the convenience pointers
      (before now), so it hasn't been a problem before now. <shrug>
      It became a problem becaue I'm going to use this function in js_put_msg_header
      to fix a problem where the underlying smbmsg_t representation is not current
      even after MsgBase.put_msg_header() is used.
  31. 19 Mar, 2019 1 commit
  32. 19 Feb, 2019 1 commit
  33. 18 Feb, 2019 1 commit
  34. 16 Feb, 2019 1 commit
    • rswindell's avatar
      Performance optimization: When performing sequential index or header reads, · 0e773f87
      rswindell authored
      the read buffer may be utilized more efficiently if you do *not* perform an
      (unnecessary) seek operation just before the read. By eliminating unnecessary
      seeks in smb_getmsgidx() and smb_getmsghdr(), I was able to reduce the time
      required to load 9000+ index and header records over a network (Samba/CIFS)
      share from 15+ seconds to less than 5.
  35. 30 Oct, 2018 1 commit
  36. 23 Oct, 2018 1 commit