From ArchWiki
Revision as of 00:29, 17 March 2014 by Srf21c (talk | contribs) (Watch the spice flow!: corrected command to use systemd journal)
Jump to: navigation, search

Required packages


pacman -S opensmptd

simple OpenSMTPD/mbox configuration

create user accounts

Create a user account for each discrete mailbox. OpenSMTPD will deliver to the user accounts mbox spool. Multiple SMTP email addresses can be delivered into one mailbox if desired.

# useradd -m -s /bin/bash roger
# useradd -m -s /bin/bash shirley

edit /etc/smtpd/smtpd.conf

A working configuration can be had in as little as five lines!

listen on eth0 hostname
table vdoms             "/etc/smtpd/vdoms"
table vusers            "/etc/smtpd/vusers"
accept from any for domain <vdoms> virtual <vusers> deliver to mbox
accept from source { localhost } for any relay

create domain and user maps

/etc/smtpd/vdoms - put one domain per line

/etc/smtpd/vusers - map inbound email addresses to local mbox user account names, or inside/outside email addresses. Mix and match as desired.          roger    roger,            roger          shirley             roger,shirley

Starting the server

Use the standard systemd syntax to control the smtpd.service daemon.

# systemctl start smtpd.service

To have it start on boot

# systemctl enable smtpd.service

Watch the spice flow!

# journalctl -f _SYSTEMD_UNIT=smtpd.service

See also