Differences between revisions 4 and 5
Revision 4 as of 2022-09-26 18:34:22
Size: 1828
Comment:
Revision 5 as of 2023-01-07 15:58:04
Size: 1824
Comment:
Deletions are marked like this. Additions are marked like this.
Line 48: Line 48:
Sourcehut requires a PGP key to send mail by [[Protocols/SMTP|SMTP]]. In the Sourcehut configuration file: Sourcehut requires a PGP key to send mail by [[Email/SMTP|SMTP]]. In the Sourcehut configuration file:

Sourcehut Mail

The Sourcehut software environment makes extensive use of email as a communication protocol.


Configuration

SMTP

To route outbound email (i.e. automated notifications), Sourcehut needs to run alongside some MTA.

If a mail server is running locally, a valid option is to connect without encryption or authentication. In the Sourcehut configuration file:

[mail]
smtp-host=localhost
smtp-port=25
smtp-from=root@localhost
smtp-encryption=insecure
smtp-auth=none

If encryption is necessary, try:

smtp-encryption=starttls

If authentication is necessary, try:

smtp-auth=plain
smtp-user=myuser
smtp-password=mypassword

PGP

Sourcehut requires a PGP key to send mail by SMTP. In the Sourcehut configuration file:

pgp-privkey=/etc/sr.ht/pgp.key
pgp-pubkey=/etc/sr.ht/pgp.pubkey
pgp-key-id=KEYID

The private key must be password-less. For instructions on exporting keys to files and removing passwords from keys, see GPG.

LMTP

For the todo.sr.ht-lmtp service to receive and process inbound mail, Sourcehut needs to run alongside some mail agent. LMTP is inherently a queue-less protocol, so either a MDA or MTA will be sufficient. Because an MTA is already necessary for administering Sourcehut, it's recommended to simply re-use it.

In the todo.sr.ht::mail section of the Sourcehut configuration file:

[todo.sr.ht::mail]
sock=/tmp/todo.sr.ht-lmtp.sock
sock-group=mtauser
posting-domain=localhost.localdomain

As an example, if running Postfix as an MTA, set sock-group to postfix.


CategoryRicottone

Sourcehut/Mail (last edited 2023-05-29 12:43:21 by DominicRicottone)