I would like to set up a simple email server on my Linux VPS which will receive email for a variety of domains and accounts in my control. The whole idea behind this is to replace the Google Apps Standard accounts that I would normally use now that they have been discontinued.

I want the email server to receive the mail and store it locally until it is accessed via POP3 through my Gmail account. Once Gmail retrieves the mail, it is then deleted from the VPS.

I don't think I need any anti-spam/anti-virus as, based on my understanding, Gmail will process the mail once it retrieves it.

In my Gmail account I will set it up so that I can send mail from the same addresses I received mail from using Gmail's SMTP servers ("Send mail as"). I don't know if email sending is required on the email server/it can be disabled? If not, there will obviously need to be some security on the email server so it isn't abused as an open relay.

What is the best way to achieve this? Am I missing something that makes this whole idea stupid - are there alternatives?

Any help would be greatly appreciated!


Setting up a basic e-mail server is quite easy. Personally I prefer using postfix as SMTP server. This will take care of receiving the mails from your domain. Sending can be allowed but can easily be blocked by closing TCP port 25 outgoing.

You need to open up TCP port 25 incoming to receive mails.

There are dozens of postfix tutorials out there, and the postfix documentation itselves it quite good to.

Check out http://www.postfix.org/ and http://www.postfix.org/BASIC_CONFIGURATION_README.html#mydestination

To set up the pop3 server I would go for Dovecot2. Dovecot also has great documentation on its website.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.