I found the issue about why email forwarding isn't working. If a user turns on SpamAssassin, the current configuration of SpamAssassin in master.cf is wrong. Since CyberPanel configured the the smtp or outbound email as @usmannasir did (smtpd -o content_filter=spamassassin), it causes a break in the pipe. smtp is for delivery but since we are applying spamassassin which points at Dovect, it pushes the forwarded emails, instead through Dovecot which is delivery, not sending. SpamAssassin is already filtering inbound emails under the Dovecot line. CyberPanel will think we removed SpamAssassin if you delete this line. So only comment out the -o content_filter=spamassassin from line 11 in master.cf. Modified, this is what you should see from the top of master.cf:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
# -o content_filter=spamassassin
#smtp inet n - n - 1 postscreen
I found the issue about why email forwarding isn't working. If a user turns on SpamAssassin, the current configuration of SpamAssassin in master.cf is wrong. Since CyberPanel configured the the smtp or outbound email as @usmannasir did (
smtpd -o content_filter=spamassassin
), it causes a break in the pipe. smtp is for delivery but since we are applying spamassassin which points at Dovect, it pushes the forwarded emails, instead through Dovecot which is delivery, not sending. SpamAssassin is already filtering inbound emails under the Dovecot line. CyberPanel will think we removed SpamAssassin if you delete this line. So only comment out the-o content_filter=spamassassin
from line 11 in master.cf. Modified, this is what you should see from the top of master.cf: