Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2022-09-26 18:34:22
Size: 1828
Comment:
Revision 6 as of 2023-05-29 12:43:21
Size: 1835
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The Sourcehut software environment makes extensive use of email as a communication protocol. The '''Sourcehut''' software system uses email for user communication.
Line 11: Line 11:
== Configuration ==



=== SMTP ===
== SMTP Connection ==
Line 19: Line 15:
If a mail server is running locally, a valid option is to connect without encryption or authentication. In the Sourcehut configuration file: For an unencrypted connection, try:
Line 25: Line 21:
smtp-from=root@localhost
Line 30: Line 25:
If encryption is necessary, try: For an encrypted connection, try:
Line 36: Line 31:
If authentication is necessary, try: For an authenticated connection, try:
Line 44: Line 39:
----
Line 46: Line 42:
=== PGP ===
Line 48: Line 43:
Sourcehut requires a PGP key to send mail by [[Protocols/SMTP|SMTP]]. In the Sourcehut configuration file: == Sending Mail ==

The sender address must be configured with a value taht the MTA will accept.

{{{
smtp-from=postmaster@localhost
}}}

A passwordless PGP key also needs to be made available, so that mail can be verified to be authentic.
Line 56: Line 59:
The private key must be password-less. For instructions on exporting keys to files and removing passwords from keys, see [[Encryption/GPG#Usage|GPG]]. For instructions on exporting keys to files and removing passwords from keys, see [[Encryption/GPG#Usage|GPG]].

Error reports are generated automatically as emails. Configure the sender and recipient addresses.

{{{
[email protected]
[email protected]
}}}

----
Line 60: Line 72:
=== LMTP === == LMTP Servers ==
Line 62: Line 74:
For the `todo.sr.ht-lmtp` service to receive and process inbound mail, Sourcehut needs to run alongside some mail agent. [[Email/LMTP|LMTP]] is inherently a queue-less protocol, so either a [[Email/MDA|MDA]] or [[Email/MTA|MTA]] will be sufficient. Because an MTA is already necessary for administering Sourcehut, it's recommended to simply re-use it. The mailing list and bug tracker services use [[Email/LMTP|LMTP]] servers. Emails can be routed based on the destination address; all emails for `todo.example.com` should go to the corresponding socket.
Line 64: Line 76:
In the `todo.sr.ht::mail` section of the Sourcehut configuration file: The LMTP servers are designed to use either a [[Linux/Networking#Unix_Sockets|unix socket]] or a [[Protocols/TCP|TCP socket]] (i.e. a networking port), but my personal experience is that the unix sockets are more reliable.
Line 67: Line 79:
[todo.sr.ht::mail]
sock=/tmp/todo.sr.ht-lmtp.sock
sock=/tmp/todosrht-lmtp.sock
Line 70: Line 81:
posting-domain=localhost.localdomain posting-domain=todo.example.com
Line 72: Line 83:

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

Sourcehut Mail

The Sourcehut software system uses email for user communication.


SMTP Connection

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

For an unencrypted connection, try:

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

For an encrypted connection, try:

smtp-encryption=starttls

For an authenticated connection, try:

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


Sending Mail

The sender address must be configured with a value taht the MTA will accept.

smtp-from=postmaster@localhost

A passwordless PGP key also needs to be made available, so that mail can be verified to be authentic.

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

For instructions on exporting keys to files and removing passwords from keys, see GPG.

Error reports are generated automatically as emails. Configure the sender and recipient addresses.

[email protected]
[email protected]


LMTP Servers

The mailing list and bug tracker services use LMTP servers. Emails can be routed based on the destination address; all emails for todo.example.com should go to the corresponding socket.

The LMTP servers are designed to use either a unix socket or a TCP socket (i.e. a networking port), but my personal experience is that the unix sockets are more reliable.

sock=/tmp/todosrht-lmtp.sock
sock-group=mtauser
posting-domain=todo.example.com


CategoryRicottone

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