It isn't possible to relay to an exchange server and authenticate to it at the same time if your client/server actually supports the standard properly.
Postfix mailing list post.We're used to deliberately breaking shit for the sake of microsoft interoperability, so why not do the same thing here? I've edited postfix to pass on the AUTH sender and it works locally on my mac. A test email to gmail works as it should.
Postfix defines the SMTP protocol in src/smtp/smtp_proto.c. Where it says:
/*
* We authenticate the local MTA only, but not the sender.
*/
#ifdef USE_SASL_AUTH
if (var_smtp_sasl_enable
&& (session->features & SMTP_FEATURE_AUTH))
vstring_strcat(next_command, " AUTH=<>");
#endif
Replace that with (session->scratch is the reformatted sender string at this point in postfix 2.5.5):
#ifdef USE_SASL_AUTH
if (var_smtp_sasl_enable
&& (session->features & SMTP_FEATURE_AUTH)) {
vstring_sprintf_append(next_command, " AUTH=<%s>", vstring_str(session->scratch));
}
#endif

No comments:
Post a Comment