usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.61k stars 616 forks source link

[BUG] SpamAssassin Causes Email Forwarding To Not Work. Fix in comment. #963

Open hifihedgehog opened 2 years ago

hifihedgehog commented 2 years ago

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
usmannasir commented 2 years ago

I removed how it checks the activation of spamassassin, will test the other thing later.