jeff geng: > Wietse: > > Happy new year :) > > We use niginx's smtp function to redirect mail to postfix server. But in > postfix, XCLIENT command can't support the LOGIN paremeter. > Severial months ago, I write a patch for postfix-2.5.3. Now nginx official > website also supply a patch for this situation as followed: > http://www.citrin.ru/nginx:xclient-login-patch. In additional, my patch also > support xforward function. > > We will be very grateful to you if you can accept these patch (nginx > official patch or our patch). Of course, you'd better add this function to > your new version. > After that We can use new version directly, other than patch the original > source manually.
Can you explain the following: + int got_login =0; ... + got_login = 1; Why is the got_login variable introduced? It is a write-only variable. #ifdef USE_SASL_AUTH if (var_smtpd_sasl_enable) ! if (got_proto == 0) ! smtpd_sasl_auth_reset(state); #endif Why test for the PROTO attribute here? What happens when the client sends LOGIN=username before PROTO=SMTP? As documented XCLIENT does not require that attributes are sent in a specific order. + UPDATE_STR(state->sasl_username, attr_value); + printable(state->sasl_username, '?'); + UPDATE_STR(state->sasl_method, "xclient"); Why not use the real authentication mechanism? Wietse