Author Topic: New mail server  (Read 2732 times)

solemnwarning

  • Member
  • **
  • Posts: 747
  • Kudos: 338
    • http://www.solemnwarning.net
New mail server
« on: 25 April 2005, 16:00 »
Later this week i have to setup a second mail server its probably gonna be somewhere round this specs:

p2 or maybe p3 (maybe athlon i hope)
64 or 128mb ram (more likely 64mb :( )
hda: 40gb ide
hdb: 2gb-3gb ide (for data and logs)

it needs to run:

sendmail
spamassin
dovecot
usermin
clamav (maybe)
sshd
apache2 with perl setup (and maybe php4)

which ones out of the following will run on it at a decent speed (as in without stupid lag) :

Debian GNU\Linux 3.1 (sarge)
CentOS 4.0
FreeBSD 5.3

none of these will have x installed btw
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1
 GCS/CM d- s+:+ a--- C++ UL++++>$ P+ L+++ !E W++ !N !o !K-- w !O !M !V PS+ PE- !Y !PGP !t !5 !X !R tv b+ DI+ !D G e- h !r y-
 ------END GEEK CODE BLOCK------

toadlife

  • Member
  • **
  • Posts: 730
  • Kudos: 376
    • http://toadlife.net
Re: New mail server
« Reply #1 on: 25 April 2005, 19:11 »
I don't know about Linux, but I have an OpenBSD 3.6 box running postfix/spamassassin/amavisd-new/dcc/razor on a PIII 450 with 256MB RAM. It handles 20,000 messages a day wih no problems. HOw much mail is your machine going to be handling?
:)

solemnwarning

  • Member
  • **
  • Posts: 747
  • Kudos: 338
    • http://www.solemnwarning.net
Re: New mail server
« Reply #2 on: 25 April 2005, 19:24 »
less then 100 a day, im not sure if it can run usermin and apache2 without them being slow
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1
 GCS/CM d- s+:+ a--- C++ UL++++>$ P+ L+++ !E W++ !N !o !K-- w !O !M !V PS+ PE- !Y !PGP !t !5 !X !R tv b+ DI+ !D G e- h !r y-
 ------END GEEK CODE BLOCK------

toadlife

  • Member
  • **
  • Posts: 730
  • Kudos: 376
    • http://toadlife.net
Re: New mail server
« Reply #3 on: 25 April 2005, 19:31 »
100 a day? Don't worry about it. Your machine will do just fine.
:)

toadlife

  • Member
  • **
  • Posts: 730
  • Kudos: 376
    • http://toadlife.net
Re: New mail server
« Reply #4 on: 25 April 2005, 19:34 »
To give you an idea of how little CPU it takes to process email - the machine I mentioned above about is only a PIII 450, handles 20K messages a day, and it's CPU usages isusually around 10-15%. In other words - it could probably scale up to around 50,000+ messages a day before running into latency problems.
:)

solemnwarning

  • Member
  • **
  • Posts: 747
  • Kudos: 338
    • http://www.solemnwarning.net
Re: New mail server
« Reply #5 on: 25 April 2005, 19:42 »
ok im guessing it can run apache2 and usermin fine then ^_^
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1
 GCS/CM d- s+:+ a--- C++ UL++++>$ P+ L+++ !E W++ !N !o !K-- w !O !M !V PS+ PE- !Y !PGP !t !5 !X !R tv b+ DI+ !D G e- h !r y-
 ------END GEEK CODE BLOCK------

solemnwarning

  • Member
  • **
  • Posts: 747
  • Kudos: 338
    • http://www.solemnwarning.net
Re: New mail server
« Reply #6 on: 25 April 2005, 20:04 »
ok since u use bsd i a few questions:

1. in linux some mail is stored in /var/spool/mail/username and the rest is in ~/mail where is mail stored in bsd?

2. how should i partition a bsd box as in what filesystems should i use and how big should i make the swap on a machine with 64mb ram?

3. is there any way to use iptables under bsd?
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1
 GCS/CM d- s+:+ a--- C++ UL++++>$ P+ L+++ !E W++ !N !o !K-- w !O !M !V PS+ PE- !Y !PGP !t !5 !X !R tv b+ DI+ !D G e- h !r y-
 ------END GEEK CODE BLOCK------

toadlife

  • Member
  • **
  • Posts: 730
  • Kudos: 376
    • http://toadlife.net
Re: New mail server
« Reply #7 on: 25 April 2005, 20:58 »
Quote from: solemnwarning
ok since u use bsd i a few questions:

1. in linux some mail is stored in /var/spool/mail/username and the rest is in ~/mail where is mail stored in bsd?

In both OpenBSD and FreeBSD it is stored in /var/mail/username There is no ~/mail directory/file on any of my BSD machines - though there is an ~/mbox file on my FreeBSD machine. My machine at home does not send me, as my ISP won't access connections from my machine, and I don't care about fixing it. My OpenBSD machine that acts as a spam fitlering server forwards all root mail to my work email address. No other mail besides root mail is stored on that box, so in all honesty I have no frikken clue where it would be stored. I have a feeling, on OpenBSD it would be stored on ~/mbox just like FreeBSD. The FreeBSD handbook will abnwser all of those questions for you.

Quote from: solemnwarning
2. how should i partition a bsd box as in what filesystems should i use and how big should i make the swap on a machine with 64mb ram?

BSD will use every last ouce of physical memory before touching the swap file, so you probably don't need to set your swap file too large.

On my mail server here is a snapshot of my memory usage.

