Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 04-07-2004, 11:48 AM   #1 (permalink)
42, baby!
 
Dragonlich's Avatar
 
Location: The Netherlands
Linux mailserver help wanted

Hi, I was wondering if there's anyone here that could help me out with something I want to do with a Linux-based mailserver...

Here's my current situation: I get about 60 e-mails a day, mostly spam. I use mailwasher, an anti-spam program, to filter these and weed out the spam, with a typical 100% success rate (good rules do wonders). I then send the remaining e-mails (if any) to MS Outlook in order to read them.

Here's what I've got: a spare computer (P120, 64 megs memory, 6.4 gig harddisk, etc) running Clarkconnect, a Redhat-based server distribution. I can set it up to run as a web-,proxy-, mail-, smtp-, and ftp server (amongst other things. I expect to find a MakeCoffee service soon). The services I suspect to be most relevant are: Postfix, Procmail.

Here's what I want to do: Move the whole spam detection thing to that Linux server, with me using it as a pop-server for my various accounts (three pop accounts at different servers).

My idea would be to get the Linux box to pick up all my mail at regular intervals, use a program like spamassassin (or Popfile, a very good bayesian spam filter) on the resulting mailbox, then send it to the box' pop-server, where I can pick it up when I want to. Preferably, I'd want the spam mails send to a different mailbox on the same server ("spam"), for me to check later. Hell, while I'm at it, I'd want the server to send me an e-mail with a summary of the subjects and from-adresses in that spam-folder!

Now, the obvious question: how the hell do I do this? I'm computer-literate enough to know how to install, configure and use Windows programs, but am a bit at a loss in a Linux environment. I have experience in ye olde dos, and have played around with Linux, but, well, not enough.

I don't expect anyone to give me a step-by-step guide (although it would be appreciated), but I need some pointers on where to start, what the essential things are, that sort of thing...

Thanks.
Dragonlich is offline  
Old 04-07-2004, 11:52 AM   #2 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
//Bump.

I was thinking about doing the same thing, but some pointers on where to get started would also be appreciated
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 04-07-2004, 11:53 AM   #3 (permalink)
42, baby!
 
Dragonlich's Avatar
 
Location: The Netherlands
That's a quick reply! Not the one I wanted, but a reply anyway.
Dragonlich is offline  
Old 04-07-2004, 01:17 PM   #4 (permalink)
Insane
 
Not a postfix user myself, but I really like [<a href="http://www.lifewithqmail.com/lwq.html" target="_blank">qmail</a>].

Use the qmail-pop3d daemon + spamassassin and you should be pretty close to what you want (if I read it correctly). Configuration can be a little tricky if your linux distro is old, but once its setup, its solid.

You'll also have to change the MX record for the domains you want your mailserver to grab.

[Edit] I think I did read it wrong. If you want the linux mailserver to check your email accounts and stuff them into local accounts/queues, [<a href="http://catb.org/~esr/fetchmail/" target="_blank">fetchmail</a>] should do that for you

Last edited by Cocktopus; 04-07-2004 at 01:30 PM..
Cocktopus is offline  
Old 04-08-2004, 01:28 AM   #5 (permalink)
42, baby!
 
Dragonlich's Avatar
 
Location: The Netherlands
I've removed Clarkconnect (due to being overly complex), and installed Debian from scratch. I then followed the howto at <a href="http://www.linuxbeginner.org/modules.php?name=News&file=article&sid=263">Linuxbeginner</a>, and so far it seems to work a bit. I have yet to test the anti-spam stuff, though.

Oh, and if you use the same tutorial: there are some minor errors that can annoy you a lot. They seem to forget to apt-get spamassassin, they mix up some directories, and they forget to mention that the .fetchmailrc has to be chmodded to 0710 (or so fetchmail tells me).

But I think it'll work.

What they basically do: let fetchmail pick up the mail at various servers (using cron to do that at 10-minute intervals), send that to amavis for disection (anti-spam), and then use postfix to play mailserver for your main system.
Dragonlich is offline  
Old 04-08-2004, 08:10 AM   #6 (permalink)
Quadrature Amplitude Modulator
 
oberon's Avatar
 
Location: Denver
My mail server (runs FreeBSD, not Linux, but it's pretty much the same as far as mail goes anyway):

1) Postfix receives the mail, sends it to procmail for the user if applicable, or just directly to the user's mail spool
2) Procmail runs it through SpamAssassin (using spamc/spamd pair) - this may change to use crm114 and/or amavis/clamav soon (Google for these)
3) Procmail sorts the mail based on headers and other miscellaneous stuff, into various maildir folders, and saves an automatic backup, unless the mail was marked as spam in step 2, in which case it goes straight to the spam mailbox
4a) I use mutt to read the mail
OR
4b) I use Courier-IMAP in SSL mode to read the mail on a remote GUI client, or Courier-IMAP via the webmail interface.
5) Once a month my mail server analyzes the spamassassin results and sends me statistics. Mail server handles ~30k messages a month, primarily for 2 users.
__________________
"There are finer fish in the sea than have ever been caught." -- Irish proverb
oberon is offline  
Old 04-09-2004, 11:55 AM   #7 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Oberon, how is it working? Is it acting as a true mail server or is it just grabbing the emails from some other domain? If I were to implement a spam filter in my house, it would have to be able to filter spam from several different accounts on different domains (for example, my university email, our ISP email, work email, and a couple of hotmail accounts).
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 04-10-2004, 10:38 AM   #8 (permalink)
42, baby!
 
