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.
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.
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...
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.
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.