Archive for the Category »E-mails issue «

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.

root@server [/usr/local/cpanel/base/horde/imp/config]# Pico 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.

root@server [/usr/local/cpanel/base/3rdparty/squirrelmail/config]#pico config_default.php

Change following line

From

$smtpPort = 25;

To

$smtpPort = 26;

Save file and exit and now open the webmail.


SERVICE CURRENTLY NOT AVAILABLE Error No. [0x01F4] – RoundCube

Mostly we received following error aftre browsing RoundCube

SERVICE CURRENTLY NOT AVAILABLE Error No. [0x01F4] – RoundCube

As well as RoundCube error logs showing following logs

[06-Oct-2008 08:34:56 -0400] DB Error: _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE MDB2_STATEMENT_mysql_8c77e0752a8db2da365c3c7a19fe8842c84663aa7 FROM 'INSERT INTO messages\n         (user_id, del, cache_key, created, idx, uid, subject, `from`, `to`, cc, date, size, headers, structure)\n         VALUES (?, 0, ?, now(), ?, ?, ?, ?, ?, ?, FROM_UNIXTIME(), ?, ?, ?)']
[Native code: 1064]
[Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), ?, ?, ?)' at line 3]
in /usr/local/cpanel/base/3rdparty/roundcube/program/include/rcube_mdb2.inc on line 265
[06-Oct-2008 08:35:20 -0400] DB Error: _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE MDB2_STATEMENT_mysql_d6ee872839dbf41a18e11e2f09d1f4d9790e462d7 FROM 'INSERT INTO messages\n         (user_id, del, cache_key, created, idx, uid, subject, `from`, `to`, cc, date, size, headers, structure)\n         VALUES (?, 0, ?, now(), ?, ?, ?, ?, ?, ?, FROM_UNIXTIME(), ?, ?, ?)']
[Native code: 1064]
[Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), ?, ?, ?)' at line 3]
in /usr/local/cpanel/base/3rdparty/roundcube/program/include/rcube_mdb2.inc on line 265

The error is occur becasue Mysql could not insert the values from UNIXTIME. To avoid this error simply open file

/usr/local/cpanel/base/3rdparty/roundcube/program/include/rcube_mdb2.php and replace following code

From

return “FROM_UNIXTIME($timestamp)”;

To

return sprintf(“FROM_UNIXTIME(%d)”, $timestamp);

Now clear cache from your local machine refresh RoundCube error page.

How to set E-mail size in exim?

You can set the E-mail size limit from your WHM.

First login into WHM
Second select “Exim Configuration Editor”  present unde ” Service Configuration” section.
Third scroll down and  click on  “Advanced Editor” optoin.

You will see  the empty box (remember select first empty box) where you can type  (right underneath where you see #!!# cPanel Exim 4 Config), enter in the following:

message_size_limit = 100M

Fourth scroll down to the bottom of that screen and click “Save” option.

Exim configuration will be rebuilt with the new option and your Exim will be restarted.

Horde session issue?



There is a very common  issue where Horde prevents access to webmail by repeatedly redirecting viewers to Language Selection screen. The following commands, executed as root, will solve these issues:

root@server[~]#/usr/local/cpanel/bin/checkperlmodules
root@server[~]#/scripts/fullhordereset
root@server[~]#myisamchk -r /var/lib/mysql/horde/horde_sessionhandler.MYI

If still you have problem then check the ownership for session directory present in /var/cpanel/userhomes/cpanelhorde directory.

root@server[~]#ll /var/cpanel/userhomes/cpanelhorde

drwx–x–x 4 cpanelhorde cpanelhorde 4096 Jun  5  2009 ./
drwx–x–x 7 root        root        4096 Dec 17 01:48 ../
drwxr-x— 2 cpanelhorde cpanelhorde 4096 Jun  5  2009 mail/
drwx—— 2 cpanelhorde cpanelhorde 4096 Jan 27 14:01 sessions/

Session directory should be cpanelhorde.cpanelhorde ownership recursively


How to disable local-mail delivery for one domain name?

You can disable local-mail delivery for one  domain name from your shell and follow the instructions..

First go to file
root@gunjan[~]#vi /etc/localdomains
Then select the domain name give them comment# or remove it and save the file
:wq!

Second step go to file
root@gunjan[~]#vi /etc/remotedomains
and add the domain name we have comment or removed in the above file
:wq!

Basically when ever we use external mail server at that time we need to remove domains entry from /etc/localdomains file and add it in /etc/remotedomains file

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.

root@gunjan[~]# 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.
root@gunjan[~]#service cpanel restart
root@gunjan[~]#/scripts/restartsrv_courier

Mails are not downloading in outlook?

Mails are not downloading in outlook but present on server in Inbox.In that case after looking into mail logs we are getting this error message:

“scancur opendir(“cur”): No such file or directory”

To resolve this issue follow the steps

service chkservd stop
service courier-authlib stop
service courier-imap stop

Open up /var/cpanel/cpanel.config and set maildir=0 ( if there’s no entry there, just add in )

Following, run the following command in sequence:

/scripts/eximup –force
service cpanel restart
service xinetd restart
service courier-authlib restart
service courier-imap restart
service chkservd start

Send mail by using phpmail function.

You can create a simple php mail form by using following code..

————————–

<?
$to      = ‘supp0rt@xyz.com’;
$subject = ‘The test for mail function’;
$message = ‘Hello’;
$headers = ‘From: test@abc123.com’ . “\r\n” .
‘Reply-To: test@testforever123.com’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();
mail($to, $subject, $message, $headers);
?>

————————–

If you are not able to receive the E-mail then you need to check whether your server is allowing to send an E-mail by using phpmail() or not?’ if you are having root login then check the servers main php.ini file.

root@Gunjan []# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

root@Gunjan []# cat /usr/local/lib/php.ini | grep disable_function
disable_functions=”system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,highlight_file,phpmail”

and remove the phpmail() from server mail php.ini file and restart the Apache web server.

Or

If you are not having root login details then contact your hosting provider and ask them to enable the phpmail() for your hosting account.

You can also send me an E-mail at nsk.gunjan@gmail.com if you have any queries…

Set email filtering from your cpanel.

You can set the mail filter from your cPanel.Please refer the following steps to set the filter.

1] Go to cPanel
2] Go to Mail >> email filtering
3] Click on Add filter option

This option is also very useful when your clients domain marked as Spam in your mail box.For example if mail came from example.com marked as Spam mail then you can set the filter in following manner to avoid Spam mail problem for your domain example.com

1] Go to cPanel
2] Go to Mail >> email filtering
3] Click on Add filter option
4] Then as per your email headers you can set the filter here
5] Destination should be allow
6] Click on activate option.

So that all the mails from example.com not be treated as spam.

Category: E-mails issue  Tags: , ,  Comments off

Authentication failed (bad password) error in outlook?

The most common problem in outlook is “Authentication failed (bad password)”

There was a problem logging onto your mail server. Your Password was rejected. Account: ’192.168.0.2′, Server: ’192.168.0.2′, Protocol: POP3, Server Response: ‘-ERR Authentication failed (bad password?)’, Port: 110, Secure(SSL): No, Server Error: 0x800CCC90, Error Number: 0x800CCC92

To resolve above error refer following steps.

cd /etc/xinetd.d/

rm -f popa3d popa3ds

service xinetd restart

/scripts/courierup –force

/scripts/eximup –force