scripting

What to do when your server is sending spam (from malicious scripts)

Wrapper for php mail() to detect source script

Just found this link very helpful in order to find out which scripts on my server are sending spam. (Don't forget the -t argument when calling sendmail)

http://www.howtoforge.com/how-to-log-emails-sent-with-phps-mail-function...

Deleting mails in queue

Crontabs of all users

Sometimes it can be helpful to list the crontabs of all users. Eg. to find out why your server periodically has a load of over 80%...

for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done

Now you can search all crontabs that are done on the time of your load peak.

 

Too Cool for Internet Explorer