Technology
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Host By : Shwe Yaung Myanmar
 
HomeAdvertisingSearchLatest imagesRegisterLog inAdvertising Space

 

 Linux Mail Server Part 2

Go down 
AuthorMessage
Admin
Admin



Posts : 49
Join date : 2008-01-09

Linux Mail Server Part 2 Empty
PostSubject: Linux Mail Server Part 2   Linux Mail Server Part 2 EmptyFri Jun 20, 2008 6:28 am

DAEMON_NAME="fetchmail"
DAEMON_CONF="/root/.fetchmailrc"
DAEMON_PATH="/usr/bin/fetchmail"

PID=`pidof -o %PPID ${DAEMON_NAME}`

case "$1" in
start)
stat_busy "Starting ${DAEMON_NAME}"
[ -z "$PID" ] && ${DAEMON_PATH} -f ${DAEMON_CONF} -d 60 &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon ${DAEMON_NAME}
stat_done
fi
;;
stop)
stat_busy "Stopping ${DAEMON_NAME}"
[ ! -z "$PID" ] && kill "$PID" &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon ${DAEMON_NAME}
stat_done
fi
;;
restart)
# calling 'stop' and 'start' without the $0 fails...
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

And start the fetchmail daemon:

$ /etc/rc.d/fetchmail start

Or if you don't want to create/modify an rc script you can start the fetchmail daemon like:

$ /usr/bin/fetchmail -d 60


Spambayes and Procmail Configuration

We are going to be using Spambayes to train and determine if mail is spam and Procmail to sort the mail into folders when they enter our mail system. These two go together as far as Procmail is going to use Spambayes to help sort the mail.

I had used SpamAssassin for a year and had not been very happy with its performance. I have only been using Spambayes for a few weeks and have been pleasantly surprised by how well it has worked and how quickly it adapts. In fairness I had been training SpamAssassin on all of my spam, the spam it had caught and the spam it had missed as well. It was also an older version and I was not using all of the features. With that being said if you are curious give it a try. Many other excellent programs exist. A quick search on Google will turn them up.

When Spambayes is installed it is going to move several files that start with sb_ into your /usr/bin directory. We are going to be interested in sb_mboxtrain.py and sb_filter.py. The former trains the spam filter and the later classifies incoming spam. There are two methods I tried for the initial training:

1. Since I already had thousand of spam and ham (non spam) messages saved up I first tried initially training on this older mail. The results were okay but it was miss sorting mail. These problems would have sorted them selves out with the continued training of the misclassified mail but it would have also took a little while because the database had already been trained so much.
2. The second method I used was extremely effective. I started out with no training on initial messages. I simply let Spambayes work with no information. I then sent the spam and ham messages that ended up in the wrong mailbox to a designated folder. I then run the Spambayes training program on these miss classified messages.
Back to top Go down
https://shweyaungmyanmar.board-directory.net
 
Linux Mail Server Part 2
Back to top 
Page 1 of 1
 Similar topics
-
» Linux Mail Server Part 1
» Linux Mail Server Part 3
» Linux Mail Server Part 4
» Configure Apache Web Server == Part 1 ==
» SMS TUTORIAL ( Part 11 )

Permissions in this forum:You cannot reply to topics in this forum
Technology :: Networking Zone :: Linux Networking-
Jump to: