:: CentOS 6: Postfix and Dovecot
:: How to installing Postfix and Dovecot on Linux CentOS
yum install postfix dovecot chkconfig postfix on chkconfig dovecot on
:: How to configure Postfix for Dovecot
+ configure main.cf
vi /etc/postfix/main.cf # change or add on these line: myhostname = mail.fileregion.com mydomain = fileregion.com myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks = 127.0.0.0/8 home_mailbox = Maildir/ smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit broken_sasl_auth_clients = yes
+ restarting postfix
/etc/init.d/postfix restart
:: Configure Dovecot on Linux CentOS 6
+ configure dovecot.conf
vi /etc/dovecot/dovecot.conf # uncomment on this line: protocols = imap pop3 listen = *
+ config mail auth mehanism
vi /etc/dovecot/conf.d/10-auth.conf # change on these line: disable_plaintext_auth = no auth_mechanisms = plain login
+ configure mail_location
vi /etc/dovecot/conf.d/10-mail.conf # change / uncomment on this line: mail_location = maildir:~/Maildir
+ configure service auth
vi /etc/dovecot/conf.d/10-master.conf # commented on these line: #unix_listener auth-userdb { #mode = 0600 #user = #group = #} # change or setup on these line: # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix }
+ configure pop3
vi /etc/dovecot/conf.d/20-pop3.conf # uncomment on these line: pop3_uidl_format = %08Xu%08Xv pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
+ restaring Dovecot
/etc/init.d/dovecot restart
+ Google
+ ServerWorld
Hi blackonsole,
I setup postfix server for the first time with your help, this is the best how-to I found on internet to setup postfix-dovecot
Thanks a million
Hello Ramesh, you are welcome.
Awesome guide. Wish I’d found this in the morning. Found the last few tweaks that I needed here, but this guide had nearly everything I needed for today.
Hi blackonsole,
I just want to thank you.
“I setup postfix server for the first time with your help, this is the best how-to I found on internet to setup postfix-dovecot…”
Carlos
This helps to quickly configure the postfix and dovecot, which i didn’t get anywhere. Thnx buddy. š
Fantastic tutorial! This is very helpful and a little different from CentOS 5 which was a pain. This tutorial worked flawless except for one thing.
I’m running CentOS 6.3 and by default I had this line uncommented in my ‘/etc/postfix/main.cf’ file: ‘inet_interfaces = localhost’
I had to comment this line out and ONLY have what you had:
‘inet_interfaces = all’
Restarted postfix and then I could send email. Thanks for a great article! š
hi
i configured postfix mail server
but i want a web panel from where i can create or delete email id’s. is there any way to do this kind of task.
cheers
laxman
laxman, you can using posfixadmin or other apps, you can see on //www.postfix.org/addon.html#config
Laxman;
What did you end up using? I am about to run from ubuntu to centos and follow this tutorial…
Thanks.
help :
Starting Dovecot Imap: doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-master.conf line 88: Unknown setting: unix_listener
[FAILED]
thanks.
Andy, what’s the options for unix_listener ?
can you recheck the configuration ?
thanks.
I’m having the same issue here. Base CentOS 6.3 install and new to Linux so just following your tutorial here leads to this error. Is there some steps we should have followed before hand to set up the “unix_listener”? What you have as line 11 in your “+configure service auth” section is where it says the error lies but it looks to me like it’s exactly as you have it here. If this works it’ll be the only step by step I’ve found so far so lets cross our fingers we can get this little road-bump smoothed out. Appreciate your help Blackonsole! Obviously this has helped a lot of people and you should be proud even if I can’t get it working
Of course immediately after I post I realize that I forgot to comment out the closing curly brackets of the # unix_listener auth-userdb settings. So immediately before trying to run the unix_listener I was closing more arguments than existed probably causing a force closure. I hope Andy checks back for the answer because I would guess this is what he did too. GL all and thanks for your tutorial Blackonsole!
How about setup with multiple domains on virtual hosts on the same server?
Kasi, you can setup virtual domain in /etc/postfix/virtual then run these command:
postmap /etc/postfix/virtual
postfix reload
thanks.
So, i just put my domains on /etc/postfix/virtual separated by line? OK. But how do i make virtual users. Let’s say I want to have 20 domains that have email [email protected], [email protected], etc. I don’t want unix users, I want only mail users. All admins will use thunderbird (imap accounts, so dovecot will be needed) to read/send mail, so they can manage their websites.
I think i got it. One unix user and group has to be specified to own the mail base folder specified in the config of postfix, the virtual users have to be specified there, too.
Is this config for a full mail server, meaning you’ll be sending and receiving email?
If I just want to be able to only send email from my PHP application do I follow the same config.
Thank you.
Emo, yes, you can just install postfix mail server for sending email from php apps.
thanks.
Hi, thanks for a great tutorial. I wondered how you enable TLS with postfix? I noticed you’re setting up sasl in the main.cf config but it won’t accept ssl connections.
Cheers
Yeah!!! This is a great tutorial!
I’ve been dealling with my mail server for some time;)Thank You!!!
and best regards to you!!
HI Blackonsle,
I have setup postfix server with fetchmail. i have a server hostted ourside with email id [email protected],[email protected] ,[email protected].
and a local server local.abc.com with local user 123.
the problem is i am able to send email to all domain and [email protected] fail to send the emailto [email protected] that is not able to send mail to abc.com. Domain name in both server is same.Please help
Hello Satish, did you see the error logs in mail log ?