In my last article on how to setup a basic mail server in debian using postfix and dovecot, I am now continueing on how to setup some basic spam filters. The reason to split this up, well I was stupid and assumed I wouldn’t need a spam filter yet. But I forgot that I also moved one domain to my new mail server that got 200 spam messages a day.
So now to repair my mistake I am adding the following features to my already existing mail server. To find out how to setup the mail server itself read my earlier article.
Sounds easy right. Well it should be
.
Ok over the weekend I spent some time to finally set up my personal mail server on the VPS system I have. I had been planning this for some time, and made several unsuccessful attempts. But this weekend after spending some hard time on it I finally got it working.
My setup is as follows:
Once you are running a linux server you can choose to do the login by username and password authentication or by certificate authentication. Personally I always choose for the latter as it is more difficult to intercept or hack in to.
Setting up certificate authentication is really simple. Just login to the machine as you would normally. Change to the user you are setting-up a certificate for and enter:
ssh-keygen -t rsa
You will be prompted for a password twice. After this is completed two files will be generated. One being the public file and one being the prive file. You need to download the private file from the server and store it somewhere safe. The public key needs to be copied to:
~/.ssh/authenticated_keys
After this you will be able to login to the server using your username and the private certificate. Please note that for Putty you will need to import the generated private key into puttygen and export it into a new private key. This is because Putty does not support the SSH generated private key.