user       www www; 
worker_processes  2;
error_log  logs/error.log;
pid        logs/nginx.pid;
events {
        worker_connections  1024;
}

mail {
  auth_http  localhost:9000/cgi-bin/auth;
 
  proxy     on;
  starttls  on; ## enable STARTTLS for all mail servers
 
  
  # The config assumes certificates in /etc/nginx/ssl/ and 
  # private keys in /etc/nginx/ssl/private/
  ssl                        on;
  ssl_prefer_server_ciphers  on;
  ssl_protocols              TLSv1 SSLv3;
  ssl_ciphers                HIGH:!ADH:!MD5:@STRENGTH;
  ssl_session_cache          shared:TLSSL:16m;
  ssl_session_timeout        10m;
  ## default SSL cert. Each host should have its own.
  ssl_certificate            ssl/wildcard.crt;
  ssl_certificate_key        ssl/private/wildcard.key;
 
  ## default, STARTTLS is appended because of starttls directive above
  imap_capabilities  "IMAP4rev1"  "UIDPLUS"; 
  server {
    listen       143;
    protocol     imap;
    server_name  mx.example1.com;
  }
 
  pop3_capabilities  "TOP"  "USER";
  server {
    listen     110;
    protocol   pop3;
  }
}
http {
        include       mime.types;
        default_type  application/octet-stream;
        gzip on;
        gzip_min_length 5000;
        gzip_buffers    4 8k;
        gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
        gzip_proxied  any;
        gzip_comp_level 2;
        ignore_invalid_headers  on;
       includes sites-available/*;
}

