Difference between revisions of "OpenSMTPD"

From ArchWiki
Jump to: navigation, search
(Created page with "Category:Mail Server == Required packages == * {{Pkg|opensmtpd}} == Installation == pacman -S opensmptd == OpenSMTPD configuration == === edit /etc/smtpd/smtpd.conf =...")
 
(edit /etc/smtpd/smtpd.conf)
Line 15: Line 15:
  
 
{{bc|
 
{{bc|
listen on eth0> hostname myemaildomain.com
+
listen on eth0 hostname myemaildomain.com
 
table vdoms            "/etc/smtpd/vdoms"
 
table vdoms            "/etc/smtpd/vdoms"
 
table vusers            "/etc/smtpd/vusers"
 
table vusers            "/etc/smtpd/vusers"

Revision as of 22:23, 16 March 2014

Required packages

Installation

pacman -S opensmptd

OpenSMTPD configuration

edit /etc/smtpd/smtpd.conf

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

listen on eth0 hostname myemaildomain.com
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 10.1.1.0/24 } for any relay

create domain and user maps

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

personaldomain.org
businessname.com

/etc/smtpd/vusers - map inbound email addresses to local mbox user account names, or inside/outside email addresses.

roger@personaldomain.org          roger
newsletters@personaldomain.org    roger,roger.rulz@gmail.com

roger@businessname.com            roger
shirley@businessname.com          shirley
info@businessname.com             roger,shirley
contact@businessname.com          info@businessname.com


Fire it up!

# systemctl enable opensmtpd;systemctl start opensmtpd

Watch the spice flow!

# tail -f /var/log/maillog

See also