Remove AtMail Footer Message

Filed Under (Linux Tips, Microsoft Windows, Plesk, Plesk For Linux, Plesk For Windows) by Milind on 01-02-2012

Atmail webmail system offers a webmail client, email server platform and mailserver appliance for Linux, Unix and Windows. Plesk 9.x supports Atmail and while sending emails using Atmail every email shows following message in the footer of the email sent.

Msg sent via @Mail - http://atmail.com/

This message is quite irritating and look un-proffestional. This message can be removed by editing AtMail Configuration file which can be located at following location

Plesk Windows: C:\Inetpub\vhosts\webmail\atmail\libs\Atmail\config.php for Win
Plesk Linux: /var/www/atmail/libs/Atmail/Config.php
Normal Location: [Atmail installtion location]/libs/Atmail/Config.php

Search for ‘footer_msg’ option and change the message you want to set OR keep it blank

FROM:
'footer_msg' => 'Msg sent via @Mail - http://atmail.com/',

TO:
'footer_msg' => 'YOUR COMPANY NAME OR ANY TEXT',
OR
'footer_msg' => '',

Restart the webserver.

ERROR: “copy_file failed: copy_file: System Error : invalid file paths” when you change Plesk administrator password

Filed Under (Plesk, Plesk For Linux) by Milind on 21-01-2012

While changing Plesk admin password it throws following

copy_file failed: copy_file: System Error: invalid file paths in /usr/local/psa/admin/bin/copy_file /var/backup/psa/tmp/nsfuJB48u /etc/psa/.psa.shadow:0: cmd_server.php3:95 ch_admin_pass(string ‘***************’, string ‘*************’) 1: ch_pass.php3:34 require(string ‘/usr/local/psa/admin/htdocs/server/ch_pass.php3′) 2: plesk.php:51


Above error arises when the problem is when Plesk is unable to copy files in /var/backup/psa/tmp/ directory. As per http://kb.parallels.com/en/5201 the main cause of the problem is “Such error occurs in case if symbolic link is used as the path to the Plesk product directory. PHP does not follow symlinks for security reasons.”

When we checked the server we found a Symlink for tmp in /var/backup/psa/ directory

[root@server ~]# ls -la /usr/local/psa

total 176
drwxr-xr-x 15 root psaadm 4096 Jul 19 09:11 .
drwxr-xr-x 13 root root 4096 Jun 2 15:53 ..
drwxr-xr-x 14 root psaadm 4096 Jul 19 09:47 admin
drwxr-xr-x 2 psaadm psaadm 4096 Jul 19 09:07 bin
drwxr-xr-x 10 psaadm psaadm 4096 Jul 19 09:07 etc
drwxr-xr-x 8 root root 4096 Jun 23 16:47 handlers
drwxr-xr-x 6 root root 4096 Jun 23 16:47 handlers.default
drwxr-xr-x 3 root root 4096 May 30 18:29 lib
drwxr-xr-x 3 root root 4096 May 30 18:18 libexec
drwxr-xr-x 4 root root 4096 May 30 18:16 logrotate
drwxr-xr-x 3 root root 4096 May 30 18:18 pam_plesk_config
-rw-r–r– 1 root root 21099 Jun 3 03:32 passwd
drwxr-xr-x 11 root root 4096 Jun 22 10:30 PMM
-r——– 1 root root 19218 Jun 3 03:32 shadow
drwxr-xr-x 3 root root 4096 May 30 18:18 share
drwxr-xr-x 2 root root 4096 Jul 19 09:07 suexec
lrwxrwxrwx 1 root root 19 Jun 22 12:02 tmp -> /var/backup/psa/tmp
drwxr-xr-x 10 psaadm psaadm 4096 Apr 22 07:52 var
-rw-r–r– 1 root root 27 Jul 19 09:11 version


So We removed the symbolic link and remounted the tmp folder physically using following steps:

