Welcome! Log In Create A New Profile

Advanced

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

October 19, 2013 05:36AM
Thanks Max,

I could config NGINX work for POP3,
But in SMTP, I just could do auth login only, when send a test email, an error message appear ( using telnet )
--------------------------------------------------
telnet 192.168.1.15 25

220 mailproxy ESMTP ready
auth login
334 VXNlcm5hbWU6
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
334 UGFzc3dvcmQ6
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
235 2.0.0 OK
mail from: nt.tan@abc.com.vn
250 2.1.0 Sender OK
rcpt to: nt.tan@abc.com.vn
250 2.1.5 Recipient OK
data
354 Start mail input; end with <CRLF>.<CRLF>
subject: Test mail
test
.
550 5.7.1 Client does not have permissions to send as this sender
--------------------------------------------------

I could do a test telnet from nginx to backend SMTP server. Could you help ??
Below is my config file


--------------------------------------------------
nginx.conf

user nobody;
worker_processes 1;
error_log logs/error.log info;
pid run/nginx.pid;

events {
worker_connections 1024;
multi_accept on;
}

http {
perl_modules perl/lib;
perl_require mailauth.pm;

server {
location /auth {
perl mailauth::handler;
}
}
}

mail {
auth_http 127.0.0.1:80/auth;

pop3_capabilities "TOP" "USER";
smtp_capabilities "PIPELINING" "SIZE 10240000" "VRFY" "ETRN" "ENHANCEDSTATUSCODES" "8BITMIME" "DSN";
smtp_auth LOGIN ;
xclient off;

server {
listen 110;
protocol pop3;
proxy on;
}

server {
listen 25;
protocol smtp;
proxy on;
}
}
--------------------------------------------------

mailauth.pm

package mailauth;
use nginx;

our $auth_ok;
our $protocol_ports={};
$cas="172.16.3.22";
$protocol_ports->{'pop3'}=110;
$protocol_ports->{'smtp'}=25;

sub handler {
my $r = shift;
$r->header_out("Auth-Status", "OK") ;
$r->header_out("Auth-Server", $cas );
$r->header_out("Auth-Port", $protocol_ports->{$r->header_in("Auth-Protocol")});
$r->send_http_header("text/html");
return OK;
}
1;
__END__

--------------------------------------------------


Thanks in advance
Tan.
Subject Author Posted

Config Mail Proxy for POP3/SMTP microsoft exchange

hcmnttan October 16, 2013 03:43AM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

Maxim Dounin October 16, 2013 06:48AM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

hcmnttan October 16, 2013 10:42PM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

Maxim Dounin October 17, 2013 05:08AM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

hcmnttan October 17, 2013 05:55AM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

Maxim Dounin October 17, 2013 08:04AM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

hcmnttan October 19, 2013 05:36AM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

Maxim Dounin October 19, 2013 06:06AM

Re: Config Mail Proxy for POP3/SMTP microsoft exchange

hcmnttan October 20, 2013 10:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 204
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready