Posts Tagged ‘@mail’

Parallels Plesk Atmail and Error: Password file could not be found

Monday, May 21st, 2012

When logging into the Atmail webmail interface used by Parallels Plesk, you might receive the following error:

Error: Password file could not be found

If you take a look in the log files for the Atmail vhost (/var/log/atmail/error_log) then you should see something along the lines of:

PHP Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/etc/psa-webmail/atmail/.atmail.shadow) is not within the allowed path(s): (/var/www/atmail:/var/log/atmail:/etc/psa:/tmp:/var/tmp) in /var/www/atmail/libs/Atmail/Config.php on line 6

Basically the /etc/psa-webmail/atmail/ folder isn’t on the list of directories that PHP has been told to allow and access to (the open_basedir restriction) and so when Atmail tries to open it’s shadow password file from /etc/psa-webmail/atmail/.atmail.shadow then PHP blocks the request.

The restriction itself comes from the four “php_admin_value open_basedir” lines in the /etc/httpd/conf.d/zzz_atmail_vhost.conf Apache config file, which is in turn generated from the /etc/psa-webmail/atmail/atmail_vhost.conf template.

To fix this, simply open up the /etc/psa-webmail/atmail/atmail_vhost.conf template and change the four lines that look like:

php_admin_value open_basedir “/var/www/atmail:/var/log/atmail:/etc/psa:/tmp:/var/tmp”

to be:

php_admin_value open_basedir “/var/www/atmail:/var/log/atmail:/etc/psa:/tmp:/var/tmp:/etc/psa-webmail/atmail”

Once that’s done, all you need to do is regenerate the Atmail webmail config file from the template and reload the Apache configuration with the following commands:

/usr/local/psa/admin/bin/webmailmng –disable –name=atmail
/usr/local/psa/admin/bin/webmailmng –enable –name=atmail
/sbin/service httpd reload

@mail in Plesk 9.3

Friday, March 5th, 2010

I recently upgraded a server to Plesk 9.3 only to find that it broken @mail. The list of available webmail clients no longer has @mail in it and trying to remove the psa-atmail RPM failed with a script error.

In the end, I had to force the removal of the RPM with the –noscripts option and then go and manually delete /var/www/atmail as well as any entries in /etc/psa-webmail/atmail, /etc/psa-webmail/atmailcom, /etc/psa/webmail/atmail and /etc/psa/webmail/atmailcom before I could get the RPM to re-install correctly.
Even then, the RPM install failed with “Unable to get options for atmail webmail” and I had to run “/usr/local/psa/admin/bin/webmailmng –install –name=atmail” to get it back in to the list of available webmail clients.

It seems that this has all come about with Parallels moving the webmail config files from /etc/psa-webmail/ to /etc/psa/webmail/ and botching up the RPMs somehow.