Commit Graph

67 Commits

Author SHA1 Message Date
Koni Marti b19b844a63 pgp: PGP/MIME encryption for outgoing emails
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-07 13:45:34 +01:00
Koni Marti 69d4e3895f pgp: PGP/MIME signing for outgoing emails
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-07 13:45:34 +01:00
Robin Jarry 0d645bcebd go.mod: change base git url
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-11-05 10:21:45 +01:00
Reto Brunner 8cd2485170 send: fix missing error return 2021-02-28 02:05:12 +01:00
Reto Brunner 2d2010fd42 send: fix crash if invalid password is given 2021-02-05 21:20:17 +01:00
Reto Brunner 8ea86cea41 Get rid of the aerc.PushError(" " + $string) idiom
The individual callers should not be responsible for padding
2021-01-30 14:04:23 +01:00
Reto Brunner 9385827cae send: don't block the UI thread during the sending 2021-01-24 18:00:23 +01:00
Reto Brunner 67923707ff Refactor send command 2020-11-21 15:40:50 +01:00
Reto Brunner 256af6322b allow the loading of existing headers 2020-11-14 15:40:13 +01:00
Reto Brunner 24f1c575ae format: remove parse methods, use the one from go-message 2020-11-14 15:40:13 +01:00
Reto Brunner 20ec2c8eeb compose: use a proper header instead of a string map
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-14 15:40:13 +01:00
y0ast 42ce6b41ff propagate error from sendmail 2020-09-22 08:12:38 +02:00
R Chowdhury f4dc7e1f74 Add `oauthbearer` support for SMTP
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-13 07:44:43 +02:00
Kalyan Sriram 905cb9dfd3 Implement style configuration.
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-06 21:42:06 +02:00
Reto Brunner 3d784c5d8c Revert "Implement style configuration."
This reverts commit 1ff687ca2b.
2020-07-30 23:22:32 +02:00
Kalyan Sriram 1ff687ca2b Implement style configuration.
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-30 19:35:59 +02:00
Heiko Carrasco 749dbb93a4 Use PushStatus instead of SetStatus where it makes sense 2020-07-09 08:37:01 +02:00
Drew DeVault caad1b2c06 Revert "Add Style configuration"
This reverts commit 0f78f06610.
2020-05-28 10:32:42 -04:00
Drew DeVault 76a91813d8 Revert "Remove duration from the status methods"
This reverts commit f06d683688.
2020-05-28 10:32:32 -04:00
Reto Brunner f06d683688 Remove duration from the status methods
We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
2020-05-27 08:11:40 +02:00
Reto Brunner 0f78f06610 Add Style configuration
The following functionalities are added to configure aerc ui styles.
- Read stylesets from file with very basic fnmatch wildcard matching
- Add default styleset
- Support different stylesets as part of UiConfig allowing contextual
  styles.
- Move widgets/ui elements to use the stylesets.
- Add configuration manual for the styleset
2020-05-27 07:57:10 +02:00
Srivathsan Murali b1eb7ad18d Set AnsweredFlag on successful reply 2020-05-25 11:29:53 -04:00
Drew DeVault 3ba836003a gofmt 2020-05-19 12:11:43 -04:00
elumbella d8533e897a Show 'Message sent' only for ten seconds instead of permanently 2020-05-11 09:46:57 -04:00
Ray Ganardi b650bb30a2 Implement :header command
Usage: *header* [-f] <field> [value]
	Add a new email header. If the header already exists, -f must be
	specified to replace the given value.
