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 09:56 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360