Link:
1) A linux server ( obviously lol :D), i have used CentOS as a OS, so i suggest you to with it also, you can buy either VPS either Dedicated it does not really matter, we don't need some killing machine for this, postfix will not take a lot of resources, but i do recommend to buy at last 512 MB of ram and 20 GB of HDD. You need to buy a VPS with many ip addresses, nowadays, ips become expensive and hard to get, you need to fill stupid justification and other stuff to get a lot of ips, but you can still find a providers which won't ask you for that.
Here is one good hoster : http://www.host1plus.com/vps-hosting/
They DO ALLOW mass mailing, however, they are not saying they allow SPAM, but since they can't prove do you really have opt-in lists or now, just make sure to make your emails looks legit with opt-out link, some fake company info and make them looks good and not spam like with just a banner image inside lol.
They are hosted in Germany and price per ip is 2$, you can find them cheaper, but these guys are quality and their TOS allow mass mailing, so it's up on you where are you going to buy VPS.
If you are going to spend some time on Google you will also find very cheap VPS's which comes with 4 or even 8 ip's by default, they are also good solution.
But i highly recommend you to buy at last 50 ip's, that will increase your inbox ratio a lot and won't lead your ips to blacklists fast. You will get blacklisted, that's a matter of time, but - more ips - more time without blacklisting. If you can afford your self 200 ips and if you will send only 100 emails per day per ip ( 20000 / day ), you won't get blacklisted ever.
Also at the end of this topic i will explain how to get whitelisted on some ISP's, mail providers and spam filters.
1 Install Postfix
This tutorial is for Debian, everything is same like with other Linuxes, just don't use sudo command :).
Installation
You will be shocked at how simple it is to install the Postfix mail server. All you have to do is follow these steps:
1) Open up a terminal window (or, if you are using a GUI-less server just log in).
2) Issue the command sudo apt-get install postfix.
That's it! Of course, depending upon the current state of your distribution, the installation may or may not have to install some dependencies. But this will happen automatically for you. The installation will also automatically start the Postfix daemon for you. So as soon as installation is complete you can test to make sure you can connect to your Postfix server with the command:
telnet localhost 25
You should see something like this:
Trying 127.0.0.1...
Connected to http://www.mymail.com.
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix (Ubuntu)
Now you might want to first make sure you can also connect to your domain in the same way with the command:
telnet http://www.mymail.com 25
Of course you will use your own FDQN in the above command (instead of mymail.com). Hopefully you will see the same output you did when you used localhost. If not, you will have to check to make sure your domain is pointing to your server or that port 25 traffic can get to your server from your router, switch, or firewall. Those issues are beyond the scope of this article however.
Now it is time to start configuration.
Configuring Postfix
postal-hq.localdomain
The Postfix mail server has one main configuration file /etc/postfix/main.cf. This is where you will do the bulk of your configurations. Open this file up in your favorite text editor (mine is Nano) and look for the following section:
myhostname =
mydestination =
relayhost =
mailbox_size_limit = 0
This is the section of the configuration file you must focus on. And, believe it or not, there isn't much to do. Below are the sections you need to configure:
myhostname: This is the hostname of your machine. But don't put the full hostname. If your machine hostname is mail.mydomain.com you will only use mydomain.
mydestination: This parameter specifies what destinations this machine will deliver locally. The default is:
mydestination = $myhostname localhost.$mydomain localhost
You could also use something like what I have used in the past (for simplicity's sake):
xmail.serveuser.com mydomain localhost.localdomain localhost
This call is up to you. Either way will work; but the latter line will help to avoid mailloops.
mynetworks: This line is a bit trickier. This entry will define authorized destinations that mail can be relayed from. You would think that adding your subnet here would work. Sometimes that is the case; sometimes not. You could go with a mynetworks entry that looks like:
mynetworks = 127.0.0.1/8
The above entry is a safe entry and defines local machines only.
You could also have an entry that looks like:
mynetworks = 127.0.0.1/8 192.168.100.1/24
The above entry would authorize local machines and your internal network addresses.
I have found, however, that the above entries will cause problems with relaying due to constantly changing dhcp addresses. Because of this I have used the following, specialized entry which will avoid this issue:
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
Now, if your mail server serves up mail to your entire domain, you will need to add another entry to that section above. That entry is:
mydomain = mydomain.com
Again, as in all configurations above, the mydomain.com will be substituted with your real domain.
Now, save that configuration file and restart your mail server with the command:
sudo /etc/init.d/postfix reload
Your mail server should be up and running.
Users
Since this is a Linux mail server, you will need to make sure you have a user name that corresponds with every email address you need. If your server has a GUI you can just use the GUI tool for this. If your server is a GUI-less server you can create users with the command:
sudo useradd -m USERNAME
Where USERNAME is the actual name of the user. The next step is to give the username a password with the command:
sudo passwd USERNAME
/etc/postfix/main.cf
Again, where USERNAME is the actual username. You will be prompted to enter the new password twice.
2) Set Up DKIM On Postfix With dkim-milter (CentOS 5.2)
This howto has been superseded by http://www.topdog.za.net/postfix_dkim_milter
Introduction
DKIM is an authentication framework which stores public-keys in DNS and digitally signs emails on a domain basis. It was created as a result of merging Yahoo's domainkeys and Cisco's Identified Internet mail specification. It is defined in RFC 4871.
We will be using the milter implementation of dkim http://dkim-milter.sf.net on CentOS 5.2.