<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.nginx.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.nginx.org/index.php?title=ImapProxyExample&amp;feed=atom&amp;action=history</id>
		<title>ImapProxyExample - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.nginx.org/index.php?title=ImapProxyExample&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=ImapProxyExample&amp;action=history"/>
		<updated>2013-06-19T15:42:46Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=ImapProxyExample&amp;diff=45&amp;oldid=prev</id>
		<title>Uidvalidity at 05:24, 12 October 2011</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=ImapProxyExample&amp;diff=45&amp;oldid=prev"/>
				<updated>2011-10-12T05:24:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''NOTE:''' if using nginx on linux, you need to run '''./configure''' with the mail options:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''./configure --with-mail --with-mail_ssl_module'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
(also consider using '''--without-http''' if you don't need http proxying)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For basic IMAP proxy, nginx.conf should look like this:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
mail {&lt;br /&gt;
  #auth_http  unix:/path/socket:/cgi-bin/auth;&lt;br /&gt;
  auth_http  localhost:9000/cgi-bin/auth;&lt;br /&gt;
&lt;br /&gt;
  proxy  on;&lt;br /&gt;
&lt;br /&gt;
  imap_capabilities  &amp;quot;IMAP4rev1&amp;quot;  &amp;quot;UIDPLUS&amp;quot;; ## default&lt;br /&gt;
  server {&lt;br /&gt;
    listen     143;&lt;br /&gt;
    protocol   imap;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
## uncomment to enable POP3 proxy&lt;br /&gt;
#  pop3_capabilities  &amp;quot;TOP&amp;quot;  &amp;quot;USER&amp;quot;;&lt;br /&gt;
#  server {&lt;br /&gt;
#    listen     110;&lt;br /&gt;
#    protocol   pop3;&lt;br /&gt;
#  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To configure IMAP proxy with STARTTLS support, use nginx.conf like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
mail {&lt;br /&gt;
  #auth_http  unix:/path/socket:/cgi-bin/auth;&lt;br /&gt;
  auth_http  localhost:9000/cgi-bin/auth;&lt;br /&gt;
&lt;br /&gt;
  proxy     on;&lt;br /&gt;
  starttls  on; ## enable STARTTLS for all mail servers&lt;br /&gt;
&lt;br /&gt;
  # The SSL part can be put in a separate configuration file,&lt;br /&gt;
  # e.g., in the case of an SSL offloader / caching proxy.&lt;br /&gt;
  # In that case, only the ssl_certificate* needs to be set here (or in server block.)&lt;br /&gt;
  # The config assumes certificates in /etc/nginx/ssl/ and &lt;br /&gt;
  # private keys in /etc/nginx/ssl/private/&lt;br /&gt;
  ssl                        on;&lt;br /&gt;
  ssl_prefer_server_ciphers  on;&lt;br /&gt;
  ssl_protocols              TLSv1 SSLv3;&lt;br /&gt;
  ssl_ciphers                HIGH:!ADH:!MD5:@STRENGTH;&lt;br /&gt;
  ssl_session_cache          shared:TLSSL:16m;&lt;br /&gt;
  ssl_session_timeout        10m;&lt;br /&gt;
  ## default SSL cert. Each host should have its own.&lt;br /&gt;
  ssl_certificate            ssl/wildcard.crt;&lt;br /&gt;
  ssl_certificate_key        ssl/private/wildcard.key;&lt;br /&gt;
&lt;br /&gt;
  ## default, STARTTLS is appended because of starttls directive above&lt;br /&gt;
  imap_capabilities  &amp;quot;IMAP4rev1&amp;quot;  &amp;quot;UIDPLUS&amp;quot;; &lt;br /&gt;
  server {&lt;br /&gt;
    listen       143;&lt;br /&gt;
    protocol     imap;&lt;br /&gt;
    server_name  mx.example.org;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
## uncomment to enable POP3 proxy&lt;br /&gt;
#  pop3_capabilities  &amp;quot;TOP&amp;quot;  &amp;quot;USER&amp;quot;;&lt;br /&gt;
#  server {&lt;br /&gt;
#    listen     110;&lt;br /&gt;
#    protocol   pop3;&lt;br /&gt;
#  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;/div&gt;</summary>
		<author><name>Uidvalidity</name></author>	</entry>

	</feed>