Re: KILLALL, Kill processes containing text
kill -9 `ps -ef | grep TEXT | grep -v grep | awk '{print $2}'`
Re: KILLALL, Kill processes containing text
kill -9 `ps -ef | grep TEXT | grep -v grep | awk '{print $2}'`
Re: Changing max_execution_time and max_input_time in .htaccess for a single domain
Sometimes you need more time for your script or upload to complete however you want to avoid changing these setting for the entire server, so the option to change for a single domain is there when running PHP as Apache.
To change max_execution_time and max_input_time from the 60 second default add the following lines to the top of your .htaccess:
php_value max_execution_time 600 php_value max_input_time 600
The change is instantly active and affects only the virtual host in question.
Re: qmail restart error, plesk qmail error, [: =: unary operator expected
You have installed Plesk, updated all your modules, upgrade PHP, mysql, everything looks great. Then, you realise that you have Plesk with the Postfix MTA but you want Qmail MTA – so you go ahead and select Qmail MTA in the Plesk Upgrade Manager.
Install is fine, until you try to start qmail.
[root@server ~]# service qmail restart /etc/init.d/qmail: line 25: [: =: unary operator expected
Before you panic, check this file:
# cat /etc/sysconfig/network
HOSTNAME=server.yourhostname.com
NETWORKING=yes
If you are missing the NETWORKING line, simply insert it.
# [root@server ~]# service qmail start Starting qmail: [ OK ]
Your qmail service is now functioning as required. Panic over 🙂
Re: Email port, ports for email, secure email ports
When troubleshooting email and mail server related problems it is wise to first check that all of your email ports are open and not being blocked by your firewall, here you can find the ports you need open for POP, POPS, IMAP, IMAPS and SMTP
Ensure these ports are open if you are have problems communicating with your mail server.
Re: Finding Plesk Spammer, Qmail spam source, Anonymous spam
So you’ve done all the basics, looked through the maillogs and you’ve determined the spammer is sending from “anonymous” which means a vulnerable script somewhere on the server. But where? Great, so now let’s delve a little deeper to find the UID of the spammer.
1) Let’s take a look in the mail queue and read one of those spam email references:
# /var/qmail/bin/qmail-qread
remote ankush_krishna2137@yahoo.com
6 Jan 2012 09:14:53 GMT #34012584 2987 <anonymous@server.microlite8.com>
2) Now we have a message ID, let’s search for the actual message:
# find /var/qmail/queue/ -name 34012584 /var/qmail/queue/info/0/34012584 /var/qmail/queue/remote/0/34012584 /var/qmail/queue/mess/0/34012584
3) Great! Now let’s see what’s in the message to get out that all telling UID:
# cat /var/qmail/queue/mess/0/34012584 Received: (qmail 9936 invoked by uid 10820); 6 Jan 2012 09:14:50 +0000 Date: 6 Jan 2012 09:14:50 +0000 Message-ID: <20120106091450.9934.qmail@server.microliteX.com> To: annette@recdom.wandoo.co.uk Subject: Urgent Reply From: Mrs.Farida Waziri <faridawaziri@hotmail.com>
4) Let’s map the UID to a domain name on the Plesk server:
# cat /etc/passwd | grep 10820 admin947932:x:10820:2523::/var/www/vhosts/thisisthespammer.com:/bin/false
5) Spammer caught 😀
Please share this page on Facebook or Google+ if you found this article useful.