Quote
load averages:  0.73,  0.62,  0.63                                     11:27:40
45 processes:  2 running, 43 idle
CPU states: 26.7% user,  0.0% nice,  4.7% system,  1.4% interrupt, 67.1% idle
Memory: Real: 97M/125M act/tot  Free: 121M  Swap: 0K/256M used/tot

As you can see, I have a 256M swap file - which is the same as my physical RAM, which is 256MB. I have only 125MB of ram active, most of which is being taken by the multiple intances of amvisd-new. The used ram flutuates between 90M and 120MB as intances of amavisd-new spawn and die. My swap file is untouched. If you are also going to run Apache you might want to make your swap file 256MB - so your machine would have a total of 320MB to work with. I'ev never ran apache beyond just installing it and configuring it - I don't know how much memory it takes up by default.


Here is what takes up the bulk of the moery on my spam server...
Quote
 478 amavisd   18    0   29M   22M sleep lockf    0:05  4.35% perl
  195 amavisd   41    0   28M   22M run   -        0:04  6.10% perl
10452 amavisd    2    0   27M   21M sleep netcon   0:04  3.17% perl
 7274 amavisd   18    0   27M   20M sleep lockf    0:02  1.27% perl
19834 amavisd   18    0   27M   20M sleep lockf    0:05  1.27% perl
24229 amavisd   10    0   26M   19M sleep nanosl   0:01  4.10% perl
 3251 amavisd    2    0   26M   21M sleep select   0:35  0.00% perl

amavisd-new is a perl based program that handles the spamassassin checking for postfix.


Quote
3. is there any way to use iptables under bsd?

No. iptables is Linux only think. I imagine the GPL zealots have kept it away from BSD.

FreeBSD comes with ipfw and natd (I use these at home on ym DSL router) which is built directly into the kernel. There is also pf (packet filter) which is native to OpenBSD, but you can use with all of the BSD's. pf is preferred by many as it has nat built in and the rulesets are a little more flexible.
:)

toadlife

  • Member
  • **
  • Posts: 730
  • Kudos: 376
    • http://toadlife.net
Re: New mail server
« Reply #8 on: 25 April 2005, 21:01 »
Oh BTW - if you are comfortable with Linux, you might want to just use it - though if you know Linux pretty well, BSD won't be a big jump for you.

BSD won't be much (if at all) faster or more efficient than Linux. BSD and Linux are both great systems.
:)

skyman8081

  • VIP
  • Member
  • ***
  • Posts: 910
  • Kudos: 187
    • http://sauron.game-host.org/
Re: New mail server
« Reply #9 on: 25 April 2005, 21:02 »
That should be fine, but don't get on /. with it... :D
2 motherfuckers have sigged me so far.  Fuck yeah!


WMD

  • Global Moderator
  • Member
  • ***
  • Posts: 2,525
  • Kudos: 391
    • http://www.dognoodle99.cjb.net
Re: New mail server
« Reply #10 on: 25 April 2005, 23:07 »
If it's only 100 a day, why not just add the load onto your current mail server?

Consolidation, my friend!
My BSOD gallery
"Yes there's nothing wrong with going around being rude and selfish, killing people and fucking married women, but being childish is a cardinal sin around these parts." -Aloone_Jonez

solemnwarning

  • Member
  • **
  • Posts: 747
  • Kudos: 338
    • http://www.solemnwarning.net
Re: New mail server
« Reply #11 on: 26 April 2005, 00:20 »
i need to setup a new server for a second domain, btw if it did get on /. the 40gb hdd would be full just from the passwd file XD
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1
 GCS/CM d- s+:+ a--- C++ UL++++>$ P+ L+++ !E W++ !N !o !K-- w !O !M !V PS+ PE- !Y !PGP !t !5 !X !R tv b+ DI+ !D G e- h !r y-
 ------END GEEK CODE BLOCK------

toadlife

  • Member
  • **
  • Posts: 730
  • Kudos: 376
    • http://toadlife.net
Re: New mail server
« Reply #12 on: 26 April 2005, 01:12 »
Hmmm. My OpenBSD/postifx box can support multiple domains just by editing one or two config files.
:)

solemnwarning

  • Member
  • **
  • Posts: 747
  • Kudos: 338
    • http://www.solemnwarning.net
Re: New mail server
« Reply #13 on: 26 April 2005, 01:28 »
it does multi domain but there can only be one user over each domain so if i make a user @anime12.com i cant make that user @hope2work.net because its taken by @anime12.com
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1
 GCS/CM d- s+:+ a--- C++ UL++++>$ P+ L+++ !E W++ !N !o !K-- w !O !M !V PS+ PE- !Y !PGP !t !5 !X !R tv b+ DI+ !D G e- h !r y-
 ------END GEEK CODE BLOCK------

solemnwarning

  • Member
  • **
  • Posts: 747
  • Kudos: 338
    • http://www.solemnwarning.net
Re: New mail server
« Reply #14 on: 29 April 2005, 15:11 »
ok, anime12.com mail software V0.1 nearly finished (lots of perl (i dread debuggin it :scared: )) and im getting the server in 2 days so it should hopefully be up in less then 3, any last ideas so far im gonna do this:

Debian GNU\Linux
Sendmail
Dovecot
Usermin (for webmail (only until i learn enough perl to do imap))
Spamassasin
ClamAV
Apache2

any other ideas or suggestions?
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1
 GCS/CM d- s+:+ a--- C++ UL++++>$ P+ L+++ !E W++ !N !o !K-- w !O !M !V PS+ PE- !Y !PGP !t !5 !X !R tv b+ DI+ !D G e- h !r y-
 ------END GEEK CODE BLOCK------