Forum: NGINX a patch for using postfix as smtp-backend with xclient extension

Posted by Yingbo Qiu (Guest)
on 2008-03-23 18:15
Attachment: nginx-0.5.35-xclient.patch (4,95 KB)
(Received via mailing list)
Hi, Igor

  The XCLIENT command that nginx send to backend include
"LOGIN=foobar" attribute. But postfix couldn't recognise it and report
"501 5.5.4 Bad XCLIENT attribute name: LOGIN" and close connection. I
wrote this patch to resolve the issue.

  The patch add a new nginx.conf item "xclient_capabilities". Postfix
user could custom it to avoid send LOGIN attribute. It make nginx more
flexible.

  I wish it accord with nginx's coding style. :)

Regards.
Posted by Maxim Dounin (Guest)
on 2008-03-23 19:29
(Received via mailing list)
Hello!

On Mon, Mar 24, 2008 at 01:02:18AM +0800, Yingbo Qiu wrote:

>  The XCLIENT command that nginx send to backend include
>"LOGIN=foobar" attribute. But postfix couldn't recognise it and report
>"501 5.5.4 Bad XCLIENT attribute name: LOGIN" and close connection. I
>wrote this patch to resolve the issue.

Yes, xclient in nginx was designed to be used with postfix
extended to support LOGIN= in xclient. Patching postfix to support
this is trivial.

>  The patch add a new nginx.conf item "xclient_capabilities". Postfix
>user could custom it to avoid send LOGIN attribute. It make nginx more
>flexible.

Your patch introduces additional cycle and a bunch of unneded
strcmp()'s in main execution path so I don't think it will be
accepted.  At least it should be converted to do all strcmp()'s at
configuration phase.

But actually I think using much more simple solution with e.g.

     xclient <on|off|compat>;

will do.

Anyway, thank you for your work.

Maxim Dounin
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.