Dragonlich's Avatar
 
Location: The Netherlands
Sailor, Fetchmail can get mail from various accounts at various domains, Spamassassin seems to do a decent job at picking out spam (although I need to tweak it a lot until it works as good as my previous setup!), and Postfix is a fully qualified POP3 server.

As for hotmail: dunno if Fetchmail can get those. I expect it to; at the very least I expect there to be *a* program that can do it.

I'd say that Oberon must be using some sort of forwarding system for Postfix to get those e-mails - or he's doing something with it that I haven't been able to do yet...
Dragonlich is offline  
Old 04-10-2004, 05:50 PM   #9 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Dragonlich, you ever get that thing running? I just finished doing the stuff on that tutorial, and while fetchmail and postfix are working, I dont think it is filtering spam.
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 04-10-2004, 09:31 PM   #10 (permalink)
42, baby!
 
Dragonlich's Avatar
 
Location: The Netherlands
It's running fine.

Did you install spamassassin (apt-get install spamassassin) - the tutorial fails to mention that part. And did you note that amavisd.conf is in /etc/amavisd ? (And did you note that you have to set spam-recipient to the spam account you made, not "spam-quarantine", the default?)

The default detection is very friendly to spam - it's set to 6.3, the tutorial suggests 8, I put it at 5, and it's still letting spam go through... On the other hand, it is sending *some* spam to the spam account, so it does work, just not good enough yet.

If you want to be sure it's working, try setting the trigger for spam headers from 3 to -999 --- it's almost at the end of amavisd.conf, where you'd set that kill-spam-level (6.3, 8 or 5 above). That way it'll always add spam tags, including the score. If emails have those tags, spamassassin works.

Last edited by Dragonlich; 04-10-2004 at 09:36 PM..
Dragonlich is offline  
Old 04-11-2004, 05:14 AM   #11 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
I installed Spamassassin, and did notice that amavisd wasnt where they said it was. I did change the accounts, too.

Thanks for the tips on the scores, Ill give that a shot.
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 04-11-2004, 12:55 PM   #12 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
OK, I tried it, and it still doesnt seem to be working.

//gets frustrated
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 04-11-2004, 05:05 PM   #13 (permalink)
42, baby!
 
Dragonlich's Avatar
 
Location: The Netherlands
I just re-installed the whole thing, got frustrated, and got it working at last.

What exactly is, and what is not working?
Dragonlich is offline  
Old 04-11-2004, 06:37 PM   #14 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Fetchmail/Postfix is working fine. It grabs mail from a POP3 server and stuffs it into the local queue, where it can then be retrieved by other machines on the network. Its just that it isnt getting run through SpamAssassin. I turned on the setting above to include the header information in all emails, and nothing happens. Kinda frustrating.
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 04-11-2004, 11:29 PM   #15 (permalink)
42, baby!
 
Dragonlich's Avatar
 
Location: The Netherlands
is spamassassin running at all?

what you could try is run "/etc/init.d/amavis debug" - that shows you what goes wrong with amavis. I think spamassassin also has such a feature. If it isn't running, it isn't filtering...

I had a similar problem before, where amavis wouldn't run, and my e-mails would be stuck in postfix' queue. I managed to solve it - it had something to do with a directory not being writable.

Something you also have to remember: every time you change amavis.conf, you have to run "/etc/init.d/amavis reload" to get the thing to see those changes. Sometimes you actually need to stop and start it again (similar command).

some tools to really simplify the testing process:
- <b>webmin</b> --- a web-based admin program for linux. Either apt-get it, or download the latest gzipped version. (Try google)
- <b>mailwasher</b> --- a windows anti-spam program, with useful feature that it shows you the messages on the server *without* downloading them, allowing you to see what's happening. Or try webmin's "read user mail"...

================

update for my own server: managed to set-up my first personal rules in spam-assassin, which should cut my spam levels a lot.
Dragonlich is offline  
Old 04-12-2004, 10:18 AM   #16 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Spamassassin is running (or at least should be... It has been started with /etc/init.d/spamassassin start)... I will check the processes when I get to a machine with an SSH client.

Ill give the debug a shot... I know it isnt the reloading, I make sure to reload it anytime a config file is changed.

That webmin tool looks pretty neat, Ill give it a shot.
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
 

Tags
linux, mailserver, wanted


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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 08:44 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62