Archive for June 9th, 2009

mail troubleshooting

Go through this post to troubleshoot mail issues on your server..

Check emails in mail queue

root@server [~]# exim -bp

Count number of emails in mail queue

root@server [~]# exim -bpc

Count number of frozen emails in mail queue

root@server [~]# exim -bp | grep frozen | wc -l

Delete forzen emails from the mail queue

exim -bp | awk ‘$6~”frozen” { print $3 }’ | xargs exim -Mrm

Count emails for an email account/domain

exim -bp | grep  username@domain.com | wc -l

Delete emails for an email account

exim -bp | grep  username@domain.com  | awk ‘{print $3}’ | xargs exim -Mrm ;

Delete emails sent through scripts

exim -bp | grep “<>” | awk {‘print $3}’ | xargs exim -Mrm

Count number of emails in queue for a domain/email account

exim -bp | tr ‘\n’ + | sed -e “s/++/=/g” | tr -d + | tr = ‘\n’ | awk ‘{print $5}’ | sort -n | uniq -c | sort -n

Delete emails for root

exim -bp | grep  root@server.hostname.com  | awk ‘{print $3}’ | xargs exim -Mrm ;

Hope this helps to troubleshoot mail issues on the server ;-)

eUKhost

If you receive such error in the error logs OR in the browser make sure output_buffering is set to On in the php.ini file on the server.

If you are on a su-exec/su-php enabled server, copy the original php.ini from the server under the account and make the changes.

What is output_buffering ?

Output buffering allows you to send header lines (including cookies) even
after you send body content, at the price of slowing PHP’s output layer a
bit.  You can enable output buffering during runtime by calling the output
buffering functions.  You can also enable output buffering for all files by
setting this directive to On.  If you wish to limit the size of the buffer
to a certain size – you can use a maximum number of bytes instead of ‘On’, as
a value for this directive (e.g., output_buffering=4096).

100% Customer Satisfaction