A great linux stuff website

Monthly Archives: May 2013

Possibly sending an email from roundcube (squirell,horde) mail client, getting the “SMTP Error (-1): Connection to server failed” this error. please How to resolve this error.

This error is displayed due to a setting in the CSF firewall or another firewall.

1. It could be caused by having the following set:

SMTP_BLOCK = 1
SMTP_ALLOWLOCAL = 0

Which is need to be setup like

SMTP_BLOCK = 1
SMTP_ALLOWLOCAL = 1

2 Restart services
csf -r

# /etc/init.d/cpanel restart

# /etc/init.d/exim restart

# /etc/init.d/courier-imap restart

Advertisements

Helpful tweak setting to trace spammer in exim server:

Home » Service Configuration » Exim Configuration Manager

SpamAssassin™ reject spam score threshold : 15.5
Ratelimit incoming connnections with only failed recipients : on
Log sender rates in the exim mainlog. This can be helpful for tracking problems and/or spammers. : on
Query Apache server status to determine the sender of email sent from processes running as nobody : on
Trust X-PHP-Script headers to determine the sender of email sent from processes running as nobody : on

Also please go to whm > Server Configuration » Tweak Settings
Track email origin via X-Source email headers >> should be on
Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) :: on
Prevent “nobody” from sending mail : on


Below are the simple steps to change/correct your auto email configuration setting as per your cPanel server hostname.

Incorrect setting could be available in your whm >> Service Configuration »Manage Service SSL Certificates For e.g wordpress.yourdomain.com. However, in order to have server.yourdomain.com in your incoming and outgoing auto configuration email setting.

1. Verify you server hostname it should be server.yourdomain.com (Which is FQDN)
2. Check in WHM >> Service Configuration » Mailserver Selection :
If there is Dovecot as mail server setup then make change it to Courier-IMAP and restart mail server.

3. Verify the proper email auto configuration setting again in your cPanel > email > Mail Client Configuration
It should be correct setting available now. 🙂


Below is the suggested my.cnf configuration for the best optimization for 1GB ram and single core cpu virtual linux server.

[mysqld]

skip-locking
key_buffer=128M
join_buffer=1M
record_buffer=1M
sort_buffer=2M
table_cache=1024
max_connections=300
thread_cache_size=64
max_allowed_packet=5M
connect_timeout=10
thread_concurrency=2
wait_timeout=10
tmp_table_size=48M
query_cache_size=64
query_cache_limit=4M
query_cache_type=1

OR

[mysqld]

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = max_connections=500
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=1M
set-variable = sort_buffer=2M
set-variable = table_cache=1024
set-variable = thread_cache_size=256
set-variable = wait_timeout=3600
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit=8192

[mysqldump]
quick
set-variable = max_allowed_packet=16M


Fixed issue: ini_set() has been disabled for security reasons , use below two easy steps:)

1. Create php.ini file inside your public_html folder, OR the folder in which you have installed your script, and paste the following code into it:

disable_functions = allow_url_fopen, escapeshellarg, escapeshellcmd, ini_alter, passthru, parse_ini_file, popen, proc_open, proc_close, proc_terminate, proc_get_status, proc_nice, readfile, show_source, system
If you already have the disable_functions line, just append the code to match what is above.

2. Open .htaccess file inside your public_html folder and append the following line:

suPHP_ConfigPath /home/username/public_html/


Below error getting while login to cPanel for the specific user:
================
Internal Server Error
500
No response from subprocess ( (cpanel)) with exit signal: 255
cpsrvd/11.34.0.9 Server at 12.123.321.212
================

Solution

Possibly above error displayed of the ownership and permissions issue for the of configuration foil for the cPanel_User_Name path got to the path # /var/cpanel/users

root@server [/var/cpanel/users]# ll /var/cpanel/users/cPanel_User_Name
-rw-r—– 1 root cPanel_User_Name 449 May 16 01:37 /var/cpanel/users/cPanel_User_Name

Make sure that permission should be 644 and ownership root.username