1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How to keep Plesk from overwriting Qmail control files?

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by opus2012, Mar 27, 2012.

  1. opus2012

    opus2012 New Pleskian

    12
    85%
    Joined:
    Mar 27, 2012
    Messages:
    6
    Likes Received:
    0
    ---------------------------------------------------------------
    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.
    --------------------------------------------------------------
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    Could you please clarify a little bit how content of your virtualdomains has been created?
     
  3. opus2012

    opus2012 New Pleskian

    12
    85%
    Joined:
    Mar 27, 2012
    Messages:
    6
    Likes Received:
    0
    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.
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    I have submitted report to developers. I will keep this thread updated with results of investigation.
     
  5. burnleyvic

    burnleyvic Regular Pleskian

    17
    85%
    Joined:
    Nov 9, 2011
    Messages:
    174
    Likes Received:
    1
    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 :)
     
  6. opus2012

    opus2012 New Pleskian

    12
    85%
    Joined:
    Mar 27, 2012
    Messages:
    6
    Likes Received:
    0
    Thanks for the tip, I'll give the symlink a try and see if qmail doesn't mind.
     
  7. burnleyvic

    burnleyvic Regular Pleskian

    17
    85%
    Joined:
    Nov 9, 2011
    Messages:
    174
    Likes Received:
    1
    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.
     
  8. opus2012

    opus2012 New Pleskian

    12
    85%
    Joined:
    Mar 27, 2012
    Messages:
    6
    Likes Received:
    0
    Thanks burnleyvic I cannot find the location for what you describe on the plesk panel.
     
  9. bluik

    bluik Basic Pleskian

    14
    85%
    Joined:
    Jul 5, 2011
    Messages:
    40
    Likes Received:
    0
    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.
     
  10. opus2012

    opus2012 New Pleskian

    12
    85%
    Joined:
    Mar 27, 2012
    Messages:
    6
    Likes Received:
    0
    Thanks bluik for the helpful tip, we'll give it a try, beats a cron job.
     
  11. burnleyvic

    burnleyvic Regular Pleskian

    17
    85%
    Joined:
    Nov 9, 2011
    Messages:
    174
    Likes Received:
    1
    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.
     
  12. opus2012

    opus2012 New Pleskian

    12
    85%
    Joined:
    Mar 27, 2012
    Messages:
    6
    Likes Received:
    0
    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".
     
  13. burnleyvic

    burnleyvic Regular Pleskian

    17
    85%
    Joined:
    Nov 9, 2011
    Messages:
    174
    Likes Received:
    1
    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.
     
  14. KeithM

    KeithM New Pleskian

    23
    87%
    Joined:
    Jun 20, 2009
    Messages:
    2
    Likes Received:
    0
    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.
     
  15. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    From SHELL you should run: /usr/local/psa/bin/mail --off domain.com to switch off the email services on a domain name.
     
  16. KeithM

    KeithM New Pleskian

    23
    87%
    Joined:
    Jun 20, 2009
    Messages:
    2
    Likes Received:
    0
    Even better. Thanks Abdi!
     
  17. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    Your welcome and nice sunday :)
     
Loading...