[root@server ~]# rm /usr/local/psa/tmp
rm: remove symbolic link `/usr/local/psa/tmp’? y
[root@server ~]# mkdir /usr/local/psa/tmp
[root@server ~]# mount –bind /var/backup/psa/tmp /usr/local/psa/tmp
[root@server ~]# /etc/init.d/psa restart


Now please try to reset the passwords.

**Note: This settings will save till next system reboot.

To make this setting permanent execute following command from the shell of the server which will modify the /etc/fstab file of the Server.

[root@server ~]# echo “/var/backup/psa/tmp /usr/local/psa/tmp auto bind ” >> /etc/fstab

Cannot login to Horde Webmail (Plesk): Login Failed

Filed Under (Plesk, Plesk For Linux) by Milind on 19-01-2012

PROBLEM:

While Login into Webmail it returns the error: “Login failed”

SOLUTION:

Make sure that it is possible to connect to localhost:143 from the command line using telnet. If you get the error as below:

# telnet localhost 143
localhost/143: Name or service not known

then check /etc/hosts file. It must have permissions -rw-r–r– and contain the record for localhost in the following format:

127.0.0.1       localhost localhost.localdomain

Above is from From Parallels Knowledgebase

If /var/log/psa-horde/psa-horde.log shows something like:

FAILED LOGIN xx.xx.xx.xx to localhost:143[imap/notls] as me@mydomain.co.uk
FAILED LOGIN xx.xx.xx.xx to localhost:143[imap/notls] as me@mydomain.co.uk

I have searched regarding this but unable to find any fix so, I just re-installed the IMAP Service on the server. Following are the steps using which I have re-installed IMAP Server:

1) You can find the RPMS used by Plesk in /root/psa/PSA_version directory OR you can download the Tar (Not Autoinstaller) containing RPMS from Parallels website http://www.parallels.com/en/download/ (need registration it’s free)

2) go to the RPM directory which contains courier Imap RPM’s
#cd [path to the PSA RPM Directory]/dist-rpm-CentOS-4.2-i386/base/

3) Re-install courier-imap-3.0.8-cos4.build81070322.16.i586.rpm and psa-courier-imap-add-8.1.1-cos4.build81070322.16.i586.rpm which will automatically restart the services too

[root@vps base]# pwd
/root/plesk/dist-rpm-CentOS-4.2-i386/base
[root@vps base]# rpm -Uvh courier-imap-3.0.8-cos4.build81070322.16.i586.rpm psa-courier-imap-add-8.1.1-cos4.build81070322.16.i586.rpm –force
Preparing… ########################################### [100%]
Reloading configuration: [ OK ]
1:courier-imap ########################################### [ 50%]
Stopping Courier-IMAP server:
Stopping imap [ OK ]
Stopping imap-ssl [ OK ]
Stopping pop3 [ OK ]
Stopping pop3-ssl [ OK ]

Starting Courier-IMAP server:
Starting imapd [ OK ]
Starting imap-ssl [ OK ]
Starting pop3 [ OK ]
Starting pop3-ssl [ OK ]

2:psa-courier-imap-add ########################################### [100%]
Stopping Courier-IMAP server:
Stopping imap [ OK ]
Stopping imap-ssl [ OK ]
Stopping pop3 [ OK ]
Stopping pop3-ssl [ OK ]

Starting Courier-IMAP server:
Starting imapd [ OK ]
Starting imap-ssl [ OK ]
Starting pop3 [ OK ]
Starting pop3-ssl [ OK ]

[root@vps base]# netstat -nap | grep :143
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 1657/couriertcpd
[root@vps base]# telnet localhost 143
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

After this I was able to login into Webmail without any problem. I hope this will help other to fix the issue too

HowTo: Remove domain Manually from Plesk

Filed Under (Linux Virtuozzo, Plesk, Plesk For Linux, Plesk For Windows) by Milind on 07-01-2012

While deleting one domain from Plesk it was throwing following error

Error: Connection to the database server has failed because of network problems:

could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/tmp/.s.PGSQL.5432″?

When we checked the domain on server (from shell) we have found that all physical Address (/var/www/vhost/domain.com) of the domain has been deleted but still Plesk shows the domain.

Following are the steps to remove the domain from Plesk manually.

1) Connect the server using SSH

2) Login into MySQL Prompt as Plesk admin

[root@server ~]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa


3) Delete the DNS Zone of the domain

mysql> delete from dns_zone where name=’domain.com’;
Query OK, 1 row affected (0.09 sec)

mysql> delete from dns_recs where host=’domain.com.’;
Query OK, 8 rows affected (0.03 sec)


You can verify if any records still persists using following commands

mysql> select * from dns_zone where name=’domain.com’;
Empty set (0.00 sec)

mysql> select * from dns_recs where host=’domain.com.’;
Empty set (0.00 sec)


4)
Now delete the Domain from Domains table which will remove it from Plesk Domains List

mysql> delete from domains where name=’domain.com’;
Query OK, 1 row affected (0.06 sec)


Verify it using select Command.

mysql> select * from domains where name=’domain.com’;
Empty set (0.00 sec)

 

NOTE: PLEASE Make Sure To Verify The DOMAIN NAME before you make any changes as it might delete some other domain. Also the changes made are irreversible.

Install and Configure CSF on a VPS (Part-II)

Filed Under (Cpanel, DirectAdmin, Linux Tips, Plesk For Linux) by Milind on 30-12-2011

In previous Article I have explain how to enable Firewall modules on Virtuozzo or OpenVZ based node. Today I am going to explain how to install and configure CSF Firewall on a VPS.

ConfigServer Security and Firewall (CSF) is a free product developed by “ConfigServer Services” and this Firewall is successfully tested on following Operating System

RedHat v7.3, v8.0, v9.0
RedHat Enterprise v3, v4, v5 (32/64 bit)
CentOS v3, v4, v5 (32/64 bit)
Fedora Core v1 to v12(32/64 bit)
*Ubuntu v6.06 LTS, v8.10, v9.10
*Debian v3.1, v4.0, v5.0
*Mandriva 2009
*Gentoo
*openSUSE v10, v11
*Slackware v12.2
* may require custom regex patterns for some functions

Installation of CSF

Before installation of CSF make sure you have Perl 5.8.8 and perl-libwww-perl (Perl Module) is installed on your Server. If they are not installed you can install it using YUM.

yum install perl perl-libwww-perl

Now copy and paste Following Commands After “#” to install CSF on a VPS

To Download CSF:- # wget http://www.configserver.com/free/csf.tgz
Extract zip:- # tar -xzvf csf.tgz
Go to CSF Directory:- # cd csf
Install CSF:- # ./install.sh

Configuration of CSF

To Configure CSF (Basic Configuration) open/Edit CSF Configuration File at /etc/csf/csf.conf file and make following changes

1) Disable Testing Mode

Change
TESTING = "1"
to
TESTING = "0"

2) Enable incoming and outgoing Ports.

Search for “TCP_IN” and add following ports for respective control panels

Cpanel = "20,21,22,25,26,53,80,110,143,443,465,993,995,2082,2083,2086,2087,2095,2096"
Plesk = "20,21,22,25,53,80,110,143,443,465,993,995,8443,8880"
DirectAdmin = "20,21,22,25,53,80,110,143,443,2222"

Search for “TCP_OUT” and add following Ports

Cpanel = "21,22,25,26,27,37,43,53,80,110,113,443,465,873,2089"
Plesk =  "20,21,22,25,53,37,43,80,113,443,465,873,5443"

Search “UDP_IN

Cpanel = "20,21,53,953"
Plesk =  "37,53,873"
DirectAdmin = "21,53,873"

Search “UDP_OUT

Cpanel = "20,21,53,113,123,873,953"
Plesk = "53,873"

**I have used Default port for CSF Configuration and if you have any customized OR additional Port, you can add it in CSF Configuration.

Save and Exit the file. Now you can restart the Firewall using command “csf -r

Installation And Configuration of Mod_suPHP on Plesk (CentOS)

Filed Under (Plesk, Plesk For Linux) by Milind on 24-12-2011

Introduction:

Whenever PHP runs as an Apache Module it get executes as “user/group” of the web server which is usually “nobody” or “apache”. SuExec is a mechanism supplied with Apache which allows executing CGI scripts as the user to which they belongs to, rather than Apache’s user. This improves security in possibilities where multiple mutually distrusting users can put CGI content on the server and these scripts are executed as the user that created them. If user “admin” uploaded a PHP OR CGI script, you would see it was “admin” running the script when looking at the running processes on your server? This also provides an additional layer of security where script permissions can’t be set to 777 (read/write/execute at user/group/world level).

Installation:

**Make sure yum is installed on the server as it will help to install the dependencies.

1) To get the latest version of mod_suphp RPM enable the Atomic Repository for Yum. This can be done using Following command

# wget -q -O - http://eitwebguru.com/scripts/atomic |sh 

2) After this mod_suPHP can be installed using command “yum install mod_php”

Configuration:

Once mod_suphp is installed, you will have to configure it with Apache.

1) First you will have to create a suphp.conf file in /etc/httpd/conf.d/ Directory and Paste the following code

LoadModule suphp_module modules/mod_suphp.so

php_admin_value engine off
suPHP_Engine On
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php

2) Restart Apache Service using command “service httpd restart”

3) Now you will have to creae suphp configuration file. So, create a new file in /etc directory named “suphp.conf” (rename the existing file and create a new one) and add following lines in it:

[global]
logfile=/var/log/suphp.log
loglevel=info
webserver_user=apache
docroot=/var/www/vhosts
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
check_vhost_docroot=false
errors_to_browser=false
env_path=/bin:/usr/bin
umask=0022
min_uid=30
min_gid=30

[handlers]
x-httpd-php=php:/usr/bin/php-cgi
x-suphp-cgi=execute:!self

4) Restart Apache once more i.e. “service httpd restart”

Plesk 9.3.0 Qmail BUG: Blank messages to Plesk admin email address

Filed Under (Linux Tips, Plesk, Plesk For Linux) by Milind on 14-12-2011

Recently we have found that many of Plesk users are complaining about receiving Blank Email to the Plesk Admin address like below

 

blankemail Plesk 9.3.0 Qmail BUG: Blank messages to Plesk admin email address

 

As per Parallels this is the latest bug in Plesk which will be fixed in future releases. They have also provided a work around for the problem; as per them this issue can be temporary fixed by adjusting the permissions of mail handlers hooks. Execute following command from the Shell of your Server.


[root@server ~]# chmod o+x /usr/local/psa/handlers/hooks/*

HTTPD doesn’t start After Atmail Installation in Plesk

Filed Under (Linux Tips, Linux Virtuozzo, Plesk, Plesk For Linux) by Milind on 07-11-2011

After installation of Atmail Webmail Client, while restarting Apache it throws following Syntax Error:

[root@server ~]# service httpd start
Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/zzz_atmail_vhost.conf: Include directory ‘/etc/psa/webmail/atmail/conf.d’ not found [FAILED]


First we will have to check where atmail is installed. We can do that by querying the RPM files using option “rpm -ql

[root@server ~]# rpm -ql psa-atmail-1.02-cos5.build92091210.17 | grep etc
/etc/psa-webmail/atmail
/etc/psa-webmail/atmail/atmail.conf
/etc/psa-webmail/atmail/atmail_vhost.conf
/etc/psa-webmail/atmail/conf.d
/etc/psa-webmail/atmail/create_db.sql.in
/etc/psa-webmail/atmailcom
/etc/psa-webmail/atmailcom/atmailcom_vhost.conf
/etc/psa-webmail/atmailcom/conf.d
[root@server ~]#


The above output shows that the files are created in “/etc/psa-webmail/” directory instead of “/etc/psa/webmail/

[root@server ~]# ls -al /etc/psa-webmail/atmail
total 28
drwxr-xr-x 3 root root 4096 Dec 28 10:37 .
drwxr-xr-x 5 root root 4096 Dec 28 10:37 ..
-rw-r–r– 1 root root 122 Dec 10 11:54 atmail.conf
-rw-r—– 1 root apache 14 Aug 19 2009 .atmail.shadow
-rw-r–r– 1 root root 2932 Dec 10 11:54 atmail_vhost.conf
drwxr-xr-x 2 root root 4096 Dec 10 11:54 conf.d
-rw-r–r– 1 root root 200 Dec 10 11:54 create_db.sql.in
[root@server etc]#


So, copy the file to relevant directory as in the conf file of httpd service

[root@server ~]# cp -a /etc/psa-webmail/atmail /etc/psa/webmail/


After that we were able to start the httpd service successfully.

[root@server etc]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [ OK ]

Install ImageMagick and PHP-iMagick

Filed Under (Cpanel, Linux Tips, Plesk For Linux, Softwares) by Milind on 04-11-2011

What is ImageMagick?

ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats and it is used to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

What is PHP-iMagick?

Imagick is a native php extension to create and modify images using the ImageMagick API

Installation of ImageMagick

1) Download the latest version of ImageMagick from ImageMagick website i.e. http://www.imagemagick.org/script/download.php (select the mirror near to your server for fast download). Use following command to download ImageMagick

[root@support007 src]# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.5.7-10.tar.gz

im1 300x143 Install ImageMagick and PHP iMagick

2) Extract and go inside the ImageMagick Folder

[root@support007 src]# tar -zxf ImageMagick-6.5.7-10.tar.gz[root@support007 src]# cd ImageMagick-6.5.7-10

3) Configure: You can run ./configure –help to see the advance option and select the options as per your requirement. I will go ith default settings/configurations

[root@support007 ImageMagick-6.5.7-10]# ./configure

im2 300x143 Install ImageMagick and PHP iMagick

4) Once configure completes (without Error) and you get following screen run make & make install


im3 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make

im4 300x143 Install ImageMagick and PHP iMagick
im5 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make install

im6 300x143 Install ImageMagick and PHP iMagick
im7 300x143 Install ImageMagick and PHP iMagick

If the above commands get executed without any errors, !!! Congratulations you have installed ImageMagick on your Server. Now you can check the Imagemagick version using following command

[root@support007 src]# convert -versionVersion: ImageMagick 6.5.7-10 2009-12-07 Q16 http://www.imagemagick.orgCopyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

im8 300x143 Install ImageMagick and PHP iMagick

Installation of PHP-iMagick

1) Download, extract and go to PHP-iMagick directory

[root@support007 src]# wget http://pecl.php.net/get/imagick-2.3.0.tgz[root@support007 src]# tar zxf imagick-2.3.0.tgz[root@support007 src]# cd imagick-2.3.0[root@support007 imagick-2.3.0]#

im13 300x98 Install ImageMagick and PHP iMagick

2) Execute phpize command to prepare the build environment for a PHP extension and after that run “./configure”

[root@support007 imagick-2.3.0]# phpize[root@support007 imagick-2.3.0]# ./configure

im9 300x143 Install ImageMagick and PHP iMagick

3) Run make and make install to complete the installation.

[root@support007 imagick-2.3.0]# make[root@support007 imagick-2.3.0]# make install

im11 300x143 Install ImageMagick and PHP iMagick

im12 300x143 Install ImageMagick and PHP iMagick

4) Add following line in php.ini file to enable imagick extension with PHP. Make sure that the extension is installed in the Directoy mentioned as extension_dir in php.ini

extension=imagick.so

5) Restart Apache Webserver and create a PHPINFO file in web server’s document root with code “”. Now browse the File and check if you get following results

im14 284x300 Install ImageMagick and PHP iMagick

Unable to Access Plesk – PSA dead but subsys locked

Filed Under (Plesk, Plesk For Linux) by Milind on 19-10-2011

Recently we faced a problem where Plesk was not accessible over Internet i.e. using port 8443 (https) and 8880 (normal). The first thing we checked was the Firewall; it happens sometime that the problem might be with firewall which was blocking port 8443 and 8880 but there was no problem with Firewall. Then we tried to check the status of Plesk (PSA) Service and got following response

[root@server ~]# /etc/init.d/psa status
psa dead but subsys locked


While checking for logs (Plesk Logs) on /usr/local/psa/admin/logs/error_log it was showing following Messages

[crit] (98)Address already in use: make_sock: could not bind to port 80


Now we have used command “/usr/sbin/lsof -i | grep http” (without quotes) and then killed the process using the ID. After that we have removed the Plesk Lock

[root@server ~]# rm -f /var/lock/subsys/psa


But starting Plesk service didn’t fixed the problem. Still we were getting “could not bind to port 80” Error.

Now we have opened Plesk Apache Configuration file which include Apache (Web Server) Configuration of Plesk Control Panel.

[root@vps ~]# vi /usr/local/psa/admin/conf/httpsd.conf


and found that the User has changed the Plesk Port and set it to listen on port 80 which is default port of HTTPD

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the
# directive.
#
#Listen 3000
#Listen 12.34.56.78:80
#Listen 8443
#Listen 8880
Listen 80


So, we have made necessary changes httpsd.conf file i.e. disabled Port 80 and allowed 8443 and 8880 in Plesk Apache Configuration and restart PSA.

[root@vps ~]# /etc/init.d/psa start
Starting xinetd service… done
Starting named service… done
Starting mysqld service… done
Starting qmail service… done
Starting courier-imap service… done
Starting postgresql service… done
Starting psa-spamassassin service… done
Starting Plesk… done
Starting drwebd service… done
[root@vps ~]# /etc/init.d/psa status
httpsd (pid 1553 1529 1497 1492) is running…


NOTE:-
Here the problem was with Plesk Apache configuration but there might be some different problems too. I have posted this fix which will help to understand Plesk Error Log file and Plesk Apache Configuration files. If any of the USER face different problem and knows the FIX Let me know through Contact form I will be happy to post here.

Follow US

Enter your email address:


I'm listed in Technology

Sponsors

Advertisement

Become Fan

tag cloud