# Nginx mail proxy - dovecot ssl backend

**URL:** <https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251>\
**Category:** NGINX\
**Created:** [November 25, 2011, 9:42pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251 "2011-11-25T21:42:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [November 25, 2011, 9:42pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/1 "2011-11-25T21:42:40Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hello!

Is SSL backends (dovecot) supported by nginx mail proxy ?

Thank you!  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.11 (GNU/Linux)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org/](http://enigmail.mozdev.org/)

iEYEARECAAYFAk7P/RwACgkQNRQApncg294jrgCfW/lRpMywRk2tq++wRE5u3sxM  
X1kAn31+gvYibdHLYM3Mv2HDaW/TjaHa  
=DK/D  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [November 25, 2011, 10:30pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/2 "2011-11-25T22:30:24Z")

</div>

Hello!

On Fri, Nov 25, 2011 at 06:39:58PM -0200, Flavio Torres wrote:

> Is SSL backends (dovecot) supported by nginx mail proxy ?

No, mail proxy doesn’t support ssl backends.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [May 13, 2012, 1:28pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/3 "2012-05-13T13:28:54Z")

</div>

Hi, Flavio.

You’ll need following modifications to add SSL backends support to  
nginx’s mail proxy:  
[https://github.com/druga/unuzbl/tree/master/nginx-temp](https://github.com/druga/unuzbl/tree/master/nginx-temp) .  
It’s still a WIP (but 'll enough to cope with your task), so sorry, i  
didn’t converted my work into the form of patch. It’s done against  
1.0.11 version of nginx.

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,226365#msg-226365)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [February 15, 2014, 11:43pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/4 "2014-02-15T23:43:22Z")

</div>

any chance this patch / change will be added to the default release?  
We run nginx-full 1.4.4 from Debian Wheezy Backports and the ‘issue’  
described above still seems to apply (no hostname / SSL support for  
backend  
server).

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,247602#msg-247602)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [February 16, 2014, 6:10am UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/5 "2014-02-16T06:10:08Z")

</div>

Hello. I plan to beat all the ugliness and produce a clean patch very  
soon.  
I’ll let you know.

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,247608#msg-247608)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [February 16, 2014, 4:42pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/6 "2014-02-16T16:42:03Z")

</div>

dukzcry, that would be very very very nice 🙂

We are busy with an big change in our email environment (serving +/-  
10.000  
mailboxes).  
Currently we use Dovecot with NFS (IPsec) filesystems but we would like  
to  
change this to a firewalled dovecot backend + NginX as frontend.

Looking forward to your patch and maybe inclusion in an upstream  
version!

Kasper

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,247617#msg-247617)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [February 24, 2014, 8:07pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/7 "2014-02-24T20:07:00Z")

</div>

Now, here is the minimal patch:  
[https://raw.github.com/druga/aeriebsd-tree/master/usr.sbin/nginx/patch-nginx\_mail\_proxy\_ssl\_backends.diff](https://raw.github.com/druga/aeriebsd-tree/master/usr.sbin/nginx/patch-nginx_mail_proxy_ssl_backends.diff)  
I do provide neither hostnames nor starttls support in it, because the  
code  
for their support is too much invasive ☹

P.S.: The patch isn’t good enough to be included into nginx. So if  
anybody  
is going to fix it, you’re welcome.

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,247910#msg-247910)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [February 16, 2014, 6:11am UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/8 "2014-02-16T06:11:19Z")

</div>

P.S.: I think then it may be examined for inclusion into nginx, but not  
now  
in it’s current form 🙂

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,247609#msg-247609)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [September 5, 2014, 2:49am UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/9 "2014-09-05T02:49:52Z")

</div>

I’m getting errors when I try to get the diff, is it still available?  
Thanks…

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,253082#msg-253082)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [September 5, 2014, 11:49pm UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/10 "2014-09-05T23:49:38Z")

</div>

Thanks! I setup stunnel in the interim, but this will be more  
efficient.

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,253106#msg-253106)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

---

<div class="post-metadata">

**Author:** ![Flavio\_Torres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee7513/32.png) [@Flavio\_Torres](https://www.ruby-forum.com/u/Flavio_Torres)\
**Post date:** [September 5, 2014, 5:54am UTC](https://www.ruby-forum.com/t/nginx-mail-proxy-dovecot-ssl-backend/214251/11 "2014-09-05T05:54:24Z")

</div>

Yes, but got moved. Here’s the diff:  
[https://github.com/dukzcry/nginx/commit/f0af0f19ccc5e173fa4dddd3974cd05ef0b52692.diff](https://github.com/dukzcry/nginx/commit/f0af0f19ccc5e173fa4dddd3974cd05ef0b52692.diff)  
and here’s the patched tree: [GitHub - repos-holder/nginx](https://github.com/dukzcry/nginx)

Posted at Nginx Forum:

> **[Re: nginx mail proxy - dovecot ssl backend](https://forum.nginx.org/read.php?2,219069,253083#msg-253083)**
>
> \-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! Is SSL backends (dovecot) supported by nginx mail proxy ? Thank you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai
