No it will not. However, it's fairly easy to make sure it does with a few commands and a change in the config. Provided with zero warranty - just because it didn't crash my server, doesn't mean it won´t with you.
Create sieve scripts:
cat > /etc/dovecot/learn-spam.sieve << 'EOF'
require ["vnd.dovecot.pipe", "copy", "imapsieve"];
pipe :copy "rspamd-learn-spam.sh";
EOF
cat > /etc/dovecot/learn-ham.sieve << 'EOF'
require ["vnd.dovecot.pipe", "copy", "imapsieve"];
pipe :copy "rspamd-learn-ham.sh";
EOF
Create shell scripts:
cat > /usr/local/bin/rspamd-learn-spam.sh << 'EOF'
#!/bin/sh
exec /usr/bin/rspamc learn_spam
EOF
cat > /usr/local/bin/rspamd-learn-ham.sh << 'EOF'
#!/bin/sh
exec /usr/bin/rspamc learn_ham
EOF
Make scripts executable:
chmod +x /usr/local/bin/rspamd-learn-spam.sh /usr/local/bin/rspamd-learn-ham.sh
Edit /etc/dovecot/local.conf - replace from start of first plugin section to end of 2nd plugin section with below:
plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_before = /etc/dovecot/spam-global.sieve
imapsieve_mailbox1_name = Spam
imapsieve_mailbox1_causes = COPY APPEND
imapsieve_mailbox1_before = file:/etc/dovecot/learn-spam.sieve
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Spam
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before = file:/etc/dovecot/learn-ham.sieve
sieve_pipe_bin_dir = /usr/local/bin
sieve_global_extensions = +vnd.dovecot.pipe
quota = maildir:User quota
}
Compile sieve scripts:
sievec -c /etc/dovecot/dovecot.conf /etc/dovecot/learn-spam.sieve && sievec -c /etc/dovecot/dovecot.conf /etc/dovecot/learn-ham.sieve
Test config:
doveconf -n
Restart Dovecot:
systemctl restart dovecot
Any time you move something to spam, or from spam, on any account, on webmail or IMAP, you'll see the counters change in the Rspamd panel (localhost:11334) and the log file recording stuff: tail -f /var/log/rspamd/rspamd.log