mardi 25 août 2015

Usgin NGINX to forward smtp requests to postfix server.

How do i forward all the smtp requests which come to the nginx server to another postfix server in the same network. I have googled a lot , but there is not step by step configuration or a detailed procedure i can find.

mail {
      server_name <localhostname>;
      auth_http <mail.hostname.com>; #NGINX FORWARDS AUTHENTICATION REQUESTS TO THIS URL 

imap_capabilities "IMAP4rev1" "UIDPLUS" "IDLE" "LITERAL +" "QUOTA";


      pop3_auth plain apop cram-md5;
      pop3_capabilities "LAST" "TOP" "USER" "PIPELINING" "UIDL";

      smtp_auth login plain cram-md5;
      smtp_capabilities "SIZE 10485760" ENHANCEDSTATUSCODES 8BITMIME DSN;
      xclient off;

      server {
          listen 25;
          protocol smtp;
          # The RFC 2821 timeout should be 300 seconds
          timeout 300s;
      }
      server {
          listen 110;
          protocol pop3;
          proxy on;
          proxy_pass_error_message on;
      }
      server {
          listen 143;
          protocol imap;
          proxy on;
      }
      server {
          listen 587;
          protocol smtp;
          timeout 300s;
      }   }

I have this till now in my nginx.conf. it doesnt seem to hit the mail server . but i can receive traffic ( via tcpdump ) , nothing in the error.log / access.log

I just need this to forward all the smtp requests to the mailserver (postfix).




Aucun commentaire:

Enregistrer un commentaire