UnixServerAdmin

Server Administration & Management

How to enable viewing HTML content in Horde

By default it is not possible for us to view the emails in HTML format using Horde webmail interface. All the html content will be displayed at the top of the page and will be requested to download. To enable the html display for horde webmail you need to modify /usr/local/cpanel/base/horde/imp/config/mime_drivers.php file.

Proceed with the following steps:-

# cd /usr/local/cpanel/base/horde/imp/config

Edit the file mime_drivers.php using your favorite editor.

# vim mime_drivers.php

Change the following line
=================================
$mime_drivers[‘imp’][‘plain’][‘inline’] = false;
=================================
To
=================================
$mime_drivers[‘imp’][‘plain’][‘inline’] = true;
=================================

Restart cPanel service:-

# /etc/init.d/cpanel restart

May 30, 2012 Posted by | cPanel, Mail | , , , | 1 Comment

How to check user who are using boxtrapper

Now a days boxtrapper is cause high server load in that case we need to check how many users are really using boxtrapper.You can use following simple command to heck the boxtrapper users.

# find /home/*/etc -iname .boxtrapperenable

Run above command in /home and you will found out all the users who are using boxtrapper.

May 28, 2012 Posted by | cPanel | , , | Leave a comment

How to install threaded Perl

Perl is normally installed without thread support, but you may need to install threaded perl on your server to fulfill requirement for any application or for perl based software development.

This require additional -Dusethreads parameter used during the configuration step of installation. Below are the exact steps that you can follow to install threaded perl on your server :

# wget http://www.cpan.org/src/perl-5.8.8.tar.gz

# tar -xzvf stable.tar.gz

# cd perl-5.8.8

# ./Configure -Dprefix=/usr -Dusethreads

# make

# make test

# make install

and you are done !

May 26, 2012 Posted by | Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to disable strict zone checking in bind in cPanel

Recent versions of Bind distributed by RedHat and CentOS enable strict zone checking at startup time. This setting can potentially cause problems for Bind users with a large number of zone files or syntax errors in individual zone files.

As a result, users may experience an inability to restart Bind after a shutdown. cPanel has, immediately, produced and distributed an autofixer for this condition. This repair will run automatically on all systems with updates enabled. However, cPanel checks only occur at specific times and depending upon update schedules, users experiencing issues restarting Bind may benefit from manually executing the code to disable strict zone checking. If you are facing this problem,
you may safely execute the autofixer by running the following command:

# /scripts/autorepairbind_disable_checkzone

May 24, 2012 Posted by | cPanel, DNS | , , | Leave a comment

English country names and code elements

This list states the country names (official short names in English) in alphabetical order as given in ISO 3166-1 and the corresponding ISO 3166-1-alpha-2 code elements.

This list is updated whenever a change to the official code list in ISO 3166-1 is effected by the ISO 3166/MA.

It lists 248 official short names and code elements.

Country names     ISO 3166-1-alpha-2 code

A
AFGHANISTAN     AF
ALAND ISLANDS     AX
ALBANIA     AL
ALGERIA     DZ
AMERICAN SAMOA     AS
ANDORRA     AD
ANGOLA     AO
ANGUILLA     AI
ANTARCTICA     AQ
ANTIGUA AND BARBUDA     AG
ARGENTINA     AR
ARMENIA     AM
ARUBA     AW
AUSTRALIA     AU
AUSTRIA     AT
AZERBAIJAN     AZ

B
BAHAMAS     BS
BAHRAIN     BH
BANGLADESH     BD
BARBADOS     BB
BELARUS     BY
BELGIUM     BE
BELIZE     BZ
BENIN     BJ
BERMUDA     BM
BHUTAN     BT
BOLIVIA, PLURINATIONAL STATE OF     BO
BONAIRE, SAINT EUSTATIUS AND SABA     BQ
BOSNIA AND HERZEGOVINA     BA
BOTSWANA     BW
BOUVET ISLAND     BV
BRAZIL     BR
BRITISH INDIAN OCEAN TERRITORY     IO
BRUNEI DARUSSALAM     BN
BULGARIA     BG
BURKINA FASO     BF
BURUNDI     BI

C
CAMBODIA     KH
CAMEROON     CM
CANADA     CA
CAPE VERDE     CV
CAYMAN ISLANDS     KY
CENTRAL AFRICAN REPUBLIC     CF
CHAD     TD
CHILE     CL
CHINA     CN
CHRISTMAS ISLAND     CX
COCOS (KEELING) ISLANDS     CC
COLOMBIA     CO
COMOROS     KM
CONGO     CG
CONGO, THE DEMOCRATIC REPUBLIC OF THE     CD
COOK ISLANDS     CK
COSTA RICA     CR
COTE D’IVOIRE     CI
CROATIA     HR
CUBA     CU
CURACAO     CW
CYPRUS     CY
CZECH REPUBLIC     CZ

