This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
openbsd:mail:opensmtpd2 [2020/07/28 08:26] baytuch [Additional files] |
openbsd:mail:opensmtpd2 [2020/08/12 13:53] baytuch [Creating a configuration file] |
||
---|---|---|---|
Line 27: | Line 27: | ||
pki example.com cert "/etc/ssl/example/example.pem" | pki example.com cert "/etc/ssl/example/example.pem" | ||
pki example.com key "/etc/ssl/example/private/example.key" | pki example.com key "/etc/ssl/example/private/example.key" | ||
+ | |||
+ | smtp max-message-size 5M | ||
table aliases file:/etc/mail/aliases | table aliases file:/etc/mail/aliases | ||
table domains file:/etc/mail/domains | table domains file:/etc/mail/domains | ||
table hosts file:/etc/mail/hosts | table hosts file:/etc/mail/hosts | ||
- | #table vusers file:/etc/mail/vusers | + | table vusers file:/etc/mail/vusers |
- | #table passwd file:/etc/mail/passwd | + | table passwd file:/etc/mail/passwd |
+ | |||
+ | filter check_rdns phase connect match !rdns junk | ||
+ | filter check_fcrdns phase connect match !fcrdns junk | ||
listen on lo0 mask-src | listen on lo0 mask-src | ||
listen on lo0 port 10028 tag DKIM mask-src | listen on lo0 port 10028 tag DKIM mask-src | ||
- | listen on egress port 25 tls pki example.com mask-src | + | listen on egress port 25 tls pki example.com mask-src filter { check_rdns check_fcrdns } |
- | #listen on egress port 587 tls-require pki example.com auth <passwd> mask-src | + | listen on egress port 587 tls-require pki grape.ircnow.org auth <passwd> mask-src filter { check_rdns check_fcrdns } |
action "local_mail" mbox alias <aliases> | action "local_mail" mbox alias <aliases> | ||
action "relay_dkim" relay host smtp://127.0.0.1:10027 | action "relay_dkim" relay host smtp://127.0.0.1:10027 | ||
action "relay" relay | action "relay" relay | ||
- | #action "lmtp" lmtp "/var/dovecot/lmtp" rcpt-to virtual <vusers> | + | action "lmtp" lmtp "/var/dovecot/lmtp" rcpt-to virtual <vusers> |
- | match from local for local action "local_mail" | + | match from local for rcpt-to regex "^root@|^abuse@|^security@" action "local_mail" |
- | #match from local for domain <domains> action "lmtp" | + | match from local for domain <domains> action "lmtp" |
match tag DKIM for any action "relay" | match tag DKIM for any action "relay" | ||
match from local for any action "relay_dkim" | match from local for any action "relay_dkim" | ||
match from src <hosts> for any action "relay_dkim" | match from src <hosts> for any action "relay_dkim" | ||
- | #match from any for domain <domains> action "lmtp" | + | match from auth for any action "relay_dkim" |
+ | match from any for domain <domains> action "lmtp" | ||
</code> | </code> | ||
Line 68: | Line 74: | ||
The vusers file is used to receive mail. It contains a list of mailboxes. This is an example: | The vusers file is used to receive mail. It contains a list of mailboxes. This is an example: | ||
<code> | <code> | ||
- | admin@example.com mailman | + | admin@example.com mailman |
hostmaster@example.com mailman | hostmaster@example.com mailman | ||
ircnowguy@example.com mailman | ircnowguy@example.com mailman |