Hi, I’m trying to set up a mail server.

https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassassin

Everything seems to work fine so far, but I’m stuck at the end of step 4 now.
Checking the port with “telnet example.com 993” fails.
I’ve figured out this is most probably because I’m using nginx as a proxy.

How do i need to set up nginx.conf to make this work?

In the nginx documentation you can find “Configuring NGINX as a Mail Proxy Server”.
https://docs.nginx.com/nginx/admin-guide/mail-proxy/mail-proxy/

Is that what i need to do? What is “auth_http” in my case, though?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @carnifex,

Let’s start with the unknowns.

  • Auth_http sets the URL of the HTTP authentication serve

In your case Auth_http should just be ‘localhost’ as you’ll be using your server for the authentications.

Additionally, make sure you have access to the 993 port and that something is actually listening on it. You can do that with the command

netstat -tulpen | grep 993

If nothing is listening on the port, then you’ll need to configure it in your Postfix service.

Regards,
KDSys

  • Hi, thanks for your reply.

    Ok, i changed the Auth_http to “localhost”.

    netstat doesn’t show anything.
    So i added..

    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (no)    (never) (100)
    # ==========================================================================
    smtp      inet  n       -       y       -       -       smtpd
    993       inet  n       -       y       -       -       smtpd
    

    .. to master.cf.

    Still nothing shows up.
    Am i doing this right?

    Btw firewall is disabled and yes, i restarted postfix service.

    • Hi @carnifex,

      So it seems like dovecot is not actually listening on the said ports, maybe they haven’t been configured properly. You’ll need to configure dovecot’s ports and then star the service.

      #/etc/dovecot/conf.d/10-master.conf    
      
      service imap-login {
            inet_listener imap {
              address = localost
              port = 143
            }
            inet_listener imaps {
              address = localost
              port = 993
              ssl = yes
            }
          }
      

      After you make the change, try to restart dovecot and see again wit netstat if the ports are being used.

      Regards,
      KDSys

Submit an Answer