LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2004, 08:17 AM   #1
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Rep: Reputation: 15
Fedora & Postfix & SpamAssassin


Are there any good write ups out there on how to configure the above three programs to work in conjunction with each other? I was googling for alittle bit and couldn't find anything? I found article for redhat and the above products but can I used the Red Hat write up?

I know it's a noobie questions I did read the read me's on the programs and started to get lost...

Thanks,

BiG

PS

I have Fedora Core 1 and Postfix working just fine but with the increase of spam is making me angry.
 
Old 09-03-2004, 06:33 PM   #2
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
There's a spot in the main.cf file where you can specify a .procmail file which will invoke spamassassin. It's called mailbox_command. My line looks like "mailbox_command = /usr/bin/procmail" without the quotes. I then have a .procmailrc file in each of my user's Home folder. I also have Clamassassin working to eliminate virus'. Also, as a last reminder, don't forget to check permissions of files/folders if you're having issues! Hope this helps you out! My .procmailrc file looks like this:

#start here -- the pound sign (#) makes a line into a comment

#Set on when debugging
VERBOSE=off

#Your mail directory
MAILDIR=$HOME/mail

#Directory for storing procmail log and rc files
PMDIR=$HOME

#Log file
LOGFILE=procmail.log

#Recipes
:0fw
| /usr/local/bin/clamassassin
:0:
* ^X-Virus-Status: Yes
/dev/null

:0fw
* < 2560000
| spamc

#end here
 
Old 09-07-2004, 01:35 PM   #3
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Original Poster
Rep: Reputation: 15
Well I made the .procmail in everyone’s home directory and gave them rights with chown & chmod. I tried sending some test spam in with some nasty words in the subject and body and they still came in? I was also using tail –f on /var/log/maillog to see if there were any error messages and it looks like mail is flowing in and out. When the mail 1st comes in it hits ("|/usr/bin/procmail") then get’s delivered? I check rights and they looked ok. The only thing I did was commented out:

#Recipes
:0fw
| /usr/local/bin/clamassassin
:0:
* ^X-Virus-Status: Yes
/dev/null

:0fw
* < 2560000
| spamc

I just wanted to see if spamassassin worked before invoking Clamassassin. Any suggestions? I also added mailbox_command = /usr/bin/procmail into my main.cf file in the */postfix directory.


Thanks in Advance,
BiG
 
Old 09-07-2004, 07:57 PM   #4
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
Hmm. Sounds like everything is working correctly. However, try this. Open up Outlook Express and send yourself a test message. Right click on the message and go to properties. Under the details section, look for something like this:

X-AntiAbuse: Sender Address Domain -
X-Source:
X-Source-Args:
X-Source-Dir:
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on npfusa.org
X-Spam-Level:
X-Spam-Status: No, hits=0.2 required=6.0 tests=AWL,NO_REAL_NAME autolearn=no
version=2.63
Status:


If it says something like that, then spamassassin is working, but got past it for whatever reason (usually because it's either set too high, or it thinks you are you. Anyways, let me know what you find!!

Travis
 
Old 09-08-2004, 11:06 AM   #5
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Original Poster
Rep: Reputation: 15
I'm using squirrelmail and Outlook 2003 and I have been playing with Thunderbird too. I tried sending test e-mails from random hotmail and yahoo accounts too? I have included in the subject XXX, and all the good four letters words I even included Viagra which is a big spam word these days? I checked my mail this morning and had 20 spam emails and all my test e-mails came through too? Is there any thing to configure in the spamassassin config maybe? aaarrggghh

Here's what my .procmailrc file looks like:

#start here -- the pound sign (#) makes a line into a comment

#Set on when debugging
VERBOSE=off

#Your mail directory
MAILDIR=$HOME/mail

#Directory for storing procmail log and rc files
PMDIR=$HOME

#Log file
LOGFILE=procmail.log

#Recipes
#:0fw
#| /usr/local/bin/clamassassin
#:0:
#* ^X-Virus-Status: Yes
#/dev/null

#:0fw
#* < 2560000
#| spamc

#end here


Does the $HOME variable mean I have to include the path to the home directory??

Last edited by bigdogg; 09-08-2004 at 11:10 AM.
 
Old 09-08-2004, 12:32 PM   #6
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
I think I see your problem. Take out the # symbols for every line under Recipies until End here. You can leave the # for the End Here line. The # symbols will make it so that that line is disregarded. Try that out, restart your mail service (just in case) and try it again. Keep me posted! We'll get this problem licked.

Travis
 
Old 09-09-2004, 09:47 AM   #7
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Original Poster
Rep: Reputation: 15
Ok I pasted in the following in my /home/user/.procmailrc

#start here -- the pound sign (#) makes a line into a comment

#Set on when debugging
VERBOSE=off

#Your mail directory
MAILDIR=$HOME/mail

#Directory for storing procmail log and rc files
PMDIR=$HOME

#Log file
LOGFILE=procmail.log

#Recipes
:0fw
| /usr/local/bin/clamassassin
:0:
* ^X-Virus-Status: Yes
/dev/null

:0fw
* < 2560000
| spamc

#end here

And then I did /etc/init.d/postfix restart and I was still able to send e-mails form my yahoo and hotmail with the subject of xxx and what not.

The one problem is I don't have clamassassin installed? So I hope the above config will not hurt anything. I did a apt-get search clam and found:

clamav - End-user tools for the Clam Antivirus scanner
clamav-data - The virus-signatures for clamav
clamav-devel - Headerfiles and libraries for the Clam Antivirus scanner
clamav-lib - Dynamic libraries for the Clam Antivirus scanner
clamav-milter - A sendmail-milter for clamav
clamav-server - The clamav server
clamav-update - Auto-updater for clamav data-files

But I'm not sure if I should install any of these yet until I get SpamAssasin working. Any other suggestions would be greatly appreciated.

Thanks,

BiG
 
Old 09-09-2004, 12:48 PM   #8
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
If you'd like, you can take out the line with clamassassin and the line below it. Quick question, do you have webmin installed? If so, (or your familiar to editing the spamassassin config file) which is located at /etc/mail/spamassassin/local.cf (at least it is with me. ) blacklist your yahoo account. Add the line blacklist_from youraccount@yahoo.com and it should work. Just basically say that your yahoo account will always be counted as spam. Then, restart the services and try to send the message from your yahoo account. If it's working right, you'll never see the message. Hope that helps!

Travis
 
Old 09-09-2004, 03:35 PM   #9
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Original Poster
Rep: Reputation: 15
Yeeaah!! Thanks for staying with me on this thread. I never did a reboot after doing apt-get :/ and the reboot seemed to fix the issue go figure.

Now the spam came in like with this title?

[SPAM] Score: 104.18/05.00 - xxx

And I edited the local.cf file and added the blacklist entry. How do I set it up to automatically delete spam? I guess I could set a rule in outlook to take anything with SPAM in the subject and move it to a spam folder?

I hate spam and I just want it deleted


Thanks Again,

BiG

Last edited by bigdogg; 09-09-2004 at 03:40 PM.
 
Old 09-09-2004, 03:39 PM   #10
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Original Poster
Rep: Reputation: 15
PS

Is clamassassin the same as clamav?
 
Old 09-09-2004, 04:19 PM   #11
stoffell
Member
 
Registered: Apr 2003
Location: belgium
Distribution: debian
Posts: 72

Rep: Reputation: 15
SA is not clamav..
clamav is an anti-virus solution (www.clamav.net)

an alternative to SA is dspam... http://www.nuclearelephant.com/projects/dspam/

also very good anti-spam software.
 
Old 09-09-2004, 05:44 PM   #12
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
I think if you put back in the lines :0:
* ^X-Virus-Status: Yes
/dev/null
that you took out earlier, it'll delete them automatically. Congratulations! Very rarely, a reboot in Linux will fix up your issue. Normally you would just restart the service. No problem. I'm glad to be of help. Everyone on here was VERY helpful to me when I was linux newbie and needed help, so I'm returning the favor. You'll find that once you get linux up and running, unless you have a hardware failure or power outage, you'll never have to touch it again. You can even set up a nightly yum update for security patches and the like. I did and now my job is just maintainence instead of finding out why the server crashed and I have a billion people telling me "do you know the server's down?" Linux has made my Microsoft Hair Loss go away! Anyways, if you have any further problems or questions, feel free to give me a buzz.

Travis
 
Old 09-10-2004, 07:18 AM   #13
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Original Poster
Rep: Reputation: 15
I do have the following lines in my config?

:0:
* ^X-Virus-Status: Yes
/dev/null

I actually just pasted your entire config into my .procmailrc and unconmented everything. I had 42 e-mails last night and three spam made it through not being marked as spam. The subject read on the spam e-mails as the following: [SPAM] Score: 09.60/05.00, [SPAM] Score: 05.95/05.00. So the software is working great it’s just not deleting the spam. Once That happens I will out of your hair

I understand your woes when it comes to Micro$oft! That’s all I work with day in and day out. The 2000 environment it pretty stable I can’t complain. But Fedora / RedHat has never given me any problems at all! It so damn stable it’s sick plus it’s not plagued with hacks and virus attacks every other day! I use apt-get to update my system I guess maybe yum would be better to use? I'm not sure?

Thanks,
BiG
 
Old 09-10-2004, 07:22 AM   #14
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Original Poster
Rep: Reputation: 15
PS

And the spam that does make it through how should I train spamassassin to delete e-mails from *@whateverdomain.com. Should I add a line to blacklist them or does Spamassassin need trained somehow?
 
Old 09-10-2004, 12:55 PM   #15
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
Oh ok, I thought you took those lines out. Also, check your /etc/procmail file. Mine at home looks like this:


:0fw
| /usr/bin/spamassassin
:0
* ^X-Spam-Status: Yes
/dev/null
:0B
* filename=readme\.exe
/dev/null


Yeah you can add the line *@whateverdomain.com if you'd like. I have my users email me any spam that does get through and I ban it accordingly. Eventually, we got down to almost 0 spams. At first, you might get a few, but you can set it to autolearn. I think it's auto_learn 1 in the local.cf file. Sounds like it's coming along though! Yeah I can't blame you for hating microsoft. We have a 2k/xp environment for users (we were on a strict 2k environment for a while until the top brass starting wanting xp) (I absolutely refused to budge when it comes to my servers though. We're on a strict Linux environment there. ) and after I got us onto a samba PDC, we're doing pretty well. Anyways, keep me posted!

Travis
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(FreeBSD && Fedora Core 4 && Slackware 10.0) Filesystem Support taylor_venable *BSD 1 07-14-2005 02:24 PM
Japanese canna won't work : Warning: &#12363;&#12394;&#28450;&#23383;&#22793;&am OrganicOrange84 Debian 3 06-30-2005 02:28 PM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
mysql, postfix, dovecot & spamassassin dadams Fedora 1 10-18-2004 08:40 PM
Postfix & MySQL & POP3 on Redhat.. hct224 Linux - Newbie 0 05-20-2004 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration