In some cases it can be desirable to receive a success notification for
a message from the server. This currently only works on SMTP.
Changelog-added: Add option to request full DSN for SMTP sent messages.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
RFC 5322 states that messages should only use CRLF line endings. Here
are two important excerpts:
> 2.1. General Description
>
> Messages are divided into lines of characters. A line is a series of
> characters that is delimited with the two characters carriage-return
> and line-feed; that is, the carriage return (CR) character (ASCII
> value 13) followed immediately by the line feed (LF) character (ASCII
> value 10). (The carriage return/line feed pair is usually written in
> this document as "CRLF".)
> 2.3. Body
>
> The body of a message is simply lines of US-ASCII characters. The
> only two limitations on the body are as follows:
>
> o CR and LF MUST only occur together as CRLF; they MUST NOT appear
> independently in the body.
> o Lines of characters in the body MUST be limited to 998 characters,
> and SHOULD be limited to 78 characters, excluding the CRLF.
Most MTA are tolerant to invalid messages but some others are more
pedantic. Ensure we only send valid line endings.
Link: https://www.rfc-editor.org/rfc/rfc5322.html#section-2.1
Link: https://www.rfc-editor.org/rfc/rfc5322.html#section-2.3
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Matěj Cepl <mcepl@cepl.eu>
The jmap:// outgoing backend always copies (actually, just tags) the
sent emails with the mailbox that has the "sent" role. Regardless of the
copy-to or :send -t <folder> argument. Only the copy-to-replied setting
is effective.
Change the CopyTo parameter of the StartSendingMessage backend operation
to hold a list of folder names.
In the JMAP worker, label the sent message with the list of folders,
eliminating duplicates (e.g. do not label with "sent" role twice).
Reported-by: Matěj Cepl <mcepl@cepl.eu>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Matěj Cepl <mcepl@cepl.eu>
Use go-opt v2 new completion API which returns items descriptions along
with their text values.
Display the descriptions after the items separated by two spaces. Wrap
the descriptions in parentheses to better indicate that they are not
part of the completion choices. Limit the description length to 80
characters to avoid display issues.
Add a new style object completion_description in stylesets. By default,
the object will be rendered with a dimmed terminal attribute. Update all
stylesets and documentation accordingly.
Implements: https://todo.sr.ht/~rjarry/aerc/271
Link: https://git.sr.ht/~rjarry/go-opt/commit/ebeb82538395a
Changelog-added: Command completion now displays descriptions next
to completion items.
Changelog-added: New `completion_description` style object in style
sets used for rendering completion item descriptions.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bojan Gabric <bojan@bojangabric.com>
Tested-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Add a new copy-to-replied setting in accounts.conf to copy sent replies
to the same folder than their replied message.
Requested-by: Tristan Partin <tristan@partin.io>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tristan Partin <tristan@partin.io>
smtp-domain is ignored when using smtps:// transport. It is only
configured for clear text and STARTTLS connections.
Also use it for TLS encrypted connections.
Fixes: c10cb370bb ("config: add option for SMTP HELO/EHLO local domain")
Changelog-fixed: `smtp-domain` is now properly taken into account
for TLS connections.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tristan Partin <tristan@partin.io>
Patch produced with the following commands:
go mod edit -dropreplace=golang.org/x/crypto
go get -t -u
go mod tidy
I dropped the replace of x/crypto. The only use for the fork from
ProtonMail is for openpgp which has been deprecated by the official
implementation. And aerc explicitly uses the correct import path where
needed.
go-smtp update was a bit harsh. The API was changed completely.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Make the function already present in app/compose.go reusable while also
changing its signature for it not to require involvement of a Composer
instance.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
Move the code which handles the preparation of a sender into which the
message can be written into lib to allow for reuse. Also hide the
sending backend a bit more from the `:send` command code by introducing
a NewSender function which determines which backend should be used and
invokes the appropriate sender factory function.
Rename send() to sendHelper() to avoid collision.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>