Ubuntu's mail stack provides fully operational delivery with safe defaults and additional options. Out of the box it supports IMAP, POP3 and SMTP services with SASL authentication and Maildir as default storage engine.
This is a rudimentary start at a workable postfix charm. It doesn't support scaling yet.
Charm accepts number of options, including MTA type, FQDN, mynetworks, root, relayhost and destinations.
mtatype: 1 - Internet site; fully functional SMTP that delivers e-mail directly to destination servers 2 - Internet with smarthost; fully functional SMTP that delivers all e-mail to a relayhost 3 - Satellite system; SMTP that delivers all e-mail to a relayhost and doesn't accept incoming e-mail 4 - Local only; local SMTP that delivers e-mail only on local server and doesn't accept any incoming e-mail
fqdn: FQDN of the host IMPORTANT: whenever the config is changed, one needs to specify this option, otherwise default (localhost) will be used
relayhost: relayhost/smarthost for delivering email
destinations: domains for which MTA will consider itself as a final destination
root: account to which all root and postmaster e-mail will be delivered IMPORTANT: whenever the config is changed, one needs to specify this option, otherwise default (nobody) will be used
mynetworks: IPs or IP ranges from which SMTP will accept e-mail without the need for authentication
$ cat /tmp/example.yaml mail-stack-delivery: mtatype: 1 fqdn: mail.example.com relayhost: smtp.example.com destinations: example.com, example.net, example.org root: example001 mynetworks: 10.0.0.0/24 10.0.1.0/24
$ juju deploy --config /tmp/example.yaml mail-stack-delivery
- (string) Comma separated list of domains for which this | machine should consider itself the final destination.
- (string) FQDN of the host (default is localhost.localdomain)
- (int) MTA type | 1 - Internet site (no relayhost) 2 - Internet site with smarthost 3 - Satellite system 4 - Local delivery only (default)
- (string) Space separated list of IPs or hostnames | which can use this MTA without authentication.
- (string) IP/hostname of the Relayhost (default is undefined)
- (string) Mail account to which mail for root and | postmaster will be redirected to.