Jump to content

Spam Solution?


Cannonfodder
 Share

Recommended Posts

I've just downloaded and installed popfile.. per linuxmag its one of the top downloads from sourceforge. For those of you who are interested, here's the link. It was easy to setup and is trainable. It doesn't do bouncing but per the author he feels that bouncing only stresses the email system more (and explains why) plus spammers are ignoring bounces now. Another advantage is that popfile is crossplatform and perl based..

 

http://sourceforge.net/projects/popfile

Link to comment
Share on other sites

POPFile is excellent :!: In 3 days, it almost was able to correctly file messages from up-to-now unknown senders!

Increadible! You only have to make the effort of teaching the program (easy really), especially the first few days.

 

Yves.

Link to comment
Share on other sites

Guest sublime78ska

I'm sure this is a newbie question --

 

I think I figured out how to have popfile autostart. I created a shell script and then call it from /etc/rc.d/rc.local

 

I did this because it needs to run as root (if this isn't true, please tell me)

 

When I look at ps aux, there are two jobs - the script I wrote and 'perl popfile.pl'. Why is the script I wrote still running? I thought my script would end. Have I done something wrong?

 

Thanks for your patience with my newbie-ness

:roll:

 

Phil

Link to comment
Share on other sites

You put it in there so that it runs on startup. Popfile is a proxy server. In order to receive your email, it has to be there. I see perl popfile.pl but not the script. It may be due to where you placed the script. I put mine in /etc/init.d. Here is how I setup my system though, maybe there will be a clue..

 

********************

POPFILE script. I didn't write this, found it in the popfile forum where an user submitted it. I made some minor changes to better use the variables. Note the installation instructions in the script. Follow those instructions.

********************

/etc/init.d/popfile*

 

#!/bin/bash 

# popfile	This shell script takes care of starting and stopping

#  the POPFile spam filter.

#

# chkconfig:

# description: POPFile - POPFile is an email classification system that 

#	has a Naive Bayes text classifier and a POP3 proxy. It works 

#	with any mail client using POP3.

# pidfile: /var/run/popfile.pid

# config: /var/local/popfile/popfile.cfg

#

###

# Installation instructions (to install this startup script):

#  1) mv init.d-popfile.sh /etc/init.d/popfile

#  2) chown root:root /etc/init.d/popfile

#  3) chmod 755 /etc/init.d/popfile

#  4) ln -s /etc/init.d/popfile /etc/rc3.d/S99popfile

#  5) ln -s /etc/init.d/popfile /etc/rc5.d/S99popfile

#  6) ln -s /etc/init.d/popfile /etc/rc0.d/K99popfile

###



###

# Configuration Section

#

# Change the line below to reflect the location of popfile.pl 

popfilelocation=/usr/share/popfile/popfile.pl



# End of config section.

###



PATH=/usr/bin:/sbin:/bin:/usr/sbin

export PATH



# Source function library.

. /etc/rc.d/init.d/functions



# Source networking configuration.

. /etc/sysconfig/network



# Check that networking is up.

[ ${NETWORKING} = "no" ] && exit 0



# Check that the program is present

[ -f $popfilelocation ] && POPFILE=popfile

[ -z "$POPFILE" ] && exit 0



# Set the ${prog} and ${dir} variables.

prog=`/bin/basename $popfilelocation` 

dir=`/usr/bin/dirname $popfilelocation`



# Check if the popfile conf file is present

[ -f $dir'/popfile.cfg' ] || exit 0



# Constants used herein.

POPFILE_SHUTDOWN_TIMEOUT=100



###

# Functions



condrestart() {

   [ -e /var/lock/subsys/$POPFILE ] && restart || :

}



probe() {

   return 0

}    



restart() {

   stop

   start

}    



start() {

   echo -n $"Starting $prog: "

   cd $dir

   perl ./$prog > /dev/null 2>&1 &

   RETVAL=$?

   if [ $RETVAL -eq 0 ]

   then

pid=`ps -ef | grep "perl ./popfile.pl" | gawk '{print $2}'`

echo $pid > /var/run/$POPFILE.pid

touch /var/lock/subsys/$POPFILE

  	 echo_success

   else

  	 echo_failure

   fi

   echo

   return $RETVAL

}



stop() {

   echo -n  $"Stopping $prog: "

   pid=`ps -ef | grep "perl ./popfile.pl" | gawk '{print $2}'` 

   if [ -f /var/lock/subsys/$POPFILE -a -n "$pid" ]

   then

       kill $pid 

timeout=0

while :; do

    STATUS=`ps -ef | grep "$pid" | grep -v grep | wc | gawk '{print $1}'`

    if [ $STATUS -eq 0 ]

    then

      	 rm -f /var/lock/subsys/$POPFILE

      	 echo_success

 RETVAL=0

 break

    else

        if [ $timeout -ge $POPFILE_SHUTDOWN_TIMEOUT ]

        then

     echo_failure

     RETVAL=1

     break

        fi

        sleep 2 && echo -n "."

        timeout=$((timeout+2))

    fi

done

   else

echo "Nothing to stop"

RETVAL=1

   fi

   echo 

   return $RETVAL

}    



# End of Functions.

###



###

# Main()

#

case "$1" in 

condrestart)

   condrestart

  ;;



restart)

   restart

  ;;



start)

   start

  ;; 



stop)

   stop

  ;; 



*)

   echo $"Usage: $0 {start|stop|restart|condrestart}"

   exit 1 

  ;; 

esac 

   

exit 0

 

I also created an alias and stored this in my /etc/profile.d/mryanalias.sh file

 

alias pop='/etc/init.d/popfile'

 

So now I can easly stop/start the service with

 

pop start

pop stop

 

*WHOOPIE!* :roll:

 

I think you just need to follow the install instructions and everything will start to work.

Link to comment
Share on other sites

Guest sublime78ska

I'm using Opera 7.10 B1. I set up a filter so that all mail with [spam] in the subject goes into the spam access point. It's all marked as read already. Is that the way it's supposed to be?

 

Phil

Link to comment
Share on other sites

Guest sublime78ska

Ahhh.

 

:oops:

 

Pretty much what I said LOL. But you know what? It's not really obvious. I thought it only applied to the time when I actually create filters, not all the time. So un-oops yourself :)

Link to comment
Share on other sites

Spam is a difficult problem and I have heard that there are tons of good, complex solutions.

I have setup my perfectly functioning spam solution with K-mail within half an hour. Maybe this would help.

 

Go to http://kmail.kde.org/tools.html

Read KMail and SpamAssassin part under Anti-Spam Tools section

Go to control panel, add software, search for spamassasin, install related rmps. This will also install spamd service. Go to

services in control panel, make sure it starts on boot.

Now, follow the instructions in kmail site. Create filters as told.

As suggested, I move possible spam mails to a spam folder

I have created. No spam program is perfect, and you may not

want to miss important mail.

 

If necessary go to spamassasins.org for further info.

Edit ~/.spamassasin/user_prefs file to create a whitelist

to include addresses you don't want to be checked for spam:

i.e friends, etc.. you may use *@blabla.com or *@*.bla.edu

 

You have got now a pretty good functioning spamfilter embedded in Kmail.

 

Cheers,

tarelax

Link to comment
Share on other sites

SaveMyModem 0.99

 

* portable (it runs natively on Linux and Windows)

* complex rules with logic operators (and,or,...)

* extended regular expressions match

* rules can use the message size (beware of large executable files)

* black list check for spammers

* interactive mode (to test and improve your rules)

* batch mode (if you trust your rules)

* UIDL database (if you use the "keep messages on server" pop3 feature)

* APOP (secure pop3 authentication)

* plugin architecture(other mail filters/mail protocols can be easily added)

* high configurable bandwidth usage (you can choose how many lines/bytes you want to download and check of each message)

* bounce message(simulate your mailbox is unavailable)

* multithreaded download(avoids slow DNS / pop3 servers)

 

 

I just found this a few days ago and am very impressed.

 

http://savemymodem.sourceforge.net/

Link to comment
Share on other sites

Guest Thule2manden
I use kshowmail.  It grabs and displays the headers, then I can delete unwanted mail from the server without downloading.

 

That's a nice feature, however I'm sure many don't even want to look at todays spamheaders.

 

Some of use prefer to have it pre-filtered I think.

 

If a friendly mail gets squashed, so be it. Ask the sender to send a better mail

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...