Differences between revisions 1 and 2
Revision 1 as of 2022-09-09 17:37:23
Size: 1084
Comment:
Revision 2 as of 2022-09-09 17:50:43
Size: 1825
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
If a mail server is running locally, a valid option is to connect without encryption or authentication. If a mail server is running locally, a valid option is to connect without encryption or authentication. In the Sourcehut configuration file:
Line 48: Line 48:
Sourcehut requires a PGP key to send mail by SMTP. Sourcehut requires a PGP key to send mail by SMTP. In the Sourcehut configuration file:
Line 60: Line 60:
=== 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 [[Email/MailDeliveryAgent|MDA]] or [[Email/MailTransferAgent|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`.


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)