about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* completions: add support for completing multiple addresses HEAD masterParasrah2022-01-075-31/+45
| | | | | | | as per the discussion https://lists.sr.ht/~sircmpwn/aerc/patches/15367 this handles completions in `completer/completer.go` by enabling the completer to return a `prefix` that will be prepended to the selected completion candidate.
* pgp: PGP/MIME encryption for outgoing emailsKoni Marti2022-01-073-9/+129
| | | | | | | | | | | | | | | | | | | | | 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>
* pgp: PGP/MIME signing for outgoing emailsKoni Marti2022-01-073-17/+154
| | | | | | | | | | | | | | | | | 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>
* pgp: update openpgp packages (go-crypto and go-pgpmail)Koni Marti2022-01-077-24/+15
| | | | | | | Replaces golang.org/x/crypto with github.com/ProtonMail/go-crypto consistently and updates go-pgpmail to v0.2.0 Signed-off-by: Koni Marti <koni.marti@gmail.com>
* recall: allow recalling messages from any folderinwit2021-12-132-7/+27
| | | | | | | | | | | | | | | | | 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>
* mk: remove version overridepsykose2021-12-131-1/+0
| | | | | | | | | | some build systems build inside a git environment- most notably, alpine aports is built inside an aports tree. this override prevents a VERSION=$pkgver override from being passed at build time and makes aerc think its version is an alpine version from aports: < aerc -v aerc v3.15.0.r122.gb306bc1c4c
* format: reformat code with go 1.17Robin Jarry2021-12-119-9/+18
| | | | | | | | There was a change in how build tags are formatted. Use this as new reference. Link: https://go.dev/doc/go1.17#gofmt Signed-off-by: Robin Jarry <robin@jarry.cc>
* build: add check for code formattingRobin Jarry2021-12-112-0/+15
| | | | | | Let's avoid pushing unformatted code. Signed-off-by: Robin Jarry <robin@jarry.cc>
* config: fix code formattingRobin Jarry2021-12-111-11/+11
| | | | | | | Tabs are required. Fixes: 175d0efeb22e ("binds: add account specific bindings") Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: fix build on macosRobin Jarry2021-12-114-7/+36
| | | | | | | | | | | | Fix the following build error on mac os: worker/imap/worker.go:368:29: undefined: syscall.TCP_KEEPCNT worker/imap/worker.go:376:29: undefined: syscall.TCP_KEEPINTVL These symbols are not defined on darwin. Fixes: 5dfeff75f368 ("imap: add tcp connection options") Signed-off-by: Robin Jarry <robin@jarry.cc>
* binds: add account specific bindingsJonathan Bartlett2021-12-114-58/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using aerc for multiple accounts often bindings might differ slightly between accounts. For example: * Account A archives to one directory (:archive) * Account B archives to monthly directories (:archive month) Add account specific bindings to allow the user to add a "context" to a binding group using a context specifier and a regular expression. Currently the only context specifier is 'account'. The regular expression is validated against the accounts loaded from accounts.conf and the configuration fails to load if there are no matches. Contextual bindings are merged with global bindings, with contextual bindings taking precedence, when that context is active. Bindings are be configured using a generic pattern of 'view:context=regexp'. E.g.: # Globally Applicable Archiving [messages] A = :read<Enter>:archive<Enter> # Monthly Archiving for 'Mailbox' Account [messages:account=Mailbox$] A = :read<Enter>:archive month<Enter> In the above example all accounts matching the regular expression will archive in the monthly format - all others will use the global binding. Signed-off-by: Jonathan Bartlett <jonathan@jonnobrow.co.uk>
* readme: add contribution guideRobin Jarry2021-12-111-0/+50
| | | | | | | This has been requested numerous times. People are not all used to the git email workflow. Also, I am quite anal about commit messages. Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: add tcp connection optionsRobin Jarry2021-12-072-0/+131
| | | | | | Allow fine tuning tcp connection options. Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: use low level tcp connectionRobin Jarry2021-12-071-6/+22
| | | | | | | | | | In preparation for tcp keepalive options, we need access to the net.TCPConn object associated with an IMAP connection. The only way to do this is to create the connection ourselves. No functional change. Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: move connect procedure into a dedicated functionRobin Jarry2021-12-071-45/+55
| | | | | | | This will prepare for extra tcp connection options support and for automatic reconnect. No functional change. Signed-off-by: Robin Jarry <robin@jarry.cc>
* maildir: watch for message renamesRobin Jarry2021-12-061-2/+5
| | | | | | | | | | Messages flags can also be changed without changing directories. Changing flags in maildirs means renaming the message files. Also take renames into account. Link: https://cr.yp.to/proto/maildir.html Fixes: f4d3c8fc77f9 ("maildir: watch for external changes") Signed-off-by: Robin Jarry <robin@jarry.cc>
* maildir: watch for external changesRobin Jarry2021-12-061-4/+12
| | | | | | | | | | | | | | When a maildir is synchronized by an external process while aerc is running (e.g. mbsync), some emails may be moved out of "new" to "cur" or completely deleted. These deletions are ignored and aerc may assume these messages are still here, leading to errors. Take file deletions into account. Also, add "cur" to the watched folders since these can be modified as well. Signed-off-by: Robin Jarry <robin@jarry.cc>
* style: customize vertical and horizontal border charactersDian M Fay2021-11-307-8/+58
| | | | | | | | | New border-char-horizontal and border-char-vertical config settings in aerc.conf allow users to modify border appearance from the default 1-wide/tall blank space. In stylesets, border.fg now affects the foreground color when custom characters are defined. Signed-off-by: Robin Jarry <robin@jarry.cc>
* doc: fix typo in stylesets-dirsDian M Fay2021-11-291-1/+1
|
* imap: fix segfault when disconnectingRobin Jarry2021-11-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | Do not set client = nil, it breaks almost all message handlers: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8c7e51] goroutine 25 [running]: git.sr.ht/~rjarry/aerc/worker/imap.(*IMAPWorker).handleListDirectories worker/imap/list.go:32 git.sr.ht/~rjarry/aerc/worker/imap.(*IMAPWorker).handleMessage worker/imap/worker.go:174 git.sr.ht/~rjarry/aerc/worker/imap.(*IMAPWorker).Run worker/imap/worker.go:264 created by git.sr.ht/~rjarry/aerc/widgets.NewAccountView widgets/account.go:85 +0x518 Simply leave the disconnected client object, it already returns explicit error messages. Fixes: e41ed82cf3db ("imap: add manual {dis,}connect support") Signed-off-by: Robin Jarry <robin@jarry.cc>
* doc: fix default values for dynamic date formatsRobin Jarry2021-11-131-4/+4
| | | | | | | These settings now have a default value. Fixes: fe7ed940d371 ("config: use dynamic time format for default config") Signed-off-by: Robin Jarry <robin@jarry.cc>
* notmuch: allow sort by file orderKalyan Sriram2021-11-134-24/+43
| | | | | | | | | | | | When using the notmuch backend, it often makes more sense to sort folders (actual virtual folders, or queries) by the order specified in the query-map file, rather than alphabetically. This patch introduces a configuration option (disabled by default) that allows this. Additionally, due to the notmuch backend previously using maps (which are order-undefined) to store the list of queries, default query selection on aerc startup fluctuated. This patch fixes that by using slices to store query order.
* binds: add escape to clear searchKalyan Sriram2021-11-131-0/+1
|
* notmuch: allow empty searchesKalyan Sriram2021-11-131-1/+4
| | | | | Don't error on empty search terms, just don't filter by anything and return all items matching the current querymap
* messages: allow displaying email threadsy0ast2021-11-1315-100/+700
| | | | | | | | | | | | | Display threads in the message list. For now, only supported by the notmuch backend and on IMAP when the server supports the THREAD extension. Setting threading-enable=true is global and will cause the message list to be empty with maildir:// accounts. Co-authored-by: Kevin Kuehler <keur@xcf.berkeley.edu> Co-authored-by: Reto Brunner <reto@labrat.space> Signed-off-by: Robin Jarry <robin@jarry.cc>
* Release version 0.6.0 0.6.0Robin Jarry2021-11-091-1/+1
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* doc: update authorsRobin Jarry2021-11-0911-27/+46
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* config: use dynamic time format for default configRobin Jarry2021-11-061-7/+7
| | | | | | New users may find this nicer than a static format. Signed-off-by: Robin Jarry <robin@jarry.cc>
* index: add this-week-time-formatRobin Jarry2021-11-066-8/+36
| | | | | | | Also allow specific time format for messages received within the last 7 days. Signed-off-by: Robin Jarry <robin@jarry.cc>
* doc: fix typo today-time-format -> this-day-time-formatRobin Jarry2021-11-062-2/+2
| | | | | Fixes: 42b4302ba32e ("index: allow dynamic formatting of message dates") Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: add manual {dis,}connect supportRobin Jarry2021-11-053-30/+82
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* viewer: add colon after header namesRobin Jarry2021-11-052-4/+4
| | | | | | Display them as standard RFC 822 headers. Signed-off-by: Robin Jarry <robin@jarry.cc>
* go.mod: cleanupRobin Jarry2021-11-052-63/+5
| | | | | | Run go mod tidy. Signed-off-by: Robin Jarry <robin@jarry.cc>
* go.mod: change base git urlRobin Jarry2021-11-05126-255/+255
| | | | | | | 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>
* bindings: remove unsupported s-tab keyRobin Jarry2021-11-051-2/+0
| | | | | | | This binding does not exist. It is backtab. Fixes: 1a75906bcbc1 ("bindings: support more modified keys") Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: use builtin idle supportRobin Jarry2021-11-024-12/+2
| | | | | | | go-imap supports IDLE since 1.2.0. Remove dependency to go-imap-idle. Link: https://github.com/emersion/go-imap/commit/ac3f8e195ef1b6d Signed-off-by: Robin Jarry <robin@jarry.cc>
* main: set xterm titleRobin Jarry2021-11-021-0/+19
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* maildir: track the recent flag correctlyReto Brunner2021-11-012-31/+55
| | | | | | | | In the maildir worker we manually need to track the Recent flag in order for the notification command etc to work. Push that responsibility to the container, we must make sure to manually add the flag though if one grabs the message info.
* go: update all dependenciesRobin Jarry2021-11-012-26/+428
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* readme: update with fork infoRobin Jarry2021-10-302-4/+11
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* view,list: fix crash when viewing incomplete imap messagesRobin Jarry2021-10-282-48/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | With IMAP, due to an unidentified reason, some messages to not have any body accessible. When viewing them, aerc crashes: git.sr.ht/~sircmpwn/aerc/lib.usePGP lib/messageview.go:37 git.sr.ht/~sircmpwn/aerc/lib.NewMessageStoreView lib/messageview.go:67 git.sr.ht/~sircmpwn/aerc/commands/account.ViewMessage.Execute commands/account/view.go:45 git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand commands/commands.go:66 main.execCommand aerc.go:61 main.main.func2 aerc.go:160 aerc crashed: runtime error: invalid memory address or nil pointer dereference Check the pointer before dereferencing. Also, add a global check in ParseMessageFormat where a similar issue may occur. Signed-off-by: Robin Jarry <robin@jarry.cc>
* view,compose: use border color to separate headers from bodyRobin Jarry2021-10-285-22/+28
| | | | | | | | | | When composing a message, there is an empty fill line between the headers and the text editor. The line is printed with the default style which may cause users to assume it is part of the editor. Display the fill lines with the border color to avoid confusion. Signed-off-by: Robin Jarry <robin@jarry.cc>
* index: allow dynamic formatting of message datesRobin Jarry2021-10-286-7/+53
| | | | | | | | | | | | | | | | | | | | | When a message has been sent today (or this year) allow formatting the date differently. For example, with: [ui] index-format=%-25.25n %-25.25D %s timestamp-format=2006 Jan 02, 15:04 GMT-0700 this-day-time-format=Today at 15:04 this-year-time-format=Jan 02 The message list would look like this (spaces collapsed): Robin Jarry Today at 16:30 [PATCH 1/2] bindings: prepare for more modifers bugzilla@dpdk.org Oct 26 [dpdk-dev] [Bug 839] pdump: any subsequent runs of pdump_autotest fail Holger Levsen 2020 Mar 15, 13:44 GMT+01 +1 (Re: FTP Team -- call for volunteers) Signed-off-by: Robin Jarry <robin@jarry.cc>
* filters: allow matching any email headerRobin Jarry2021-10-281-0/+2
| | | | | | | | | In addition of the common headers (subject, to, from, cc), allow matching arbitrary email headers in filters. E.g.: x-bugzilla-severity,critical=tput setaf 1; cat;tput sgr0 Signed-off-by: Robin Jarry <robin@jarry.cc>
* bindings: support more modified keysRobin Jarry2021-10-283-4/+40
| | | | | | | | | | | | | | Add new supported keys: Ctrl+Enter Ctrl+Up Ctrl+Down Ctrl+Left Ctrl+Right Ctrl+PageUp Ctrl+PageDown Signed-off-by: Robin Jarry <robin@jarry.cc>
* bindings: prepare for more modifersRobin Jarry2021-10-283-168/+174
| | | | | | | | | | | | | | | | Prepare to support more modifiers in key bindings. tcell has some premade ctrl-modified keys but not all keys are supported. Other keys must be explicitly checked with a modifier mask. Update the KeyStroke type to carry a modifier mask. Update code accordingly. No functional change. Link: https://github.com/gdamore/tcell/blob/master/key.go#L265-L275 Link: https://github.com/gdamore/tcell/blob/master/key.go#L384-L419 Signed-off-by: Robin Jarry <robin@jarry.cc>
* lib/ui/textinput: Optimize ensureScrollAdnan Maolood2021-08-301-5/+5
|
* README: freenode -> libera.chatNoam Preil2021-08-261-2/+2
|
* notmuch/maildir: remove double emit of the dirinfoReto Brunner2021-04-282-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was some bug which could be worked around by double emitting an event. However that proofed to be brittle: We send the first message here from the worker goroutine: https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g= o#L306 Then Tick() is waked in the main goroutine and calls ProcessMessage: https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/widgets/account.go#L100 ProcessMessage in the main goroutine reads types.Message state with msg.getId() and msg.InResponseTo(): https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#= L74-76 Meanwhile in the worker goroutine we call PostMessage for a second time with a pointer that points to the *same* previous message that ProcessMessage is reading: https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g= o#L306 The second PostMessage call makes writes to message while ProcessMessage in the main goroutine is possibly reading: https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#= L59 This led to a data race in the event loop Reported-By: Wagner Riffel <w@104d.net>
* load config: do not overwrite the config upon errorReto Brunner2021-04-171-8/+9
| | | | | | | It makes absolutely no sense to copy over the default template from aerc.conf when the syntax is invalid and our ini parser fails. The only valid case to do that is if the file is actually missing.