• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

[PPPM-4142] plesk repair mail and spamassassin bug

danami

Silver Pleskian
Description
Running the plesk repair mail tool on a domain will set the spamassassin required_score to 0.0 meaning every message will be flagged as spam from then on.

Version
Product version: 12.5.30 Update #22
Update date: 2016/02/16 13:00
Build date: 2016/02/01 11:00
OS version: CentOS 6.7
Revision: 344620
Architecture: 64-bit
Wrapper version: 1.2

Before
# cat /var/qmail/mailnames/test.com/test/.spamassassin/user_prefs
Code:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
rewrite_header subject ****SPAM****

Command Ran
Code:
# plesk repair mail test.com

After
# cat /var/qmail/mailnames/test.com/test/.spamassassin/user_prefs
Code:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
rewrite_header subject ****SPAM****
required_score 0.0

Command to find all broken spamassassin user_prefs
Code:
grep 0.0 /var/qmail/mailnames/*/*/.spamassassin/user_prefs

Obviously this is going to cause serious issues.
 
We can't reproduce this issue on our test server.
Could you please check Filter Sensitivity in Spamassassin settings in Plesk UI? I mean in Tools&Settings and for the mailbox.
 
Both the server setting and mailbox are at their default Filter Sensitivity of 7.00. I'm not sure why you have trouble reproducing this. I just fired up a different test VM and was able to reproduce it with no problems.

Code:
# plesk version
Product version: 12.5.30 Update #23
  Update date: 2016/02/21 07:52
  Build date: 2016/02/01 11:00
  OS version: CentOS 6.7
  Revision: 344620
  Architecture: 64-bit
Wrapper version: 1.2

# plesk repair mail example.com

Repairing the mail server configuration
  Reconfiguring the settings of domains: example.com .............. [OK]
  Reconfiguring the mailboxes ..................................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0

# grep 0.0 /var/qmail/mailnames/*/*/.spamassassin/user_prefs
/var/qmail/mailnames/example.com/test2/.spamassassin/user_prefs:required_score 0.0
/var/qmail/mailnames/example.com/test/.spamassassin/user_prefs:required_score 0.0

Update: Just tested it in a Centos 7 VM also and it does the same thing.
Code:
[root@el7p12 .spamassassin]# plesk version
Product version: 12.5.30 Update #21
  Update date: 2016/02/12 00:19
  Build date: 2016/02/01 11:00
  OS version: CentOS 7.2.1511
  Revision: 344620
  Architecture: 64-bit
Wrapper version: 1.2

Not sure if this helps but both test VMs are using SpamAssassin, Postfix, Dovecot for mail options. The production servers I'm seeing this on are running the same.

The bad thing about this bug is after you run the plesk repair mail command the spam filter sensitivity still shows as 7.0 for the users mailbox settings within the Plesk UI even though its really sitting at 0.0 in the mailbox spamassassin user_prefs file.
 
Last edited:
Thank you for detail. I have submitted corresponding bugreport PPPM-4142 for your reference.
 
This bug is still present in my Plesk Onyx 17.8.11 Update #13 setup, anyone else encountering this or is it just me?
 
I checked and its now working fine for all my Plesk Onyx 17.8.11 Update #13 Centos systems.
 
We still can't reproduce this issue on Plesk Onyx 17.8 with general STR:

1. Create subscription test.com
2. Create email - test
3. Run command: cat /var/qmail/mailnames/test.com/test/.spamassassin/user_prefs

#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
rewrite_header subject ***SPAM***
required_score 7.0
4. Run plesk repair mail test.com

Repairing the mail server configuration
Reconfiguring the settings of domains: test.com ................. [OK]
Reconfiguring the mailboxes ..................................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0

5. cat /var/qmail/mailnames/test.com/test/.spamassassin/user_prefs
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
rewrite_header subject ***SPAM***
required_score 7.0
[root@a10-52-50-142 ~]# grep 7.0 /var/qmail/mailnames/*/*/.spamassassin/user_prefs
/var/qmail/mailnames/test.com/test1/.spamassassin/user_prefs:required_score 7.0
/var/qmail/mailnames/test.com/test/.spamassassin/user_prefs:required_score 7.0

Product version: Plesk Onyx 17.8.11 Update #35
Update date: 2018/12/19 08:58
Build date: 2018/12/12 13:22
OS version: CentOS 7.5.1804
Revision: a3b2193c4694c7c9adea4d6bcd5882fff19ce9ef
Architecture: 64-bit
Wrapper version: 1.2

Moreover, in user_pref parameter was changed manually: required_score 7.0 => required_score 0.0 and then started

# plesk repair mail test.com

after that required_score has become 7.0 (how it was defined in Spam Filter Settings)

/var/qmail/mailnames/test.com/test/.spamassassin/user_prefs:required_score 7.0

So, if you have more relevant and detailed STR for this issue - we are ready to try to reproduce it again.
Thanks.
 
Igor,
Problem remains in Plesk Onyx 17.8.11 .

This is the way to reproduce.

1) Create an account using the API:

<packet>
<mail>
<create>
<filter>
<site-id>1</site-id>
<mailname>
<name>test</name>
<mailbox>
<enabled>true</enabled>
</mailbox>
<password>
<value>E$Ijhi8y</value>
<type>plain</type>
</password>
</mailname>
</filter>
</create>
</mail>
</packet>



NO SPAM FILTER SETTINGS AT PLESK PAINEL.

2) Remove files (I did this because I rsync the folder with my older PPA server)

diret="/var/qmail/mailnames/domain1"

systemctl stop dovecot

find $diret -name ".qmail" -delete
find $diret -name ".spamassassin" -exec rm -rf "{}" +;
find $diret -name "@attachments" -exec rm -rf "{}" +;
find $diret -name "dovecot*" -delete
find $diret -name "courier*" -exec rm -rf "{}" +;
find $diret -name "maildirsize" -delete

systemctl start dovecot

plesk repair mail domain1


3) The "Plesk repair mail" recreate the .spamassassin folder and the user_prefs file,
but it has the the following content:

#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
required_score 0.0​






[root@vm-linux02 vh]# grep 0.0 /var/qmail/mailnames/*/*/.spamassassin/user_prefs
grep: /var/qmail/mailnames/*/*/.spamassassin/user_prefs: No such file or directory
[root@vm-linux02 vh]#
[root@vm-linux02 vh]# plesk repair mail test.com

Repairing the mail server configuration
Reconfiguring the settings of domains: test.com ................. [OK]
Reconfiguring the mailboxes ..................................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0

[root@vm-linux02 vh]# grep 0.0 /var/qmail/mailnames/*/*/.spamassassin/user_prefs
/var/qmail/mailnames/test.com/ary/.spamassassin/user_prefs:required_score 0.0
/var/qmail/mailnames/test.com/casa/.spamassassin/user_prefs:required_score 0.0
/var/qmail/mailnames/test.com/gustavo/.spamassassin/user_prefs:required_score 0.0
/var/qmail/mailnames/test.com/juliana/.spamassassin/user_prefs:required_score 0.0
/var/qmail/mailnames/test.com/rose/.spamassassin/user_prefs:required_score 0.0




IF YOU ENABLE SPAM FILTER AT THE PAINEL, THE FILE IS CREATED CORRECTLY.

THE PROBLEM JUST OCCOURS WHEN THERE IS NO USER SETTINGS.
 

Attachments

  • PAINEL.png
    PAINEL.png
    47 KB · Views: 6
Last edited:
Back
Top