• Pingback: Setup a mail server on ubuntu 14.04 ( Postfix – dovecot ) | Lost Packets – WordPress.com | Ubuntu VPS Hosting()

  • Maelstrom

    I did this config but I could not see any messages. Basically the mail wasn’t being delivered/handled either to the right location or by the right mail handling program. I assume procmail was handling delivery but I don’t now. HERE is how I fixed it:

    Comment out the line in>> /etc/postfix/main.cf
    mail_command = procmail -a $”EXSTENSION”

    and append below:
    mail_command =

    Not sure why this is but I can now see all the messages sent since this change was made in Thunderbird, Windows Mail and SquirrelMail.

    • krizna

      If you had installed mail server using tasksel , you will be prompted for an extra value during 4th step ..
      “Use procmail for local delivery ?”
      Choose No and continue

      Thanks for your comment.

      • micko

        Hi Krizna! how can i reconfigure dovecot-common, because i mistakenly entered a wrong hostname. I just want to change it,thanks

  • Maelstrom

    I did this config but I could not see any messages. Basically the mail wasn’t being delivered/handled either to the right location or by the right mail handling program. I assume procmail was handling delivery but I don’t now. HERE is how I fixed it:

    Comment out the line in>> /etc/postfix/main.cf
    mail_command = procmail -a $”EXSTENSION”

    and append below:
    mail_command =

    Not sure why this is but I can now see all the messages sent since this change was made in Thunderbird, Windows Mail and SquirrelMail.

    • If you had installed mail server using tasksel , you will be prompted for an extra value during 4th step ..
      “Use procmail for local delivery ?”
      Choose No and continue

      Thanks for your comment.

      • micko

        Hi Krizna! how can i reconfigure dovecot-common, because i mistakenly entered a wrong hostname. I just want to change it,thanks

  • Blubber

    THANKS! I’ve been trying to set mail stuff up for ages and never got it working, this is working flawlessly exactly like I want, thanks again.

  • Blubber

    THANKS! I’ve been trying to set mail stuff up for ages and never got it working, this is working flawlessly exactly like I want, thanks again.

  • Ronald Layanto

    Dear Krizna,

    Thank you for your guide

    I got a question, when I try to telnet the postfix, it’s connected but the result is 220 UNKNOWN ESMTP Postfix (Ubuntu)

    Can you please help me with this issue?
    Also I already try to login to squirrelmail via browser and it works perfectly
    My mail can receive message, but unfortunately it can’t send email out
    Did I missconfigure or something?

  • Ronald Layanto

    Dear Krizna,

    Thank you for your guide

    I got a question, when I try to telnet the postfix, it’s connected but the result is 220 UNKNOWN ESMTP Postfix (Ubuntu)

    Can you please help me with this issue?
    Also I already try to login to squirrelmail via browser and it works perfectly
    My mail can receive message, but unfortunately it can’t send email out
    Did I missconfigure or something?

  • Proshanto Mon

    Hello krizna, squirrelmail worked super fine. but as you know it does not have any html composing system. Also if you receive email from 3rd party, it shows garbage attachments. Cann’t use squirrelmail even for general email purposes. outdated.

    Could you please add tutorials for installing horde and roundcube as well ?

  • Proshanto Mon

    Hello krizna, squirrelmail worked super fine. but as you know it does not have any html composing system. Also if you receive email from 3rd party, it shows garbage attachments. Cann’t use squirrelmail even for general email purposes. outdated.

    Could you please add tutorials for installing horde and roundcube as well ?

  • MailLove

    I’ve followed a few guides on trying to set postfix and dovecot up together (ignoring the squirrelmail) and none of them worked, this one did first time. Not sure it that’s just luck because we’re both on a very similar set up but either way thank you!

  • MailLove

    I’ve followed a few guides on trying to set postfix and dovecot up together (ignoring the squirrelmail) and none of them worked, this one did first time. Not sure it that’s just luck because we’re both on a very similar set up but either way thank you!

  • natZONE

    Doesn’t work for me. I did everything exactly as you described it. Dovecot connects and disconnects after half a second again. No chance to get or to send mails.

  • natZONE

    Doesn’t work for me. I did everything exactly as you described it. Dovecot connects and disconnects after half a second again. No chance to get or to send mails.

  • alex

    We get an error if we install squirrelmail in the last stap and we can fix this with google:

    ERROR: Could not complete request.

    Query: SELECT “INBOX”

    Reason Given: [SERVERBUG] Internal error occurred. Refer to server log for more information. [2014-09-17 14:09:59]

    • micko

      I’m having the same problem, please help Krizna

      • Qaiser Awan

        hi, i had the same problem, double check all the steps one by one
        it shouldn’t happened

        • fayyaz

          sudo nano /etc/dovecot/conf.d/10-mail.conf
          And do not just uncomment the (mail_location)
          but change the value of uncommented mail_location to the given below you will not receive any of such error

          # mail_location = maildir:~/Maildir
          # mail_location = mbox:~/mail:INBOX=/var/mail/%u
          # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
          #
          #
          #
          mail_location = maildir:~/Maildir

          • ankualliance

            Hi Krizna,

            Firstly thanks for the documentation. I followed every steps of your documentation & my mail server is running fine while sending other domain but can’t receive mail from other domain. An error message is showing while sending mails from other domain i.e. Recipient address rejected: User unknown in local recipient table. But internal mail is working fine. I can send and receive mails within the domain.

            Requesting you to help me to fix the issue.

            Thanks in advance.

            Regards,

            ankualliance

    • fayyaz

      find the solution below
      under Qaisar awan

  • alex

    We get an error if we install squirrelmail in the last stap and we can fix this with google:

    ERROR: Could not complete request.

    Query: SELECT “INBOX”

    Reason Given: [SERVERBUG] Internal error occurred. Refer to server log for more information. [2014-09-17 14:09:59]

    • micko

      I’m having the same problem, please help Krizna

      • Qaiser Awan

        hi, i had the same problem, double check all the steps one by one
        it shouldn’t happened

        • fayyaz

          sudo nano /etc/dovecot/conf.d/10-mail.conf
          And do not just uncomment the (mail_location)
          but change the value of uncommented mail_location to the given below you will not receive any of such error

          # mail_location = maildir:~/Maildir
          # mail_location = mbox:~/mail:INBOX=/var/mail/%u
          # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
          #
          #
          #
          mail_location = maildir:~/Maildir

          • ankualliance

            Hi Krizna,

            Firstly thanks for the documentation. I followed every steps of your documentation & my mail server is running fine while sending other domain but can’t receive mail from other domain. An error message is showing while sending mails from other domain i.e. Recipient address rejected: User unknown in local recipient table. But internal mail is working fine. I can send and receive mails within the domain.

            Requesting you to help me to fix the issue.

            Thanks in advance.

            Regards,

            ankualliance

          • MD.Rakib Hossen

            I can’t receive mail from Gmail , yahoo , But i send mail yahoo, Gmail . But is go to spam

    • fayyaz

      find the solution below
      under Qaisar awan

  • marcus89uk

    dovecot-common does not prompt me for any options, and it does not start

  • marcus89uk

    dovecot-common does not prompt me for any options, and it does not start

  • scott

    Out of the box do not uncomment in postfix master conf.
    -o smtpd_tls_security_level=encrypt

  • scott

    Out of the box do not uncomment in postfix master conf.
    -o smtpd_tls_security_level=encrypt

  • Brent

    Hi Krizna,

    I’ve followed several tutorials (and a combination of) but your one really nailed it. You’ve covered items that others missed and I really like step 12 in your postfix setup. I had a problem with the authentication which I didn’t know about, but this step told me that something was missing and I fixed it before moving on.

    If anyone wants to check that their configuration files for dovecot are causing problems you can try this:

    sudo service dovecot restart

    cat /var/log/syslog

    Oct 8 09:51:56 ubuntu dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)

    Hope this helps, and thanks Krizna

  • Brent

    Hi Krizna,

    I’ve followed several tutorials (and a combination of) but your one really nailed it. You’ve covered items that others missed and I really like step 12 in your postfix setup. I had a problem with the authentication which I didn’t know about, but this step told me that something was missing and I fixed it before moving on.

    If anyone wants to check that their configuration files for dovecot are causing problems you can try this:

    sudo service dovecot restart

    cat /var/log/syslog

    Oct 8 09:51:56 ubuntu dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)

    Hope this helps, and thanks Krizna

  • umair

    Everything works except squirrelmail. At step 19 “sudo a2ensite squirrelmail” it says “ERROR: Site squirrelmail does not exist!”. Can you guide what is the problem ?

  • umair

    Everything works except squirrelmail. At step 19 “sudo a2ensite squirrelmail” it says “ERROR: Site squirrelmail does not exist!”. Can you guide what is the problem ?

    • Mayank Gupta

      type squirrelmail.conf

  • natalinux

    thank you so much. simple and clean.
    🙂

  • natalinux

    thank you so much. simple and clean.
    🙂

  • unkl

    I have installed as per the instructions, but…:

    when testing the smtp-auth settings I get my computer’s IP and not local:

    user@mail ~ $ telnet mail.user.org smtp
    Trying 172.16.1.183…
    Connected to mail.user.org.
    Escape character is ‘^]’.
    220 unkl ESMTP Postfix (Ubuntu)

    and running ehlo I do not get the important highlighted auth lines:
    ehlo mail.user.org
    250-user
    250-PIPELINING
    250-SIZE 10240000ehlo mail.user.org
    250-user
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN

    when trying to send email to the test account bobby, I get error authenticating, how to fix this this? Apache2 answers on the web, but mail is not working.

    Your input will be appreciated.

  • Freddy

    Hey, i’ve a question. … The following thing is interesting for me. When i configure postfix and dovecot with your how to. Is my server an open relay, or isn’t it because i do step 10. Sorry for my bad english and thanks for answer.

  • Freddy

    Hey, i’ve a question. … The following thing is interesting for me. When i configure postfix and dovecot with your how to. Is my server an open relay, or isn’t it because i do step 10. Sorry for my bad english and thanks for answer.

  • dublea

    I posted this question before, but I no longer see it. Port 25 is blocked by my ISP. In your postfix configuration, what would need to be configured for SMTP relay though Gmail or Comcast? Thanks!

  • dublea

    I posted this question before, but I no longer see it. Port 25 is blocked by my ISP. In your postfix configuration, what would need to be configured for SMTP relay though Gmail or Comcast? Thanks!

  • actordc

    I have done all in this tutorial, but the ports used for mail aren’t open.

    • actordc

      Update: I forgot to uncomment a line 😉

  • actordc

    I have done all in this tutorial, but the ports used for mail aren’t open.

    • actordc

      Update: I forgot to uncomment a line 😉

  • micko

    Hi Krizna, I followed your instructions and I’ve got nothing wrong, but
    when I try to setup my mail in outlook, it gives me this error “Log onto
    incoming mail server (POP3): Your e-mail server rejected your user
    name. Verify your user name for this account in Account Settings. The
    server responded: -ERR [AUTH] Plaintext authentication disallowed on
    non-secure (SSL/TLS) connections.” Please Help. I know I inputted a
    right username because i can access my account in squirrel.

  • sushil sonare

    Thx for sharing….nice documented

  • sushil sonare

    Thx for sharing….nice documented

  • Qaiser Awan

    how to configure sendmail with squirrelmail

  • Qaiser Awan

    how to configure sendmail with squirrelmail

  • Rick Knight

    Great tutorial, but I’m having trouble with step 11 (relating to step 5?).

    When I enter “sudo service postfix restart” I get this error, twice…

    * Starting Postfix Mail Transport Agent postfix
    postmulti: fatal: /etc/postfix/main.cf, line 62-61: missing ‘=’ after attribute name: “permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination”
    [ OK ]

    Any idea why this is happening, and how to fix it?

    This is on a fresh install of Xububtu, with nothing else installed yet.

    Thanks,
    Rick

    • Rick Knight

      Ok, I got this working, at least mostly working. Everything seems to be working except that when I go through step 12 Now test SMTP-AUTH and smtp/pop3 port access. The test only completes successfully for port 587, not for the SMTP port (25). Otherwise things seem to be working. Is this OK, or should I try to determine why the SMTP port is not working. Like I said, port 587 tests OK.

      Thanks,
      Rick

  • Rick Knight

    Great tutorial, but I’m having trouble with step 11 (relating to step 5?).

    When I enter “sudo service postfix restart” I get this error, twice…

    * Starting Postfix Mail Transport Agent postfix
    postmulti: fatal: /etc/postfix/main.cf, line 62-61: missing ‘=’ after attribute name: “permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination”
    [ OK ]

    Any idea why this is happening, and how to fix it?

    This is on a fresh install of Xububtu, with nothing else installed yet.

    Thanks,
    Rick

    • Rick Knight

      Ok, I got this working, at least mostly working. Everything seems to be working except that when I go through step 12 Now test SMTP-AUTH and smtp/pop3 port access. The test only completes successfully for port 587, not for the SMTP port (25). Otherwise things seem to be working. Is this OK, or should I try to determine why the SMTP port is not working. Like I said, port 587 tests OK.

      Thanks,
      Rick

      • arjun dhar

        So how did you get rid of that error? .. the “missing ‘=’ after attribute name” one. Must be some silly WHITESPACE issue but I cant get my finger on it.

  • Raffy Bandrang

    If you are having trouble on how to connect you account on outlook just follow my instruction :

    Setup E-mail manually

    create an account in outlook with the same user and password you’ve create in step 18,

    user: info
    password: *******

    in your account information put
    your name:
    and email address: (ex. your info@example.com)

    then in your server information put incoming server the actual public IP address of your hosted mail server. (ex. 10.10.1.15) .
    Do the same with outgoing server.

    in the “change account form” select more settings.. then in Internet Email Setting, select advanced tab.

    then use 995 for incoming server
    tick the box for ssl connection
    and leave the outgoing SMTP on port (25) and the following encryted connection (NONE)

    after that test account setting

    and then you’re ready to go.

  • Raffy Bandrang

    If you are having trouble on how to connect you account on outlook just follow my instruction :

    Setup E-mail manually

    create an account in outlook with the same user and password you’ve create in step 18,

    user: info
    password: *******

    in your account information put
    your name:
    and email address: (ex. your info@example.com)

    then in your server information put incoming server the actual public IP address of your hosted mail server. (ex. 10.10.1.15) .
    Do the same with outgoing server.

    in the “change account form” select more settings.. then in Internet Email Setting, select advanced tab.

    then use 995 for incoming server
    tick the box for ssl connection
    and leave the outgoing SMTP on port (25) and the following encryted connection (NONE)

    after that test account setting

    and then you’re ready to go.

  • Carlos

    there two are missing:

    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    what should I do

  • Carlos

    there two are missing:

    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    what should I do

  • Carlos

    I’m getting this error at squirrel mail… What should I do…

    Message not sent. Server replied:

    Connection refused
    111 Can’t open SMTP stream.

  • Carlos

    I’m getting this error at squirrel mail… What should I do…

    Message not sent. Server replied:

    Connection refused
    111 Can’t open SMTP stream.

  • Sydney

    Im getting an error(connection smtp server timed out) when trying to setup email client(Thunderbird) but from the command I manage to send a test me message. please help.

  • Sydney

    Im getting an error(connection smtp server timed out) when trying to setup email client(Thunderbird) but from the command I manage to send a test me message. please help.

  • fayyaz

    well done and beautifully defined. good work and keep it up

  • fayyaz

    well done and beautifully defined. good work and keep it up

  • Qaiser Awan

    i cant receive external mail, cannot receive hotmail emails,
    Pleaseeeeeeeeeee help

  • Qaiser Awan

    i cant receive external mail, cannot receive hotmail emails,
    Pleaseeeeeeeeeee help

    • Alexis Mora

      You can review file

      /var/log/mail.log

      And tell me the error

      • Qaiser Awan

        problem sorted, My IP was not registered with the third party spam filter server.
        thanks

    • Florian-Thomas Wickenburg

      I have the same Problem

      Can anybody help?

  • Qaiser Awan

    Dear fayyaz, thanks for reply but i have followed all the steps in that link
    and double checked but unfortunately couldn’t get the external mails

  • Qaiser Awan

    Dear fayyaz, thanks for reply but i have followed all the steps in that link
    and double checked but unfortunately couldn’t get the external mails

  • What is the expected output for ehlo in port 587? Which lines I’m looking for?

  • Guest

    What is the expected output for ehlo in port 587? Which lines I’m looking for?

    • MD.Rakib Hossen

      ehlo 587
      250-RemittranceUk
      250-PIPELINING
      250-SIZE 10240000
      250-VRFY
      250-ETRN
      250-STARTTLS
      250-AUTH PLAIN LOGIN
      250-AUTH=PLAIN LOGIN
      250-ENHANCEDSTATUSCODES
      250-8BITMIME
      250 DSN

      • joe

        I’m not getting AUTH PLAIN LOGIN and AUTH=PLAIN LOGIN on port 587 but i am getting it on smtp

        • DubbaThony

          same, figured it out?

        • mgr9500

          my recommendation to you is to remove the comment mark at the start of the line #submission

  • Lovely tutorial! Right now I’m having a problem where my e-mails are not being received by dovecot. They never make it to maildir. DNS seems fine. Is there a way to test if dovecot is really working?

    • Hariharan Gopal

      ya I am also facing the same problem

  • Lovely tutorial! Right now I’m having a problem where my e-mails are not being received by dovecot. They never make it to maildir. DNS seems fine. Is there a way to test if dovecot is really working?

    • Hariharan Gopal

      ya I am also facing the same problem

    • Adolfo Meneses

      same here

  • Muito bom esse procedimento pra instalacao!! Funcionou 200% sempre precisar reconfigurar nada valeu!!!! Parabens!!!

  • Muito bom esse procedimento pra instalacao!! Funcionou 200% sempre precisar reconfigurar nada valeu!!!! Parabens!!!

  • I’ve just realized that’s a blog in English kkkk!!! I meant in my previous comment that this article about Postfix’s installation and configuration was SO useful, it worked out perfectly I didn’t even needed to tweak something after to finish the how-to, great!! Thank you SOO much!!!

  • I’ve just realized that’s a blog in English kkkk!!! I meant in my previous comment that this article about Postfix’s installation and configuration was SO useful, it worked out perfectly I didn’t even needed to tweak something after to finish the how-to, great!! Thank you SOO much!!!

  • Luca Antonello

    thanks! work perfectly!
    just a question: how i can create an alias email?

  • Luca Antonello

    thanks! work perfectly!
    just a question: how i can create an alias email?

    • Paul

      YourBox~# sudo nano /etc/aliases
      ___________________________
      Name: aliases
      ___________________________
      YourBox~# newaliases

  • umer

    thanks you for your help but i follow all the steps but 11, 995, 993 is not available in my ubuntu server

  • emjnkr

    This is great, I just wanted to setup a simple mail thing and this tutorial is the onlything that worked. My only issue is that if I send an email out from squirelmail it gets marked as spam in gmail, any way to fix that?

    • Paul

      Check blacklisting~ I was lucky, sertting up a MTA, MUA, PIM setup on a very old connection with DNS in place. I ran into problems replicating this for my own office. The answer is learning how to properly set up DNS, security, and understanding postfix/ dovecot. Look beyond the tutorial and actually read the config scripts. The orriginal programmers did a great job at keeping the language simple and concise. There are a few parts where you will have to Google for clarification. Also, make comments as you go! change one line at a time, document your thought process. This will help maintain forward momentum. Setting up a mail server in Linux is a milestone that every aspiring NetAdmin must surpass. By the time you finish this process, you can pretty much shred that UNIX cheatsheet hidden under your blotter, as you will have mastered enough BASh to move towards intermediate commands. I am using Mint 17 for this.

  • sanyog

    great post but port 111, 143, and 993 is not work. what should i have to do ? now. suggestion plz.

    • Alexis Mora

      Do you have a firewall blocking ports?

  • Pingback: 홈서버 메일서버 구축기 - Tech Story()

  • Sibusiso

    hi krizna

    thank you for the tutorial but im facing a challenge on
    adding mail users to groups “usermod -a -G groupname user” is not
    working for me

    still a novice in linux

    thanks in advance

    • Alexis Mora

      You only need to use:

      sudo useradd -m -s /sbin/nologin
      sudo passwd

      • Sibusiso

        thanks Alexis Mora

        I tried it but it was not working for me but changing the aliases file using vi /etc/aliases worked for me….

        sales: userone,usertwo
        markerting: userthree,userfour

  • Alexis Mora

    I got error message:

    postfix/smtpd[30186]: NOQUEUE: reject: RCPT from unknown

    warning: non-null host address bits in “127.0.0.1/24”, perhaps you should use “127.0.0.0/24” instead

    Please Help! :O

  • Florian-Thomas Wickenburg

    I’m having a problem where my e-mails are not being received by dovecot.

    Has anybody an idea for solve this problem?

  • chris

    i got the following error in squirrelmail

    ERROR: Could not complete request.
    Query: SELECT “INBOX”
    Reason Given: [SERVERBUG] Internal error occurred. Refer to server log for more information. [2015-05-12 15:41:33]

    how can i fix it?

  • Iván GM

    I you are having a problem where e-mails are not being received by dovecot:

    sudo sed -i “/mailbox_command/ s/^/# /” /etc/postfix/main.cf
    The problem was with with mailbox_command. When i just commented out the line containing mailbox_command, it worked.

  • Javi Hache

    Well to work with SSL or to work AT ALL!

  • Empush Puspita

    why when i restart apache2 they said its failed 🙁 i cant open email by squirrel 🙁

    • Mayank Gupta

      try a2ensite squirrelmail.conf

  • Anthony Brown

    I had a problem receving email with squirrelmail. I resolved this by running the /etc/squirrelmail/conf.pl script. Select 2.Server Settings, then A. Update IMAP Settings 8. Server Software = dovecot. When I installed it was set to other instead of dovecot.

  • Nian Ying Toh

    unable to telnet to mail server at step17 above need help

  • webs

    help i can’t login,what i get is ERROR:
    ERROR: Connection dropped by IMAP server.

  • Pingback: Want to move to roundcube from squirrelmail topic | ubuntu()

  • Captain

    Great post, everything worked perfectly for me… Thank you very much and i will keep visiting your site for different installs

  • Pingback: Mail server on Ubuntu 14.04 using Postfix, Dovecot, Squirrelmail | The Bald Keyboardist()

  • Aaron Brooks

    What should be the output for the telnet with port 587? I dont have those bolded lines for 587. Is this okay?

  • Pingback: Setup mail server on centos 7 [Email with Postfix, Dovecot and MariaDB on CentOS 7] | FoxTech Lab()

  • Pingback: Setup mail server on ubuntu 14.04 ( Postfix – dovecot ) | maj home()

  • laptrinhphp

    Hello, i have error.

    /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions

    /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions

    /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions

    /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions

    So how can i fix it? thanks.

  • Thank. It’s work. Very good.

  • Pingback: Isp Setup Ispconfig Squirrelmail Horde Postfix | online - quick speed test()

  • MN

    My server is configured and i am able to send and receive mail using squirrelmail but when i try to send and receive mails through thunderbird from other PC in network it doesn’t find the server although it is in the same network and i am able to ping the server ip also……..pls guide

    • omsi

      Check if both computers are in the same domain or workgroup

  • MN

    Really Great guidance……..Thanks for it……..Can i send mail from gmail to the server i made and vice versa…………If yes……please tell how?

  • Pingback: Isp Setup Ispconfig Squirrelmail Horde Postfix | info - cable internet provider()

  • Pingback: Isp Setup Ispconfig Squirrelmail Horde Postfix | locations - free wireless internet()

  • Mayank Gupta

    Excellent tutorial ! I did everything. The squirrel mail is up. I can login but the messages I send are going nowhere. I created an email id as bobby@subdomain.com and I tried sending mail to itself, to gmail – nothing seems to be working. What did I miss ?

  • thx

  • PD

    Oh crap! It seems most of all posted “Squirrel works” Uhmm, I have done everything no errors, but may I ask, how do I know what is my “URL” for squirrelmail?

    “http://serverIP/squirrelmail” don’t work for me :3 HELP PLS

  • Lion

    Thanks for the tutorial.

    Finally it works in Ubuntu 15 but it took me 2 days to figure out an issue where the incoming email is not available in POP nor IMAP although from the log seen that the SMTP nicely accept the email. I wrongly do step-13 where mail_location is set to mbox:~/Maildir instead of maildir:~/Maildir.

    • XiaoGuang Wang

      That is exactly the problem what I had. Thank you for letting us know this tiny but important difference.

  • MD.Rakib Hossen

    I can’t receive mail from Gmail , yahoo , But i send mail yahoo, Gmail . But is go to spam

    • XiaoGuang Wang

      You probably also wrongly did step-13 where mail_location is set to mbox:~/Maildir instead of maildir:~/Maildir. As mentioned in Lion’s post.

  • MD.Rakib Hossen

    root@mail:~# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:ssh *:* LISTEN 880/sshd
    tcp 0 0 *:smtp *:* LISTEN 27536/master
    tcp 0 0 *:imaps *:* LISTEN 26864/dovecot
    tcp 0 0 *:pop3s *:* LISTEN 26864/dovecot
    tcp 0 0 *:mysql *:* LISTEN 977/mysqld
    tcp 0 0 *:submission *:* LISTEN 27536/master
    tcp 0 0 *:pop3 *:* LISTEN 26864/dovecot
    tcp 0 0 *:imap2 *:* LISTEN 26864/dovecot
    tcp 0 0 *:urd *:* LISTEN 27536/master
    tcp 0 464 mail.remittanceuk.c:ssh 103.41.213.170:50156 ESTABLISHED 4997/0
    tcp 0 1691 mail.remittanceuk.c:ssh 222.186.21.208:4956 ESTABLISHED 6745/sshd: [accepte
    tcp6 0 0 [::]:ssh [::]:* LISTEN 880/sshd
    tcp6 0 0 [::]:smtp [::]:* LISTEN 27536/master
    tcp6 0 0 [::]:imaps [::]:* LISTEN 26864/dovecot
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 26864/dovecot
    tcp6 0 0 [::]:submission [::]:* LISTEN 27536/master
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 26864/dovecot
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 26864/dovecot
    tcp6 0 0 [::]:http [::]:* LISTEN 26842/apache2
    tcp6 0 0 [::]:urd [::]:* LISTEN 27536/master

  • MD.Rakib Hossen

    Please help anybody
    I can’t receive mail from Gmail , yahoo , But i send mail yahoo, Gmail . But is go to spam

    • DubbaThony

      change your dns records, so it contains text that you can grab directly from google for example.

  • Maxmah Technology

    The best tutorial I ever had online. Absolutely genius work Krizn. Many Many Thanks

  • naqash sattar

    ERROR: Connection dropped by IMAP server.
    http://52.5.117.240/squirrelmail/src/redirect.php
    getting this error on squirrelmail .. please helppppp
    i am using amazon aws ec2 instance with ubuntu 14.04

  • Asep Dadan

    why my problem?
    telnet: Unable to connect to remote host: Connection refused

  • Andrew Saxton

    ERROR: Could not complete request.

    Query: SELECT “INBOX”

    Reason Given: [SERVERBUG] Internal error occurred. Refer to server log for more information. [2016-01-28 18:58:56]

    everything else works in squirrelmail just inbox not working checked everything wice

    any ideas please

  • guebre

    i have the error : error connecting to imap server: localhost. 111: connection refused

  • Viet Le

    Great tutorial

  • bwhite

    works fine. thanks a lot.

  • Bala

    Hi Krizna, how to communicate with two different domains(Local) in postfix with dovecot like i want send and receive from xxx@tc.abc.in and yyy@local.xyz.in

    • kathir vel.m

      same i have dout

  • Ted Collins

    AWESOME Post — Thanks!!

  • linuxlover

    Thanks a lot

  • sudarsun

    Amazing tutorial. Saved a lot of time for me. Thanks very much.

  • bumeshrai

    Thank you! Superb article.

    Everything went on as instructed. I have one query. After setting up the mail server, what values you enter in MX records of the domain hosting service.

  • Marcelo Melo

    Obrigado, parabéns esse tutorial foi único que deu certo para configura Outlook recebe e enviar …

  • charles

    Best tutorial for setting up postfix and dovecot. I refer this page each and every time I setup a new server. Thanks a lot.

  • Matthew

    Hey Krizna, thanks for the tutorial! Easy to follow but I am having some issues. When I do the telnet mail.example.com 110 step, it connects to my static ip that I setup in /etc/hosts and tells me that I am connected but then it is closed by foreign host. I did netsat and the ports are listening, but when I went back into the dovecot config files and set “ssl = no” and commented the pop3_uidl_format back out. It works fine.

  • 19621205

    I’m done but on the last part

    krizna@mail:~$ sudo a2ensite squirrelmail

    it says ‘Site squirrelmail does not exist’

    Need your help Krizna.

    Thanks.

    ** issue already solved and I can be able to open the squirrelmail but I got
    “Unknown user or password incorrect.”

    Is there any problem with the authentication? I simply followed the steps above. Please assist me. Thanks.

  • geoB

    KUDOS! After trying postfix/dovecot documentation from Ubuntu & DigitalOcean over more days than I care to count, your tutorial is the one that worked. Great work.

  • siantarcybercom

    on video ubuntu 16.10 with courier-pop courier-imap

  • mgr9500

    if you have this problem: MTP server response: 530 5.7.0 Must issue a STARTTLS command first
    then my recommendation to you is to remove the comment mark at the start of the line

    #submission
    good luck
    @mgr9500