Welcome and thanks for adding me to the list. I’ve used postfix for a
decade or so, but I’m brand new on OpenSMTPD 6.7.1 on FreeBSD 12.2.
I’ve gotten a reasonable setup on a test domain, and I’m able to
send and receive mail. I’m trying some of the finer points, and seem
to be having trouble understanding how to configure them. Apologies for
opening up with a number of questions. Relevant configs will be below
the questions.
1) Starting with an easy one. I believe these features are not yet live
in OpenSMTPD 6.7.1:
Postfix Soft Bounce feature (temporarily turn all 5xx errors into 4xx.)
XCLIENT support was hinted at being in 6.7, but doesn’t appear live?
Still planned?
SMTP Pipelining extension from RFC 2920 doesn’t seem to be supported?
2) I tried to subscribe to this list via my OpenSMTPD server, but the
email was greeted by an error:
smtp failed-command command="RCPT TO:<[email protected]>"
result="451 Temporary failure: <[email protected]>"
Other outbound mail works.
3) rspamd doesn’t appear to be doing much. It has a dkim signing
config but I can’t see it in outbound messages.
4) How do I test spam/ham is working in dovecot? It seems to be
configured, but doesn’t seem to do anything. No Junk folder.
It adds headers:
X-Spam: yes
X-Spam-Score: 12.1 / 15
X-Spam-Status: Yes, score=12.100 required=15.000
5) filters with junk instead of disconnect don’t seem to be being
placed in a junk folder in dovecot.
——
Mail # cat smtpd.conf
pki "mail" cert /usr/local/etc/mail/d20.pem
pki "mail" key /usr/local/etc/mail/key.pem
table aliases file:/usr/local/etc/mail/aliases
table domains file:/usr/local/etc/mail/domains
table credentials passwd:/usr/local/etc/mail/passwd
table virtuals file:/usr/local/etc/mail/virtuals
table dyndns file:/usr/local/etc/mail/dyndns
table blackhole { "@notarealdomain.com" }
filter rspamd proc-exec
"/usr/local/libexec/opensmtpd/opensmtpd-filter-rspamd"
filter check_dyndns phase connect match rdns regex <dyndns> junk
filter check_rdns phase connect match !rdns junk
filter check_fcrdns phase connect match !fcrdns junk
filter senderscore proc-exec "opensmtpd-filter-senderscore -junkBelow 70
-slowFactor 5000 -scoreHeader"
listen on lo0
listen on em0 port smtp filter { check_dyndns, check_rdns, check_fcrdns,
senderscore, rspamd }
listen on em0 port smtps tls-require pki "mail" filter { check_dyndns,
check_rdns, check_fcrdns, senderscore, rspamd }
listen on em0 port submission tls-require pki "mail" received-auth auth
<credentials>
action "local_mail" mbox alias <aliases>
action "virtual_mail" lmtp "/var/run/dovecot/lmtp" rcpt-to virtual
<virtuals>
action "outbound" relay
match from any mail-from <blackhole> for any reject
match from local for local action "local_mail"
match from any for domain <domains> action "virtual_mail"
match from local for any action "outbound"
mail # cat domains
d20hobbies.net
mail # cat passwd
[email protected]:$6$I-Changed-This-From-Hash-To-This:::James
Risner:d20hobbies.net/risner:
mail # cat virtuals
[email protected] vmail
mail # cat rspamd/local.d/dkim_signing.conf
domain {
d20hobbies.net {
path = "/usr/local/etc/mail/dkim/d20.key";
selector = "20201118";
}
}
mail # file /usr/local/etc/mail/dkim/d20.key
/usr/local/etc/mail/dkim/d20.key: PEM RSA private key
mail # cat local.conf
mail_location = maildir:/var/mail/vmail.dir/%d/%n:LAYOUT=fs
passdb {
args = /usr/local/etc/mail/passwd
driver = passwd-file
}
userdb {
args = uid=vmail gid=vmail home=/var/mail/vmail.dir/%d/%n
driver = static
}
disable_plaintext_auth=yes
ssl = yes
ssl_cert = </usr/local/etc/mail/d20.pem
ssl_key = </usr/local/etc/mail/key.pem
ssl_dh = </usr/local/etc/dovecot/dh.pem
protocol lda {
# Support for dynamically loadable plugins. mail_plugins is
# a space separated list of plugins to load.
mail_plugins = sieve # ... other plugins like quota
}
protocol imap {
mail_plugins = $mail_plugins imap_sieve
mail_max_userip_connections = 20
}
plugin {
sieve_before = /var/mail/sieve/global/spam-global.sieve
sieve =
file:/var/mail/sieve/%d/%n/scripts;active=/var/mail/sieve/%d/%n/active-script.sieve
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_causes = COPY APPEND
imapsieve_mailbox1_before =
file:/usr/local/lib/dovecot/sieve/report-spam.sieve
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before =
file:/usr/local/lib/dovecot/sieve/report-ham.sieve
imapsieve_mailbox3_name = Inbox
imapsieve_mailbox3_causes = APPEND
imapsieve_mailbox3_before =
file:/usr/local/lib/dovecot/sieve/report-ham.sieve
sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
}
mail # sievec report-ham.sieve
mail # sievec report-spam.sieve