Created
October 17, 2023 08:22
-
-
Save gahr/28885833d775073e87d96f32032d708c to your computer and use it in GitHub Desktop.
smtpd.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my_net = "192.168.1.0/24" | |
| table domains sqlite:/usr/local/etc/mail/sqlite.conf | |
| table virtuals sqlite:/usr/local/etc/mail/sqlite.conf | |
| table userinfo sqlite:/usr/local/etc/mail/sqlite.conf | |
| table credentials sqlite:/usr/local/etc/mail/sqlite.conf | |
| table aliases file:/etc/mail/aliases | |
| pki ptrcrt.ch cert "/usr/local/etc/acme.sh/ptrcrt.ch/fullchain.cer" | |
| pki ptrcrt.ch key "/usr/local/etc/acme.sh/ptrcrt.ch/ptrcrt.ch.key" | |
| filter "rspamd" proc-exec "opensmtpd-filter-rspamd -url http://192.168.1.8:11333" | |
| filter "rdns" phase connect match !rdns disconnect "550 RDNS error" | |
| filter "fcrdns" phase connect match !fcrdns disconnect "550 FCRDNS error" | |
| # Listen on SMTP for incoming connections | |
| listen on lo1 port 588 filter { "rspamd" } | |
| listen on lo1 port 587 tls-require auth <credentials> pki ptrcrt.ch tag submission filter { "rspamd" } | |
| listen on lo1 tls pki ptrcrt.ch filter { "rdns", "fcrdns", "rspamd" } | |
| listen on lo1 smtps pki ptrcrt.ch filter { "rdns", "fcrdns", "rspamd" } | |
| action "local" maildir alias <aliases> | |
| action "inbound" lmtp "/var/run/dovecot/lmtp" rcpt-to virtual <virtuals> userbase <userinfo> | |
| action "outbound" relay | |
| match from local for local action "local" | |
| match from any for domain <domains> action "inbound" | |
| match from local for any action "outbound" | |
| match from any for any auth action "outbound" | |
| match from src $my_net for any action "outbound" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment