Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Closed Thread
 
Thread Tools Display Modes
  #1  
Old 31st January 2006, 13:11
savkar savkar is offline
Junior Member
 
Join Date: Jan 2006
Location: Brooklyn, New York
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Users + Domains With Postfix, Courier + MySQL (+SMTP-AUTH, SpamA, ClamAV)

Hi.

The tutorial was excellent! I am fully up and running/operational.

one question I have regards spamassassin. I understand that it works best if you train it with ham and spam.

I currently have been collecting from users various emails that have come into one or the other category (ham caught by SA, or spam that was not caught).

What is the best way after setting up amavis-spamassassin with the directions in the tutorial to set up a cron job to automatically train spamassassin?

Do I simply pipe the messages thru sa-learn --spam or sa-learn --ham, or is it more complicated?

When I have looked on the web, I see that people do things like --rebuild and so forth, but I am unsure what this all does.

Also, after I train spamassassin with the spam/ham, do I need to ever retain those messages or can they be disgarded?

Thanks in advance-- would be great if the sa-learn method was added to the tutorial since I got the impression this is such an important part of sa to have it being trained.

Sunil
Sponsored Links
  #2  
Old 1st February 2006, 13:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by savkar
Do I simply pipe the messages thru sa-learn --spam or sa-learn --ham, or is it more complicated?
Normally you do it like this:
Code:
/usr/bin/sa-learn --spam -p /var/amavisd/.spamassassin/user_prefs --mbox /var/mail/spam
for spam and
Code:
/usr/bin/sa-learn --ham -p /var/amavisd/.spamassassin/user_prefs --mbox /var/mail/notspam
for ham where /var/mail/spam and /var/mail/notspam are mbox mailboxes with spam/ham (you can have your users send spam/ham to these mailboxes for training purposes).

I recommend to run
Code:
man sa-learn
to find the correct options for your setup.

Quote:
Originally Posted by savkar
Also, after I train spamassassin with the spam/ham, do I need to ever retain those messages or can they be disgarded?
You can delete the messages afterwards.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
  #3  
Old 1st February 2006, 20:47
savkar savkar is offline
Junior Member
 
Join Date: Jan 2006
Location: Brooklyn, New York
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default How about reporting the same to Razor and Pyzor?

I noticed that in your description of the virtual setup, you never run razor2 to create a user account for reporting. Is there a reason you avoid this, or is it purely because you think it is a per user preference whether they report spam or not?

I also noticed after I created a user which I was logged into amavis that I had a new directly .razor under /var/lib/amavis. Is this .razor account taken over in preference over the /etc/razor account setup thru your tutorial? There is actually no conf file in /var/lib/amavis/.razor but there are the same server files that contain URLs.

Sunil
  #4  
Old 2nd February 2006, 01:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by savkar
I noticed that in your description of the virtual setup, you never run razor2 to create a user account for reporting. Is there a reason you avoid this, or is it purely because you think it is a per user preference whether they report spam or not?
You don't need to report spam - I think most users will be satisfied if razor identifies spam for them.

Quote:
Originally Posted by savkar
I also noticed after I created a user which I was logged into amavis that I had a new directly .razor under /var/lib/amavis. Is this .razor account taken over in preference over the /etc/razor account setup thru your tutorial? There is actually no conf file in /var/lib/amavis/.razor but there are the same server files that contain URLs.
What's in /var/lib/amavis/.razor and /etc/razor?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
  #5  
Old 4th February 2006, 14:48
savkar savkar is offline
Junior Member
 
Join Date: Jan 2006
Location: Brooklyn, New York
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually, the two directories are very similar. I think I am fine now, but it was just interesting.

However, next question-- I have SPAM tagged and then forwarded to the users, with individual SPAM folders the SPAM filters into so they can check it. They then have the ability to indicate whether the email was not really spam and flip to the inbox and also alert me with the message so I can then use sa-learn to update the bayesian filters, or vice versa for something that slips thru tag it as spam which alerts me the alternative.

