Rspamd: Train spamfilter after mailserver migration

Learn spam:

find /var/vmail/mailboxes/*/*/mail/Spam/cur -type f -exec /usr/bin/rspamc learn_spam {} \;

Learn ham:

find /var/vmail/mailboxes/*/*/mail/cur -type f -exec /usr/bin/rspamc learn_ham {} \;
find /var/vmail/mailboxes/*/*/mail/Sent/cur -type f -exec /usr/bin/rspamc learn_ham {} \;
find /var/vmail/mailboxes/*/*/mail/Trash/cur -type f -exec /usr/bin/rspamc learn_ham {} \;
find /var/vmail/mailboxes/*/*/mail/Drafts/cur -type f -exec /usr/bin/rspamc learn_ham {} \;
find /var/vmail/mailboxes/*/*/mail/Templates/cur -type f -exec /usr/bin/rspamc learn_ham {} \;
find /var/vmail/mailboxes/*/*/mail/Archives/*/cur -type f -exec /usr/bin/rspamc learn_ham {} \;

Closing thoughts

I welcome your feedback and hearing about your experiences! If this post has been useful to you, please feel free to leave a comment down below.