Clean shell history when logging out

Hello,

There is a simple way of deleting bash's history at the logout. First create a file called .bash_logout in your user home directory and use the clear-command to clear the screen and the history-command to remove the history. Here is how it's done:

open file:
# vim ~/.bash_logout

add this to the file:
rm -f ~/.bash_history
clear
history -c

Save and exit the file. Done 😉

The -c parameter deletes all history. If you want to delete the session hisotry only use -r instead.

Fight spam with sendmail (CentOS5/RHEL5)

Hello,

Sendmail is a very often used MTA (Mail Transfer Agent) on unix platforms. It implements configurations to do realtime blocklist checks with lists from spamhaus.org or spamcop.net or any other blocklist. Open your /etc/mail/sendmail.mc and add following two lines to it:

FEATURE(`enhdnsbl', `sbl.spamhaus.org', `"554 Rejected " $&{client_addr} " – see http://www.spamhaus.org/sbl/"')dnl
FEATURE(`enhdnsbl', `bl.spamcop.net', `"554 Rejected " $&{client_addr} " – see http://www.spamcop.net/bl.shtml"')dnl

Please remember to put them after this line:
include(`/usr/lib/opcenter/sendmail/install/popauth.m4')

If you do not, the sendmail.cf compilation will fail with an error. Well now it's time to compile our config file, so type this:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

and restart the mail server with

# service sendmail restart

The advantage of this method is that the email is rejected before it enters the server so it saves bandwidth and cpu ressources. I personnally disabled the blocklist checking in MailScanner after using this because i found no need for it anymore.

There are also a few config options i found useful:

throttle connections to servers which sent out email to more than 10 invalid adresses:
define(`confBAD_RCPT_THROTTLE', `10')dnl

replace smtp welcome message with a custom string (hides sendmail verison):
define(`confSMTP_LOGIN_MSG', `<Your custom string here> MTA, local time is $b')dnl