Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a vps with Debian 7.2. I will host 3 websites in the server. I feel lost and i want some help creating the email accounts for each domain.

Here is my setup so far concerning the email:

# EMAIL - Postfix, Dovecot
sudo apt-get install postfix postfix-mysql postfix-doc openssl getmail4 dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve -y
# Next open the TLS/SSL and submission ports in Postfix
sudo sed -i '/submission inet n/ s/^#//' /etc/postfix/master.cf
sudo sed -i '/-o syslog_name=postfix/ s/^#//' /etc/postfix/master.cf
sudo sed -i '/-o smtpd_tls_security_level=encrypt/ s/^#//' /etc/postfix/master.cf
sudo sed -i '/-o smtpd_sasl_auth_enable=yes/ s/^#//' /etc/postfix/master.cf
sudo sed -i '/-o smtpd_client_restrictions=permit_sasl_authenticated/ s/^#//' /etc/postfix/master.cf
sudo sed -i '/smtps     inet  n/ s/^#//' /etc/postfix/master.cf
sudo sed -i '/-o smtpd_tls_wrappermode=yes/ s/^#//' /etc/postfix/master.cf
sudo service postfix restart

# Make MySQL to listen on all interfaces
sudo sed -i '/bind-address/ s/^#//' /etc/mysql/my.cnf
sudo service mysql restart

# Install SquirrelMail
sudo apt-get install squirrelmail

So lets say i want to create two email accounts:

  • info@domain1.com
  • info@domain2.com

What are the steps i should follow?

share|improve this question
I am not a postfix user, but have you the documentation related to virtual domains? See: postfix.org/VIRTUAL_README.html –  Zoredache Dec 5 '13 at 21:28
There are zillions of HowTos for setting up postfix and dovecot for virtual delivery. If you don't want to configure your accounts manually, take a look at postfixadmin: postfixadmin.sourceforge.net . Find some decent HowTo and come back when you encounter a problem with it. –  etagenklo Dec 6 '13 at 11:33

2 Answers 2

It seems your setup is not completed. As etagenklo suggests, check howtos on the net. A very good one can be found at http://workaround.org. I started with the squeeze one and I'm hosting 2 domains mail servers; working perfectly.

Also, to go easy, just forget the anti-spam stuff at first. When it's working smooth, then go on adding things like squirrel mail(actually I never tried squirrel but roundcube is wild).

So, 1/ just postfix, dovecot and mysql. From there(2/), add things up. And remember you'll need submission port 587 to be able to send on most networks(at least where I live).

Also, to check everything is working without MUA, telnet domain1.com 110 or 995 for POP(or POP SSL), telnet domain1.com 143 or 993 for IMAP(or IMAP SSL).

For SMTP, it's little bit more tricky. As port 25 won't work in most cases, you need to setup 587 submission port on postfix(master.cf).

From there you can openssl s_client -connect domain1.com:587 -starttls smtp and check if you can send a mail this way(there is info on the whole process on the net, else ask here and I'll C/P the whole sequence).

share|improve this answer

Postfix is a Mail Transfer Agent (MTA), which is used for sending and forwarding mails. If you want do deliver mail in a mailbox you need a mail delivery agent like dovecot or courier.

share|improve this answer
I have. Check my post. My problem is how to create the email accounts for every website. –  koukouloforos Dec 5 '13 at 21:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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