purebred-mua / purebred-email

A fast email parsing library implemented in Haskell
https://hackage.haskell.org/package/purebred-email
GNU Affero General Public License v3.0
23 stars 4 forks source link

many wonderful changes (v0.5) #65

Closed frasertweedale closed 3 years ago

frasertweedale commented 3 years ago

Highlights:

Changes:

26b2090 (Fraser Tweedale, 2 hours ago)
   ci: test with GHC 8.8 .. 9.0

   GHC < 8.8 has too-old version of time.  This is not a fundamental 
   compatibility problem with earlier releases, but it requires annoying hacks
   for CI.  So only test on 8.8 up.

   Also add 9.0.1 to the matrix.  It requires head.hackage because patched
   version of hedgehog is required.

94e852c (Fraser Tweedale, 4 hours ago)
   reply: avoid duplicate messages in To and Cc

   In ReplyToGroup mode, if the parent message includes its sender in both the
   From and To/Cc fields, then that address will appear in the To and Cc
   fields of the reply.  This is redundant.  Update the
   `reply` function to eliminate redundancy across the To and Cc headers.

1616d19 (Fraser Tweedale, 2 days ago)
   reply: implement ReplyFromMode and ReplyFromRewriteMode

e60f968 (Fraser Tweedale, 3 days ago)
   reply: implement SelfInRecipientsMode

17adc89 (Fraser Tweedale, 3 days ago)
   add instance IsString Mailbox

   Fixes: https://github.com/purebred-mua/purebred-email/issues/18

8e1a621 (Fraser Tweedale, 6 days ago)
   compare domain names in address case-insensitively

4378d5e (Fraser Tweedale, 6 days ago)
   add ReplySettings

   Add the `ReplySettings` data type.  It encapsulates several settings 
   related to reply construction, including:

   - author mailboxes

   - reply mode (the already existing `ReplyMode` type)

   - whether to use author address as it appears in parent message, or
    preferred mailbox

   - whether to rewrite matching author address to the variant in
    author mailboxes

   - whether or not to remove own address from recipients of reply

   This commit just chases the API change, and doesn't implement any of the
   additional functionality.

abb465c (Fraser Tweedale, 7 days ago)
   add 'reply' function

   Add 'reply' function for replying to a message.  This function follows the
   requirements and suggestions of RFC 5322 in setting the headers of the new
   message.  It does not set the body.

       reply :: CharsetLookup
        -> ReplyMode
        -> [Mailbox]
        -> Message ctx a
        -> Message ctx ()

ade4d64 (Fraser Tweedale, 7 days ago)
   export MessageID types; instance Show MessageID

2884628 (Fraser Tweedale, 7 days ago)
   add optics for Message-ID, In-Reply-To and References

b1ecbd7 (Fraser Tweedale, 7 days ago)
   add setTextPlainBody helper function

   It can be useful to just replace an entire message body.  Add a new helper
   function to do that:

     setTextPlainBody :: T.Text -> Message ctx a -> MIMEMessage

   Also refactor 'createTextPlainMessage' to use the new function.

b756752 (Fraser Tweedale, 7 days ago)
   remove Semigroup and Monoid instances for Header

   Although 'mempty' is handy, the Semigroup instance makes little sense for
   Headers.  It is easy to violate header cardinality and ordering
   requirements.  Remove the instances.

6639e5c (Fraser Tweedale, 8 days ago)
   implement RFC 6854 (address syntax in From: and Sender:)

   Fixes: https://github.com/purebred-mua/purebred-email/issues/53

1f0d857 (Fraser Tweedale, 8 days ago)
   move header optics to Data.RFC5322

   Headers that are defined in RFC 5322 should be implemented in and exported
   from module Data.RFC5322.  Make it so.

0df4faf (Fraser Tweedale, 7 weeks ago)
   become v0.5.0

ce46d57 (Fraser Tweedale, 7 weeks ago)
   RFC5322: implement obsolete year parsing

e1596a2 (Fraser Tweedale, 7 weeks ago)
   RFC5322: implement obsolete timezone parsing

a1f3801 (Fraser Tweedale, 8 weeks ago)
   RFC5322: add more date parsing tests

   Part of: https://github.com/purebred-mua/purebred-email/issues/49

ece38c4 (Dmitry Kalinkin, 8 weeks ago)
   add test for Date header with CFWS comment

8a895f1 (Fraser Tweedale, 8 weeks ago)
   RFC5322: redefine headerDate using new parser

   Fixes: https://github.com/purebred-mua/purebred-email/issues/49

8e0f105 (Fraser Tweedale, 8 weeks ago)
   RFC5322: add better date-time parsing

   Add better parser, following strictly the specification from RFC 5322
   section 3.3 "Date and Time Specification"[1]

   [1]: https://tools.ietf.org/html/rfc5322#section-3.3

   Part of: https://github.com/purebred-mua/purebred-email/issues/49

6352ddc (Fraser Tweedale, 8 weeks ago)
   RFC5322: export fws parser

020aade (Dmitry Kalinkin, 8 weeks ago)
   fix typo in the RFC number: should be 5322, not 5422

   find . -type f -exec sed -i 's/5422/5322/g' {} \;