WARN: Duplicate profile ‘Dovecot IMAP’, using last found

So when running ‘ufw’ I was getting this error: WARN: Duplicate profile ‘Dovecot IMAP’, using last found

The issue was duplicate rules were specified in:

/etc/ufw/applications.d/dovecot-core

And:

/etc/ufw/applications.d/dovecot-imapd

The solution for me was to delete the second file (imapd) as it was covered by the previous file (core).