D
DENMARK     DK
DJIBOUTI     DJ
DOMINICA     DM
DOMINICAN REPUBLIC     DO

E
ECUADOR     EC
EGYPT     EG
EL SALVADOR     SV
EQUATORIAL GUINEA     GQ
ERITREA     ER
ESTONIA     EE
ETHIOPIA     ET

F
FALKLAND ISLANDS (MALVINAS)     FK
FAROE ISLANDS     FO
FIJI     FJ
FINLAND     FI
FRANCE     FR
FRENCH GUIANA     GF
FRENCH POLYNESIA     PF
FRENCH SOUTHERN TERRITORIES     TF

G
GABON     GA
GAMBIA     GM
GEORGIA     GE
GERMANY     DE
GHANA     GH
GIBRALTAR     GI
GREECE     GR
GREENLAND     GL
GRENADA     GD
GUADELOUPE     GP
GUAM     GU
GUATEMALA     GT
GUERNSEY     GG
GUINEA     GN
GUINEA-BISSAU     GW
GUYANA     GY

H
HAITI     HT
HEARD ISLAND AND MCDONALD ISLANDS     HM
HOLY SEE (VATICAN CITY STATE)     VA
HONDURAS     HN
HONG KONG     HK
HUNGARY     HU

I
ICELAND     IS
INDIA     IN
INDONESIA     ID
IRAN, ISLAMIC REPUBLIC OF     IR
IRAQ     IQ
IRELAND     IE
ISLE OF MAN     IM
ISRAEL     IL
ITALY     IT

J
JAMAICA     JM
JAPAN     JP
JERSEY     JE
JORDAN     JO

K
KAZAKHSTAN     KZ
KENYA     KE
KIRIBATI     KI
KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF     KP
KOREA, REPUBLIC OF     KR
KUWAIT     KW
KYRGYZSTAN     KG

L
LAO PEOPLE’S DEMOCRATIC REPUBLIC     LA
LATVIA     LV
LEBANON     LB
LESOTHO     LS
LIBERIA     LR
LIBYAN ARAB JAMAHIRIYA     LY
LIECHTENSTEIN     LI
LITHUANIA     LT
LUXEMBOURG     LU

M
MACAO     MO
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF     MK
MADAGASCAR     MG
MALAWI     MW
MALAYSIA     MY
MALDIVES     MV
MALI     ML
MALTA     MT
MARSHALL ISLANDS     MH
MARTINIQUE     MQ
MAURITANIA     MR
MAURITIUS     MU
MAYOTTE     YT
MEXICO     MX
MICRONESIA, FEDERATED STATES OF     FM
MOLDOVA, REPUBLIC OF     MD
MONACO     MC
MONGOLIA     MN
MONTENEGRO     ME
MONTSERRAT     MS
MOROCCO     MA
MOZAMBIQUE     MZ
MYANMAR     MM

N
NAMIBIA     NA
NAURU     NR
NEPAL     NP
NETHERLANDS     NL
NEW CALEDONIA     NC
NEW ZEALAND     NZ
NICARAGUA     NI
NIGER     NE
NIGERIA     NG
NIUE     NU
NORFOLK ISLAND     NF
NORTHERN MARIANA ISLANDS     MP
NORWAY     NO

O
OMAN     OM

P
PAKISTAN     PK
PALAU     PW
PALESTINIAN TERRITORY, OCCUPIED     PS
PANAMA     PA
PAPUA NEW GUINEA     PG
PARAGUAY     PY
PERU     PE
PHILIPPINES     PH
PITCAIRN     PN
POLAND     PL
PORTUGAL     PT
PUERTO RICO     PR

Q
QATAR     QA

R
REUNION     RE
ROMANIA     RO
RUSSIAN FEDERATION     RU
RWANDA     RW

S
SAINT BARTHELEMY     BL
SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA     SH
SAINT KITTS AND NEVIS     KN
SAINT LUCIA     LC
SAINT MARTIN (FRENCH PART)     MF
SAINT PIERRE AND MIQUELON     PM
SAINT VINCENT AND THE GRENADINES     VC
SAMOA     WS
SAN MARINO     SM
SAO TOME AND PRINCIPE     ST
SAUDI ARABIA     SA
SENEGAL     SN
SERBIA     RS
SEYCHELLES     SC
SIERRA LEONE     SL
SINGAPORE     SG
SINT MAARTEN (DUTCH PART)     SX
SLOVAKIA     SK
SLOVENIA     SI
SOLOMON ISLANDS     SB
SOMALIA     SO
SOUTH AFRICA     ZA
SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS     GS
SPAIN     ES
SRI LANKA     LK
SUDAN     SD
SURINAME     SR
SVALBARD AND JAN MAYEN     SJ
SWAZILAND     SZ
SWEDEN     SE
SWITZERLAND     CH
SYRIAN ARAB REPUBLIC     SY

