summaryrefslogtreecommitdiff
path: root/commands
AgeCommit message (Collapse)Author
2022-02-19filter/search: display current search/filter argumentsinwit
Make the statusbar message after search and filter completion more informative by showing the full call that was used. Signed-off-by: inwit <inwit@sindominio.net>
2022-02-19unsubscribe: parse internationalized headersKoni Marti
Fix the parsing of internationalized headers (RFC 6532). Enable unsubscribe to work with regular and encoded headers. Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-02-06postpone: re-open review mode on errorKoni Marti
re-opens the review UI when the postpone operation fails. Before, the composer would close, even on error, and we would lose the email draft. Now, the user can decide on how to proceed when postponing fails. References: https://lists.sr.ht/~rjarry/aerc-devel/patches/28824 Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-31completions: add folder flexible search as an optioninwit
Provide an option to change the completion style when selecting a folder from completing with folders starting with the input string to completing with folders in which the input string is a substring present at any point in the folder name. References: https://lists.sr.ht/~sircmpwn/aerc/%3C20201129181020.186984-1-inwit%40sindominio.net%3E References: https://lists.sr.ht/~sircmpwn/aerc/%3C20210223202536.199355-1-clayton%40craftyguy.net%3E Signed-off-by: inwit <inwit@sindominio.net>
2022-01-31compose: add option to never include your own address when replyingjohn1doe@ya.ru
Introduce an option in aerc.conf to disable the auto-including of your own address when replying to your own emails (address replies to the original To: and Cc: instead); default to true (allow the auto-including)
2022-01-29recover: recover emails from tempdir after a crashKoni Marti
implements a recover command that searches the local temp dir for aerc emails. If a file is found and selected, a new composer tab will open with the file contents as the message body. No header data is stored in the temp file and thus this information cannot be recovered. Recover will not remove the temporary file unless the force flag (-f) is explicitly used. This recovery method only works when the editor buffer is saved to disk and the Close() function of the composer has not been called yet. Sending, postponing or quitting will call the Close() function which removes the temporary file completely. After Close() is called, no recovery is possible anymore. Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-27reply: use new-message template for non-quoted repliesRobin Jarry
Unless a template is specified with reply -T, use the new-message template for non-quoted replies. Fixes: 877a94f5d9a7 ("compose: add default template for new messages") Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-22msgstore: fetch missing headers in visual modeKoni Marti
fetches missing headers when in visual selection mode. This prevents large archive operations from panicking due to a nil pointer dereference. The archive command will return an error to the ui when a nil message is encountered to signal that the message store is not ready yet. Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-19compose: add default template for new messagesRobin Jarry
Allow defining a default template to use when composing new messages. Add an example to be used for new users. Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-19docs: mention missing -T options for compose and forwardRobin Jarry
A template file may be specified for compose and forward as well. Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-07pgp: PGP/MIME encryption for outgoing emailsKoni Marti
implements PGP/MIME encryption with go-pgpmail. The Encrypt() function of go-pgpmail requires a list of public keys which are taken from the keystore. The keystore is searched for the email addresses of all recipients (to, cc, and bcc). If you want to be able to read the encrypted email afterwards, add yourself as a recipient in either to, cc, or bcc as well. Public keys can be exported from gpg into aerc as follows: $ gpg --export >> ~/.local/share/aerc/keyring.asc When composing a message, the encryption is enabled with the ":encrypt" command. This sets a bool flag in the Composer struct. A reapted application of this command will toggle the flag. The encrypted message can also be signed by using the ":sign" command before or after ":encrypt". References: https://todo.sr.ht/~rjarry/aerc/6 Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-07pgp: PGP/MIME signing for outgoing emailsKoni Marti
implements PGP/MIME signing with go-pgpmail. The Sign() function of go-pgpmail requires a private (signing) key. The signing key which matches the senders email address (from field in email header) is looked up in aerc's copy of the keyring. Private keys can be exported from gpg into aerc as follows: $ gpg --export-secret-keys >> ~/.local/share/aerc/keyring.asc A message is signed with the ":sign" command. The sign command sets a bool flag in the Composer struct. Using the command repeatedly will toggle the flag. References: https://todo.sr.ht/~rjarry/aerc/6 Signed-off-by: Koni Marti <koni.marti@gmail.com>
2021-12-13recall: allow recalling messages from any folderinwit
Recall fails when called outside of the "postpone" folder (usually "Drafts"). This makes sense for postponed messages. However, sometimes the user would like to re-edit and re-send an old, possibly sent, message, which would serve as a basis for the new one. This patch allows recall to work outside the postpone folder, thus allowing for re-edition of any message. In the original recall function, if the recalled message is found in the "postpone" folder, once the message has been recalled, re-edited and sent, the original draft is deleted. With this patch, when the message is not in the "postpone" folder, the original message is not deleted. Signed-off-by: inwit <inwit@sindominio.net>
2021-11-05imap: add manual {dis,}connect supportRobin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-05go.mod: change base git urlRobin Jarry
I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-03-07add mimeType to OriginalMail struct for both forward and replyReto Brunner
2021-02-28send: fix missing error returnReto Brunner
2021-02-26Fix linter warningsReto Brunner
* Remove redundant return (code was never reached) * Remove redundant type information * Rename unused function parameters to "_"
2021-02-05send: fix crash if invalid password is givenReto Brunner
2021-01-30Get rid of the aerc.PushError(" " + $string) idiomReto Brunner
The individual callers should not be responsible for padding
2021-01-30Refactor lib/open to accept user provided argumentsReto Brunner
* Get rid of open_darwin It just lead to code duplication for a simple one string change. Instead we query it during initialization * Accept user provided arguments "open" on MacOS accepts things like -A to use a specific application Pass trough arguments the user provided in order to facilitate this * Refactor the function to a struct This makes it more convenient for the caller and avoids signatures like lib.OpenFile(nil, u.String(), nil) which are fairly unreadable
2021-01-24send: don't block the UI thread during the sendingReto Brunner
2021-01-14save: if part name is a path, only use the filenameRobin Opletal
2020-12-18update tcell to v2 and enable TrueColor supporty0ast
Also update to the tcell v2 PaletteColor api, which should keep the chosen theme of the user intact. Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop clipping the value to one of the theme colors. Generally this is desired behaviour though.
2020-11-21Refactor send commandReto Brunner
2020-11-14reply: add References headerReto Brunner
2020-11-14allow the loading of existing headersReto Brunner
2020-11-14format: remove parse methods, use the one from go-messageReto Brunner
2020-11-14compose: use a proper header instead of a string mapReto Brunner
Prior to this commit, the composer was based on a map[string]string. While this approach was very versatile, it lead to a constant encoding / decoding of addresses and other headers. This commit switches to a different model, where the composer is based on a header. Commands which want to interact with it can simply set some defaults they would like to have. Users can overwrite them however they like. In order to get access to the functions generating / getting the msgid go-message was upgraded.
2020-11-14models: add RFC822 headers to OriginalMailReto Brunner
2020-11-14remove models.Address in favor of go-message AddressReto Brunner
We made a new type out of go-message/mail.Address without any real reason. This suddenly made it necessary to convert from one to the other without actually having any benefit whatsoever. This commit gets rid of the additional type
2020-09-22propagate error from sendmaily0ast
2020-09-21reply: don't override the answered flag if we didn't sendReto Brunner
Aerc just sent the true / false update regardless, meaning if someone already replied to a mail, then drafted yet another mail to the same parent the flag would vanish. This commit fixes this behaviour.
2020-08-31handle message unknown charset errorJeff Martin
This change handles message parse errors by printing the error when the user tries to view the message. Specifically only handling unknown charset errors in this patch, but there are many types of invalid messages that can be handled in this way. aerc currently leaves certain messages in the msglist in the pending (spinner) state, and I'm unable to view or modify the message. aerc also only prints parse errors with message when they are initially loaded. This UX is a little better, because you can still see the header info about the message, and if you try to view it, you will see the specific error.
2020-08-27reply: use set instead of linear searchReto Brunner
2020-08-20msg/reply: don't cc the sending address on reply allReto Brunner
2020-08-20Add account alias configuration and correctly set From fieldy0ast
We infer the correct From using the To: and Cc: field of the email that we reply to.
2020-08-20msg/reply: handle addresses as addressesReto Brunner
This simplifies the code considerably and makes it easier to follow
2020-08-20base models.Address on the mail.Address typeReto Brunner
This allows us to hook into the std libs implementation of parsing related stuff. For this, we need to get rid of the distinction between a mailbox and a host to just a single "address" field. However this is already the common case. All but one users immediately concatenated the mbox/domain to a single address. So this in effects makes it simpler for most cases and we simply do the transformation in the special case.
2020-08-19Add support for :rmdirARaspiK
The `:rmdir` command removes the current directory (`-f` is required if the directory is not empty). This is not supported on the notmuch backend. An issue with the maildir backend is that some sync programs (e.g. offlineimap) may recover the directory after it is deleted. They need to specifically be configured to accept deletions, or special commands need to be executed (e.g. `offlineimap --delete-folder`) to properly delete folders. A danger of using this on the IMAP backend is that it is possible for a new message to be added to the directory and for aerc to not show it immediately (due to a slow connection) - using `:rmdir` at this moment (with `-f` if the directory already contains messages) would delete the directory and the new message that just arrived (and all other contents). This is documented in aerc(1) so that users are aware of possible risks.
2020-08-13Add `oauthbearer` support for SMTPR Chowdhury
This piggybacks on the existing IMAP support, and uses the same configuration format (my local testing example has the IMAP and SMTP lines almost copy-pasted from one another). It's a little clumsy in that a new token is negotiated for every `Send()` command, but it's a start...
2020-08-06Implement style configuration.Kalyan Sriram
Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
2020-08-03Set environment variables for the exec commandNicolai Dagestad
2020-07-30Revert "Implement style configuration."Reto Brunner
This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
2020-07-30Implement style configuration.Kalyan Sriram
Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
2020-07-27Remove hard coded bodystruct path everywhereReto Brunner
Aerc usually used the path []int{1} if it didn't know what the proper path is. However this only works for multipart messages and breaks if it isn't one. This patch removes all the hard coding and extracts the necessary helpers to lib.
2020-07-17run go fmtReto Brunner
2020-07-09Use PushStatus instead of SetStatus where it makes senseHeiko Carrasco
2020-07-08Add additional flagging functionalityARaspiK
More mail flags can now be set, unset, and toggled, not just the read/seen flag. This functionality is implemented with a new `:flag` and `:unflag` command, which are extensions to the matching `:read` and `:unread` commands, adding support for different flags. In fact, the `read`/`unread` commands are now recognized aliases to `flag`/`unflag`. The new commands are also well documented in aerc(1). The change mostly extends the previous read/unread setting functionality by adding a selection for the flag to change.
2020-07-08Allow open to be asynchronousAndrew Jeffery
This stops the ui being blocked while the resource is opened. The wait ensures that resources are reclaimed when the process finishes while aerc is still running.