aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-20build: add multiple distributionsRobin Jarry
Add build and test on debian, fedora and archlinux. Only check code formatting on alpine. Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-20maildir,notmuch: pass in-memory message to callbackNguyễn Gia Phong
This fixes piped full message (:pipe -m) being empty. Fixes: 904ffacb0e52 ("maildir,notmuch: avoid leaking open files") Signed-off-by: Nguyễn Gia Phong <mcsinyx@disroot.org>
2022-01-20bindings: fix ctrl-h binding not workingRobin Jarry
For some unknown reason. tcell does not include the ctrl modifier for the ctrl-h key event. Fixes: 7a6c808c042b ("bindings: prepare for more modifers") Fixes: https://todo.sr.ht/~rjarry/aerc/8 Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-19terminal: fix nil pointer dereference in pty.GetsizeKoni Marti
pty.Getsize() is used in the Draw function of the terminal widget and wraps the pty.GetsizeFull() function. However, pty.Getsize does not check the returned error from pty.GetsizeFull before dereferencing the winsize struct. In case of an error, this will cause a nil pointer deference and panic. This has been reported in the upstream package, but in the meantime, we can directly use pty.GetsizeFull. References: https://todo.sr.ht/~rjarry/aerc/11 Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-19mk: only install if files changedRobin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
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-19templates: add x-mailer header in default filesRobin Jarry
This should serve as an example for new users. Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-19maildir,notmuch: avoid leaking open filesNguyễn Gia Phong
Previously, Message.NewReader returned the wrapped buffered reader without a reference to the opened file, so the files descriptors were left unclosed after reading. Now, the file reader is returned directly and closed on the call site. Buffering is not needed here because it is an implementation detail of go-message. Fixes: https://todo.sr.ht/~rjarry/aerc/9
2022-01-19imap: auto-reconnects on connection errorKoni Marti
if the worker emits a connection error, the ui will automatically send back a reconnect command. The worker then establishes a new connection. Auto-reconnect is disabled when the user sends the disconnect command. Fixes: https://todo.sr.ht/~rjarry/aerc/1 Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-19imap: emits connection error on logoutKoni Marti
implements a new connection error message. This allows the worker to emit a connection-related error message to the ui when the imap client closes the loggedOut channel. Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-19imap: fix panic when sending multiple connect cmdsKoni Marti
fixes the panic when the user sends multiple connect commands and is already connected. The panic is caused by closing an already closed channel. This happens when the idle re-init code is not executed, e.g. when there's a return statement in the switch block. A defer func() before the switch block will prevent this. The existing behavior of only creating a new idleStop channel when properly connected is preseverd. Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-15Release version 0.7.10.7.1Robin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-15Revert "imap: attempt automatic reconnection on error"Robin Jarry
This reverts commit c605ada3ddc7569ebfc153b07db12a21b30d0569. This breaks reading message bodies. I am not sure why, I'll take some time to fix it later. Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-14Release version 0.7.00.7.0Robin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-14imap: attempt automatic reconnection on errorRobin Jarry
Attempt to reconnect to the server when there is an unexpected disconnection or network error. Use the Client.LoggedOut() channel which is closed when the connection is closed. This patch is rather flaky and is certainly bugged. However, it is a start. Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-14Stop wrapping OriginalText in default templatesNguyễn Gia Phong
Wrapping embeded code or patches could mess up the content.
2022-01-14fix segfault when copy-pasting into compose editorKoni Marti
fixes the segmentation fault when copy-pasting a large text into the composer editor. The problem is a concurrent read of the vterm field in the Terminal widget in its flushTerminal() method which can be avoided with a mutex. Fixes: https://todo.sr.ht/~rjarry/aerc/12 Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-01-07completions: add support for completing multiple addressesParasrah
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.
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>
2022-01-07pgp: update openpgp packages (go-crypto and go-pgpmail)Koni Marti
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>
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-12-13mk: remove version overridepsykose
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
2021-12-11format: reformat code with go 1.17Robin Jarry
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>
2021-12-11build: add check for code formattingRobin Jarry
Let's avoid pushing unformatted code. Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-12-11config: fix code formattingRobin Jarry
Tabs are required. Fixes: 175d0efeb22e ("binds: add account specific bindings") Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-12-11imap: fix build on macosRobin Jarry
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>
2021-12-11binds: add account specific bindingsJonathan Bartlett
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>
2021-12-11readme: add contribution guideRobin Jarry
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>
2021-12-07imap: add tcp connection optionsRobin Jarry
Allow fine tuning tcp connection options. Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-12-07imap: use low level tcp connectionRobin Jarry
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>
2021-12-07imap: move connect procedure into a dedicated functionRobin Jarry
This will prepare for extra tcp connection options support and for automatic reconnect. No functional change. Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-12-06maildir: watch for message renamesRobin Jarry
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>
2021-12-06maildir: watch for external changesRobin Jarry
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>
2021-11-30style: customize vertical and horizontal border charactersDian M Fay
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>
2021-11-29doc: fix typo in stylesets-dirsDian M Fay
2021-11-22imap: fix segfault when disconnectingRobin Jarry
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>
2021-11-13doc: fix default values for dynamic date formatsRobin Jarry
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>
2021-11-13notmuch: allow sort by file orderKalyan Sriram
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.
2021-11-13binds: add escape to clear searchKalyan Sriram
2021-11-13notmuch: allow empty searchesKalyan Sriram
Don't error on empty search terms, just don't filter by anything and return all items matching the current querymap
2021-11-13messages: allow displaying email threadsy0ast
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>
2021-11-09Release version 0.6.00.6.0Robin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-09doc: update authorsRobin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-06config: use dynamic time format for default configRobin Jarry
New users may find this nicer than a static format. Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-06index: add this-week-time-formatRobin Jarry
Also allow specific time format for messages received within the last 7 days. Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-06doc: fix typo today-time-format -> this-day-time-formatRobin Jarry
Fixes: 42b4302ba32e ("index: allow dynamic formatting of message dates") Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-05imap: add manual {dis,}connect supportRobin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-05viewer: add colon after header namesRobin Jarry
Display them as standard RFC 822 headers. Signed-off-by: Robin Jarry <robin@jarry.cc>