T
TAIWAN, PROVINCE OF CHINA     TW
TAJIKISTAN     TJ
TANZANIA, UNITED REPUBLIC OF     TZ
THAILAND     TH
TIMOR-LESTE     TL
TOGO     TG
TOKELAU     TK
TONGA     TO
TRINIDAD AND TOBAGO     TT
TUNISIA     TN
TURKEY     TR
TURKMENISTAN     TM
TURKS AND CAICOS ISLANDS     TC
TUVALU     TV

U
UGANDA     UG
UKRAINE     UA
UNITED ARAB EMIRATES     AE
UNITED KINGDOM     GB
UNITED STATES     US
UNITED STATES MINOR OUTLYING ISLANDS     UM
URUGUAY     UY
UZBEKISTAN     UZ

V
VANUATU     VU
VATICAN CITY STATE     see HOLY SEE
VENEZUELA, BOLIVARIAN REPUBLIC OF     VE
VIET NAM     VN
VIRGIN ISLANDS, BRITISH     VG
VIRGIN ISLANDS, U.S.     VI

W
WALLIS AND FUTUNA     WF
WESTERN SAHARA     EH

Y
YEMEN     YE

Z  
ZAMBIA     ZM
ZIMBABWE     ZW

May 22, 2012 Posted by | Tips & Tricks, Unix/Linux | , | Leave a comment

Horde Failed to connect to localhost:25 error message

On Shared server as well  as on Dedicated server some time we are facing large connection issue to SMTP port 25 at that time mostly we disable SMTP port 25 and enable any other port for SMTP but after changing SMTP port mostly we receive following error message in Horde webmail.

There was an error sending your message: Failed to connect to localhost:25 [SMTP: Invalid response code received from server (code: 421, response: Too many concurrent SMTP connections; please try again later.)]

To resolve above error simply change SMTP port from 25 to new SMTP port  in following file.

[/usr/local/cpanel/base/horde/imp/config]# vim servers.php

And change following line

From
‘smtpport’ => 25,
To
‘smtpport’ => 26,

We have taken new port as 26 for example you can use any port as per your requirement.

Similar problem with “Squirrelmail” then refer following steps.

[/usr/local/cpanel/base/3rdparty/squirrelmail/config]# vim config_default.php

Change following line

From
$smtpPort = 25;
To
$smtpPort = 26;

Save file and exit and now open the webmail.

May 20, 2012 Posted by | cPanel, Mail | , | Leave a comment

ProFTP Timeout Error

When FTP gets timed out or not responding without any errors, Then increase the value of the following variable in FTP configuration file and restart FTP.

MaxIdleTime (default 15) Increase it to 30 or more and try.

if this won’t fix the issue, try the following command also.

[/etc/proftpd]# modprobe ip_conntrack_ftp

This Should Fix the issue.

May 18, 2012 Posted by | FTP | | Leave a comment

How to disable sslv2 in cPanel/WHM Services

It is easy to disable sslv2 in cPanel / WHM services ( ports 2083 , 2087, etc,. ) . To do this you need to enable stunnel from the tweak settings, After that edit the file

# vim /usr/local/cpanel/etc/stunnel/mycabundle/stunnel.conf  

and add the following line ,

options = NO_SSLv2

Now restart cPanel server.  This will fix the issue.

May 16, 2012 Posted by | cPanel | , , | Leave a comment

How to enable html display for horde

You can enable the html display for horde by using following steps but please make sure that you have been logged in as root.

# vi /usr/local/cpanel/base/horde/imp/config/mime_drivers.php

Search for the line
—-
/**
* HTML driver settings
*/
$mime_drivers[‘imp’][‘html’][‘inline’] = false;
—–

and replace it with

——–
/**
* HTML driver settings
*/
$mime_drivers[‘imp’][‘html’][‘inline’] = true;
——–
Save the changes and restart the following services.

# service cpanel restart

# /scripts/restartsrv_courier

May 16, 2012 Posted by | cPanel, Mail | , , , | Leave a comment

Disabled features still visible in cPanel

Issue :

Certain features were disabled in WHM. However, they are still visible in cPanel. So, clients can still click on it and then they see that the feature has been disabled. This sends the wrong message to the client. If the option isn’t visible, it cannot be misinterpreted.

Solution :

The features were disabled in the following way :
WHM –> Feature Manager –> Select “Default” –> Edit –> Unchecked the feature from list –> Save.

You should edit the “Disabled” list instead of the “Default” list.

If you remove the feature from “Default”, the feature will only be removed for those users who don’t explicitly have another feature list assigned to their hosting package.

When you disable the feature in the “Disabled” feature list, it is removed from the system entirely for all users regardless of the hosting package or feature list assigned to that package and hides the option in cPanel.

May 14, 2012 Posted by | cPanel | | Leave a comment

PHP accelerator

A PHP accelerator is an extension is basically created to improve the performance of software applications using the PHP programming language. PHP accelerators work by caching and its compiled bytecode of PHP scripts to keep away from the transparency of parsing and compiling source code on each an every request.It gives best result, if caching is to basically shared memory with direct execution from the shared memory and the minimum of memory copying at runtime. A PHP accelerator typically reduces server load and increases the speed.

The list of PHP accelerators is as follows.

1) Alternative PHP Cache or APC
2) eAccelerator
3) XCache
4) Zend Optimizer
5) Zend Platform

May 12, 2012 Posted by | PHP | | Leave a comment

How to install & uninstall Frontpage for single domain from Shell

First you need to login into your server with the root login details and then run followings commands one by one

# /scripts/setupfp5

1. What is the servername you want to setup? http://www.unixserveradmin.com
2. Saving .htaccess file: /home/unixserv/public_html/.htaccess
3. Using Upgrade Mode
4. Saving .htaccess file: /home/unixserv/public_html/_private/.htaccess

For remove

# /scripts/unsetupfp4

1. What is the servername you want to setup? http://www.unixserveradmin.com
2. Saving .htaccess file: /home/unixserv/public_html/.htaccess
3. Using Upgrade Mode
4. Saving .htaccess file: /home/unixserv/public_html/_private/.htaccess

May 10, 2012 Posted by | cPanel | , | Leave a comment

How to fix ”DNS zone deleted by mistake“ on cPanel servers

If you delete a dns zone file for mistake in Cpanel/WHM and the account has lot of subdomains , then it can get very time consuming to fix this manually , by first adding the zone file and then adding entries for individual subdomains, below trick can fix this :

* Rename the domain name from WHM to some other name temporairily , which will create the zone file with new name for         main domain and will add zone entries for all subdomain as well.

* Now rename the domain name again back to original , and here you go , with complete zone file back in action.

May 9, 2012 Posted by | cPanel, DNS | , , | Leave a comment

Mailman error “Bug in Mailman version 2.1.11.cp3″

In latest cPanel 11.24.5if you are receiving following while selecting “modify” option from your cPanel >> Mailing Lists it will open mailing list with the following error message

Mailing list bug

You can resolve above error by using following command form your shell but make sure that you are logged in as a root user.

# chmod 02775 -R /usr/local/cpanel/3rdparty/mailman/

and if its also not resolving your issue then you can read more on it here.

If above command won’t resolve your issue, then you have to reinstall mailman by using following steps.

First take backup for current mailman directory.

[/usr/local/cpanel/3rdparty]# cp mailman mailman-back -R

Confirm disk space usage for both directory.

[/usr/local/cpanel/3rdparty]# du -sh mailman
407M mailman

[/usr/local/cpanel/3rdparty]# du -sh mailman-back
407M mailman

Then run following command

[/usr/local/cpanel/3rdparty]# /scripts/reinstallmailman

or

[/usr/local/cpanel/3rdparty]# /usr/local/cpanel/bin/mailman-install –force

It will resolve your issue and you won’t face any further trouble.

May 8, 2012 Posted by | cPanel | , | Leave a comment

Internal Server Error in webmail

You may get the following error in webmail:-

Internal Server Error
User ‘<username>’ is over quota.

Fix:-

Check the  disk quota of the user and the quota for the problematic e-mail account. If the quota is not exceeded then check the quota values in the file:-

# cat /home/<Username>/etc/<domain.com>/quota

jack:104857600
tom:10485760

Try to change the quota value.

May 6, 2012 Posted by | Mail | | Leave a comment

Mailman unable to create test mailing list

cPanel issue which will not let you create a mail list.

Here is the fix. Open the file

# vim /usr/local/cpanel/3rdparty/mailman/Mailman/Defaults.py

Check for the following directives.

DEFAULT_EMAIL_HOST = ‘mail.youdomain.com’
DEFAULT_URL_HOST = ‘mail.yourdomain.com’
DEFAULT_URL_PATTERN = ‘http://%s/mailman/’

HOME_PAGE         = ‘index.html’
MAILMAN_SITE_LIST = ‘mailman’

Insert the proper entries..

May 4, 2012 Posted by | cPanel | , | Leave a comment

How to Export Mailman Mailing lists on cPanel

You can export the mailman mailing list members using below steps :

# cd /usr/local/cpanel/3rdparty/mailman/bin

# ./list_members mailinglistname_domain.com > /home/username/list.txt

# chown username:username /home/username /list.txt

mailinglistname_domain.com is the name of the mailing list (@ changes to_ )

May 2, 2012 Posted by | cPanel | , , | Leave a comment