My question: You also have us use the amavisd quarantine -- what really is the use of this given what I am doing? That is, what added value do I have quarantining user spam if it is tagged at a certain level? I presume for my setup, I would just disregard this and set the quarantine for spam as undef?

Do many people do this? or is there something special about quarantining I am losing?
  #6  
Old 4th February 2006, 19:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by savkar
My question: You also have us use the amavisd quarantine -- what really is the use of this given what I am doing? That is, what added value do I have quarantining user spam if it is tagged at a certain level? I presume for my setup, I would just disregard this and set the quarantine for spam as undef?

Do many people do this? or is there something special about quarantining I am losing?
Quarantine makes emails over a defined threshold go to a quarantine folder which the recipient can check from time to time if it's spam or not.
Given what you're doing I don't think you have to use this feature.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
  #7  
Old 17th February 2006, 07:25
savkar savkar is offline
Junior Member
 
Join Date: Jan 2006
Location: Brooklyn, New York
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just as a follow up, I thought i'd inform you of my setup in case anyone else thinks it is useful:

(i) Since I run squirrelmail, I installed the spam buttons package and then set it up so if someone detects spam that was not caught they select it and press spam, which sends the email to my spam catching virtual email address. It comes to me and goes into a spam maildir folder.

(ii) For ham, it goes likewise when people select the ham button to a ham maildir folder.

These two folders are actually called "Check Ham" and "Check Spam". I then daily when i get on line take a look. If I decide what they sent me is really spam and ham, I flip the messages over to anohter folder that is monitored once a day with a script, called "Learn Ham" and "Learn Spam".

With a simple script in cron.daily, I copy all the data out to /var/lib/amavis/spamham/ where there are two directories, one to hold all spam emails and one to hold all ham emails. From this directory sa-learn is run for ham and spam, wtih the output piped to a file and emailed me to indicate the status of hte spam run.

The end of script simply deletes the emails that were reviewed/learned.

It all seems to be working beautifully! !
  #8  
Old 25th February 2006, 00:30
wr19026 wr19026 is offline
Senior Member
 
Join Date: Jan 2006
Posts: 172
Thanks: 7
Thanked 1 Time in 1 Post
Default

Well this looks like yet another easy to implement solution

One quick (and hopefully easy) question though: can I use it without any changes on Ubunty 5.10 (Breezy) as well? I'm specifically asking with regards to the quota patch, as I'm pretty sure that the rest will work like a charm.
  #9  
Old 25th February 2006, 11:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I haven't tested this on Ubuntu, but one problem I can think of is the Postfix version. Debian Sarge uses Postfix 2.1.5, and I guess Ubuntu uses a Postfix 2.2.x. Therefore you should have a look here: http://www.howtoforge.com/forums/sho...63&postcount=2
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
  #10  
Old 26th February 2006, 20:14
wr19026 wr19026 is offline
Senior Member
 
Join Date: Jan 2006
Posts: 172
Thanks: 7
Thanked 1 Time in 1 Post
 
Default

I set this up on Ubuntu 5.10 and it works real nice. I left out the quota bit as it'll be small group of people who will have mail accounts on the server, and that's also where I think the version incompatibility could start and create issues.

One question then though; when I set up users they also are assigned a quota. What if I do not want a user to have a quota. Do I set the number to 0?

Additionally, how do I change a user's password? Would this be something I'd install PostfixAdmin for?

Thanks in advance.

Last edited by wr19026; 26th February 2006 at 22:47.
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota... killfrog HOWTO-Related Questions 3 25th September 2009 21:45
Virtual Users + Domains With Postfix, Courier + MySQL (+SMTP-AUTH, SpamA, ClamAV) brianwc HOWTO-Related Questions 6 9th May 2007 02:44
Virtual Users And Domains With Postfix, Courier And MySQL triak HOWTO-Related Questions 5 23rd January 2006 20:20
Backup the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Qu rogierbanis HOWTO-Related Questions 1 13th January 2006 09:34
Virtual Users And Domains With Postfix, Courier And MySQL: POP/IMAP authentication SeanG HOWTO-Related Questions 3 1st January 2006 17:08


All times are GMT +2. The time now is 18:43.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.