This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
openbsd:mail:opensmtpd3 [2020/07/29 07:12] jrmu |
openbsd:mail:opensmtpd3 [2020/07/29 11:00] jrmu |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Here is how I set up my independent mail server. | + | Here is how I set up my independent mail server. It is based on the old (now deleted) [[https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/www/opensmtpd/faq/Attic/example1.html?rev=1.14|OpenSMTPd FAQ]]. |
+ | |||
+ | Make sure to install opensmtpd-extras: | ||
+ | |||
+ | <code> | ||
+ | $ doas pkg_add opensmtpd-extras | ||
+ | </code> | ||
In my /etc/mail/smtpd.conf: | In my /etc/mail/smtpd.conf: | ||
Line 41: | Line 47: | ||
action "relay_dkim" relay host smtp://127.0.0.1:10027 | action "relay_dkim" relay host smtp://127.0.0.1:10027 | ||
</code> | </code> | ||
+ | |||
+ | A single user vmail will receive mail for all virtual users: | ||
+ | |||
+ | <code> | ||
+ | $ doas useradd -m -g =uid -c "Virtual Mail" -d /var/vmail -s /sbin/nologin vmail | ||
+ | </code> | ||
+ | |||
+ | The /etc/passwd file will contain a line similar to this: | ||
+ | |||
+ | <code> | ||
+ | vmail:*:1000:1000:Virtual Mail:/var/vmail:/sbin/nologin | ||
+ | </code> | ||
+ | |||
+ | /var/vmail is used to store virtual users' maildir folders. It will be managed by dovecot, which receives mail via LMTP. | ||
At the bottom of /etc/mail/aliases, add these lines: | At the bottom of /etc/mail/aliases, add these lines: |