outgoing: add oauth authentication method

My organisation uses gmail and does not allow one to enable 2FA which is required for app passwords; could oauth be implemented for outgoing mail too?

Assigned to
8 months ago
8 months ago
feature smtp

~tmplt 8 months ago

An alternative would be to support msmtp as an outgoing messenger, which supports oauth (together with getmail-gmail-xoauth-tokens).

~labrat 8 months ago

msmtp already works, man aerc-sendmail

Also you can probably hack up a script and plug it into outgoing-cred-cmd that does the token exchange

~tmplt 8 months ago

On Sat Nov 16, 2019 at 10:37 AM ~labrat wrote:

msmtp already works, man aerc-sendmail Would that be just outgoing = /path/to/msmtp? I'm getting a confusing EOF error without the mail being sent. I tried using the below script as outgoing to see what aerc actually calls the executable with (in case I need to write some wrapper), but there is no ~/{options,stdin} after the mail has been "sent". Am I missing something?

# sendmail-dummy.sh, with +x
echo -- "$@" > ~/options
while IFS= read -r line
    echo "$line" >> ~/stdin
done < /dev/stdin

~labrat 8 months ago

On Sat, Nov 16, 2019 at 01:46:50PM -0000, ~tmplt wrote:

Would that be just outgoing = /path/to/msmtp?

Well, depends on what you want to do. I've set mine to outgoing = /bin/msmtp --read-envelope-from

Am I missing something?


~tmplt 8 months ago

On Sun Nov 17, 2019 at 9:21 AM ~labrat wrote:

I've set mine to outgoing = /bin/msmtp --read-envelope-from

That does it, thanks.

Register here or Log in to comment, or comment via email.