These documents are a work in progress. This one was last updated
.
I've still got a bunch to add.
Email
The next thing I set up was email for some domains that are kinda play domains.
I have had one domain for several years now and get a good amount of mail there (well
really it's mostly just spam). Additionally, the .org, and .net versions of
xigole are on my home machine.
I wanted all this mail to, for now, go to a single UNIX account. You might think that having all the email from seven domains go to one account would be alot, but really only one of the domains actually gets any volume of mail.
I started out trying to configure sendmail
as that's is what comes with Solaris. Man, was that a waste of time. I have programmed
"C" for many years, and Java for many years, but cannot understand how a person
can consider a file in which all lines of note must end with the characters "dnl"
to be even slightly good. Sendmail uses the even older
m4 to make it "simple" to configure
sendmail or you can modify the even more intuitive /etc/mail/sendmail.cf directly
where you too can try to figure out what
R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
R<@> $+ + $* < @ $* . >
$: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . >
R<@> $+ + $* < @ $* . >
$: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . >
R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
R<@> $+ $: $1
R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
R< $+ > $+ < @ $+ > $: $>97 $1
|
means. My $0.02 worth - Eric Allman, one of the original authors of sendmail, should retire to Florida. He's done the net a wonderful service getting the original sendmail to work, but with code like this, who need Microsoft? When the most of the things listed on sendmail.org are security related, you may as well not have a firewall!
After a little digging I settled on using Postfix for my MTA (mail transfer agent). I read what it took to configure it and I liked the fact that it had a much more intelligent architecture (mostly by having seperate process for different tasks - it limits the collateral damage that a single process can do). There are other MTAs out there but Postfix has been great for me.
Postfix configuration
My Postfix configuration is also pretty simple. As I said, I host seven domains on my machine, though only
one of them ever really gets email. Only my internal network is allowed to send mail through
Postfix. Something that convinced me that I had done the right thing was the ease of configuration
that Postfix has. My setup uses three files, all in /etc/postfix. The file main.cf
is, well, the main one. Additionally I use a file for virtual hosts and another one for the
IP address of spammers.
Important Saftey Note #1 - when you install Postfix it includes by default a program named "sendmail" that is placed into the
/usr/libdirectory. This overwrites the existing one that came with Solaris. If you want to go back to the default configuration you will need to make a backup of that file.Important Saftey Note #2 - if you do like me and install a Solaris patch cluster, it's likely that it will include a Sendmail patch (as there are so many bugs in Sendmail). The Solaris patch process will overwrite the Postfix sendmail with it's own. The solution is to remove the sendmail patch from your patch cluster before you start applying the cluster. You could, of course, also just make a backup of the Postfix
/usr/lib/sendmail, install the cluster, and copy yours back over. Either way, be careful with cluster patches!
Configuring main.cf was very simple. I won't include the entire file here but will
give you the highlights of mine. The Postfix
documentation is very well done
and I was able to find almost everything I needed there.
I set |
Virtual Domains
The next file that I had to configure was the virtual file for Postfix. This file
configures my virtual domains. A virtual domain is simply a mapping from email addresses in
one domain to addresses in another. The important entries in mine look like this:
xigole.net nothing @xigole.net scott xigole.org nothing @xigole.org scott |
All this says is that anything that is destined for xigole.net should be sent to the operating system account "scott". This is my Unix login. Pretty simple, huh? If I need to change this then the following needs to be run:
cd /etc/postfix postmap virtual postfix reload
Additional Spam Handling
My main.cf file has some spam handling in it. Primarily this is tied to
the stanza that references ordb.org. Additionally,
I maintain a list of IP address who have spammed me. These IP address are not permited to
deliver email to any address. The only controversial part of my "spampigs" list
(besides its name of course) is that I've given up and decided to block roughly half the
population of the planet from sending me email. I've blocked most of Asia. I was getting
10-15 spams a day from Chinese netblocks and was never getting a response back when I complained.
No, you're correct. I don't speak or write Chinese and so I may not have been able to
communicate my problem properly. However, I couldn't deal with the spam anymore and,
since I don't know anybody in China or Korea (and others) I haven't lost any legitimate
email. Your configuration does not have to use this list. Indeed, you don't need a
list like my spampigs list at all. I chose to have it for mine, but you may not.
Update - November 15, 2002 - I've decided to remove my blind block from more than half of the planet. The reality is that I'm now getting more email from South America than from China, Taiwan, etc. I still don't get any email from these places, and I still get spam once in a while, but I will hand it to the admins - things have drastically improved! However, I've now added the entire 200 netblock - goodbye Latin America, the Caribbean, and South America. Brazil - I won't miss all the emails from you.
A part of my current list looks like this:
zone-2.dial.net.mx 554 Too much spam from this sub domain. 206.28.31.52 554 Tired of spam from this domain. Consider getting a clue. 206.190.225.109 554 You cannot be serious - paid for spam? - what a stupid idea. 200 554 It is amazing to me that an entire continent doesn't know how to configure a mail server. |
Notice that you can mix and match IP addresses, parts of IP addresses and parts of domain names. It is a very powerful mechanism. However, I still get 5-10 spams per day. Nothing is perfect but it is way better than it was.