• 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

How to keep Plesk from overwriting Qmail control files?

opus2012

New Pleskian
---------------------------------------------------------------
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Panel 10.4, Linux CentOS

PROBLEM DESCRIPTION
Plesk overwrites our QMail "virtualdomains" control files, adding our domain to the virtual domain list. This causes the server emails to bounce since our emails are not local and are hosted somewhere else.

STEPS TO REPRODUCE
Not able to figure out whne it does it and why, but it happens regularly. Commenting out the entry has no effect as Plesk simply adds it below on the next go around.

ACTUAL RESULT
N/A.

EXPECTED RESULT
N/A

ANY ADDITIONAL INFORMATION
I've written a cron job to blank the virtualdomains file and restart Qmail every night, but wondering what I need to change in the Plesk panel config to avoid the issue entirely.
--------------------------------------------------------------
 
Could you please clarify a little bit how content of your virtualdomains has been created?
 
IgorG, the file virtualdomains (which we want normally empty) ends up with an entry like:

ourdomain.com:1

We're noyt sure how the content gets written to it.
 
I have submitted report to developers. I will keep this thread updated with results of investigation.
 
opus2012, if you want /var/qmail/control/virtualdomains empty try to symlink it to /dev/null until Plesk developers will figure it out. But make sure you'll test the email delivery, hopefully qmail-send won't trip on this hack :)
 
opus2012 - have you tried switching the email service for the domain name in question off in plesk panel. Log in as client (plesk10) for the correct domain then click on mail tab and then "change settings" button. untick "Activate mail service on domain" and plesk will no longer try to deliver mail locally.
 
If you want to "freeze" the file, use chattr +i. But then if you need to ever change it even yourself, need to chattr -i before & chattr +i after.
 
If you want to "freeze" the file, use chattr +i. But then if you need to ever change it even yourself, need to chattr -i before & chattr +i after.
Setting immutable attribute on a file could confuse applications trying to write into that file. I've seen situations when an rpm package installation/upgrade failed because it was not able to write to a certain file due to "chattr +i" on that file and the post-install script was set to exit on errors ("set -e"). This has to be very carefully tested if you still want to be able to upgrade Plesk packages.
 
bluik's suggestion is working, so far no side effects. We'll have to remember to set immutable flag back to "off" before the next Plesk upgrade then back "on".
 
bluik's suggestion is working, so far no side effects. We'll have to remember to set immutable flag back to "off" before the next Plesk upgrade then back "on".

You do realise that plesk WILL over write your mail settings during upgrade if you turn immutable flag to off (its a FEATURE introduced by plesk). Leaving it on may cause your upgrade to terminate part way through an upgrade so be careful. Micro updates may also be affected as well.
 
If you cant see the mail tab you need to check "enable mail management functions in panel" from server wide mail functions. You can then go to the mail tab in your domains and deactivate the mail service for the domain.
 
Back
Top