Commit Briefs

dfb8142019 Oliver Lowe

add mbackup backup command (master)


c57be6e1df Oliver Lowe

Filter incoming mail through spamassassin


a5a50728d8 Oliver Lowe

Only listen on imaps for fetching mail

Not POP3, POP3S or plain IMAP


922ab726e1 Oliver Lowe

Disallow creating a mailbox without parent domain


9935e8d449 Oliver Lowe

Use TEXT as primary keys

I think it will be ok


cdf835fcb0 Oliver Lowe

relay mail through smtp2go

finally found a working service!


c6f2238d9a Oliver Lowe

relay via aws ses rather than postmark

postmark rejected our application to relay mail through it, and aws also rejected our request to relay mail via EC2 :(


8a8f6795ec Oliver Lowe

Ensure no conflict in domains, mailboxes etc.


a15802b2ee Oliver Lowe

Relay outbound mail via Postmark


901f37eab4 Oliver Lowe

Allow management of mailboxes from an account

This introduces a new type, called account. An account can manage domains and, in turn, mailboxes.


Branches

Tags

This repository contains no tags

Tree

READMEcommits | blame
accounts.confcommits | blame
acme-client.confcommits | blame
bin/
dovecot-sql.conf.extcommits | blame
dovecot.confcommits | blame
httpd.confcommits | blame
init.sqlcommits | blame
install.shcommits | blame
smtpd.confcommits | blame

README

First, run install.sh as a privileged user (root).

	doas sh install.sh

It is safe to run more than once.
install.sh does the following:

- installs packages
- enables daemons
- creates directories
- creates an unprivileged mail delivery system user
- installs configuration files
- initialises the accounts database if not present already
- restarts daemons

Extra steps that need to be run manually follow.

TLS certificate
------

Renew the certificate every night with an entry in root's crontab:

	0 4 * * * acme-client mail.srcbeat.com && rcctl restart smtpd dovecot

The required httpd and acme-client configuration are installed by install.sh.

Dovecot
------

Add the user and password database configuration to /etc/dovecot/conf.d/10-auth.conf:

	userdb {
	        driver = static
	        args = uid=vmail gid=vmail home=/mail/box/%d/%n
	}
	passdb {
	        driver = sql
	        args = /etc/dovecot/dovecot-sql.conf.ext
	}

dovecot-sql.conf.ext is already installed by install.sh.

Add the mail location to /etc/dovecot/conf.d/10-mail.conf:

	mail_location = maildir:/mail/box/%d/%n/Maildir:LAYOUT=fs

With this configuration mail for the account with the username "test@example.com"
is stored at /mail/box/example.com/test/Maildir.

Configure dovecot to load the TLS keys by adding the following to /etc/dovecot/conf.d/10-ssl.conf:

	ssl = required
	ssl_cert = </etc/ssl/mail.srcbeat.com.crt
	ssl_key = </etc/ssl/private/mail.srcbeat.com.key