2020-05-01 11:01:28 -04:00
Drew DeVault 6f8ad91824 gofmt fixes 2020-04-24 12:59:40 -04:00
Jeffas 3102ac3680 Add recall command
This command allows recalling the selected postponed email to edit in
the composer. The command only allows recalling from the postpone
directory.
2020-04-24 12:59:21 -04:00
Jeffas 7f033278eb Add postpone command
This command uses the Postpone folder from the account config to save
messages to. Messages are saved as though they were sent so have a valid
'to' recipient address and should be able to be read back in for later
editing.
2020-04-24 12:59:21 -04:00
Ben Fiedler 7c89143c70 Use aerc.PushError where appropriate
Forgot an unused import, to save you the hassle here is v2.
2020-04-23 21:02:45 +02:00
Simon Ser 89f1684ea4 Update dependencies
This brings in some bug fixes.
2020-03-03 16:48:35 -05:00
Galen Abell 6ff3c7a1ba Mark sent messages as "seen" in maildir
- Add maildir flags to complement a messages imap flags
- Set the "seen" flag on sent messages when using the maildir backend
- Cleanup AppendMessage interface to use models.Flag for both IMAP and
  maildir
2020-03-03 20:08:37 +01:00
Luke Drummond 331b915139 Add support for AUTH LOGIN submission
`go-sasl` upstream added support [1] for the obsolete [2] AUTH LOGIN
method which enables aerc to send email via servers which remain common
in the wild.

Fixes ~sircmpwn/aerc2#263

[1] https://github.com/emersion/go-sasl/commit/61afe53d
[2] https://datatracker.ietf.org/doc/draft-murchison-sasl-login/
2019-11-01 11:02:01 -04:00
Jeffas 39307a6fa7 Make commands join args with spaces
This patch ensures the following commands join their arguments with
spaces to make it easier to interact with:

- cf
- mkdir
- cd
- attach
- detach
- ct
- copy
- move
- save
2019-09-20 15:06:34 -04:00
Wagner Riffel feacca3c5c all: use fmt.Errorf for fomartting errors
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04 16:30:57 -10:00
Wagner Riffel 6838c23478 all: purge redundant underscores
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04 16:30:57 -10:00
Drew DeVault 4fc6fee734 Revert "add close command at global level"
This reverts commit f0a0c5aa73.
2019-08-13 10:55:50 +09:00
Aditya Srivastava f0a0c5aa73 add close command at global level 2019-08-13 10:49:34 +09:00
Daniel Bridges 0a52124102 Allow cc/bcc command to receive no arguments 2019-08-07 14:07:48 +09:00
Kevin Kuehler 0ceea02720 cc/bcc: Append to existing headers if called twice
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-08-07 14:07:22 +09:00
Daniel Bridges f4b7741463 Add cc and bcc commands 2019-08-03 10:43:55 -04:00
Galen Abell bfefafff27 Add filesystem completions for :attach and :cd
Tab-completions now cycle through filesystem paths when using :attach or
:cd commands.
2019-08-02 09:22:40 -04:00
Reto Brunner c81b3eb1cb Sendmail: allow for arbitrary parameters
Allows the outgoing command to contain arguments and flags
2019-07-29 14:51:12 -04:00
Galen Abell 0ee7d30187 Add :detach command
Add a command for removing attachments from a composed message. Syntax
is :detach [path], with path being an optional argument specifying the
path of one existing attachment. If no path is specified, the first
attachment is removed.
2019-07-27 12:37:55 -04:00
Drew DeVault d931bbeff1 Add missing fallthrough 2019-07-27 12:36:30 -04:00
Drew DeVault 48758136c0 Implement sendmail support 2019-07-27 11:19:49 -04:00
Galen Abell 7899d15d60 Add :attach command for compose
Allow users to add attachments to emails in the Compose view. Syntax is
:attach <path>, where path is a valid file. Attachments will show up in
the pre-send review screen.
2019-07-19 10:30:47 -04:00
Gregory Mullen 2a0961701c Implement basic tab completion support
Tab completion currently only works on commands. Contextual completion
will be added in the future.
2019-06-29 14:24:19 -04:00
Drew DeVault ceeb30abeb Fix Cc & Bcc handling in replies 2019-06-21 14:33:09 -04:00
Yash Srivastav 35f57321f8 Mark sent emails as read 2019-06-08 12:44:01 -04:00
Drew DeVault 887ff6550d Implement :edit in compose screen 2019-05-26 11:58:14 -04:00