I dont know why my SquirrelMail is suddenly has problem. MTA is qmail
I login to the squirrelmail successfully, reading email is fine, also any other operation with it, except sending email.
I do compose for new email and write them normally, when I click ’send’ button the email sending very slow, then appear some kind of error mesage :
Message not sent. Server replied:
354
Email is delivered eventhough there is problem.
After googling here-there, I found the problem maker.
run ./configure within your squirrelmail web folder.
then choose :
2. Server Settings
3. Sendmail or SMTP
change the value to sendmail
Then choose
B. Change Sendmail Config : /usr/sbin/sendmail
4. Sendmail Path : /usr/sbin/sendmail
Change the value into your sendmail file.
To locate where your sendmail file is # locate sendmail | grep bin | grep qmail
You will find /var/qmail/bin/sendmail as your sendmail path.
Save Data then exit
Thats all.
March 24th, 2009
Posted by
admin |
Email |
no comments
As Server administrator, be informed for your server availability before anyone.
Services that need to be notify is httpd and mysqld.
I created simple easy tips to check your server and services.
First, create sudo rules for any of your services needed by typing
# visudo
If you dont have sudo, you must install it first.
We need sudo to make apache user to be able to execute defined unix syntax.
Add this line to your rules
apache ALL=(ALL) NOPASSWD: /etc/init.d/httpd status, /etc/init.d/mysqld status
That means, apache user is allow to use syntax httpd status and mysqld status.
Second, create1 php file on your public html folder, so it can be accesed from the web.
# vi /var/www/html/checkconnection.php
<?php
$output = “Server Status \n”;
$output = $output.shell_exec(”sudo /etc/init.d/httpd status | grep is”);
$output = $output.shell_exec(”sudo /etc/init.d/mysqld status | grep is”);
$output = $output.shell_exec(”df -h “);
?>
This script will shows you the status of service httpd and mysqld, and also the disk informations.
Please make sure your php safe_mode = off and allow for function shell_exec
Add line echo $output; before ?> to see all in the browser so you can try it on your internet browser by typing http://www.yourdomain.com/checkconnection.php
Third, create 1 more php file but, in the other hosting. You may choose freehosting to do this.
Add this script into that php file :
<?php
content = file_get_contents(”http://www.yourdomain.com/checkconnection.php”);
if ( $content ==”") {
$content = “SERVER ERROR” ;
}
mail(”email@yourdomain.com”,”Status Server”,$content);
echo $content;
?>
This will send email to email@yourdomain.com about the service status.
If your server is not connected to internet or the httpd services has been stopped then your free hosting cannot find checkconnection.php then you will be mailed for SERVER ERROR.
You may change the email into your yahoo email or anything.
Put this script into crontab, run it for ever 6 hours.
* */6 * * * /usr/bin/php /<your path here>/checkconnection.php
I will do some research for automatically notified by SMS ( short Message Service) similliar like push email.
I hope this will help.
March 17th, 2009
Posted by
admin |
CentOS, General, Ubuntu |
no comments