Dewayne,
Thanks a lot for this patch. I'll hang on to it any probably do some experimenting on the side.
The problem with this approach is that our AD/DC/Mail-server is in an office and I have to be
concerned about future sysadmins as well as future sendmail updates. I am very reluctant to
patch OS software, especially if other solutions are available.
At worst, I can drop back and remove winbind from nsswitch.conf on the AD and put the user back
in /etc/passwd. That's how I've been running for nearly 2 years and it's worked just fine. I
was hoping to eliminate dual-entries for users in AD and passwd, but that's easier for someone
to sort out than a patch.
What I'd really like is a sendmail rule that would simply strip the "HPRS\" bit off the front
of the username token. It seems like a rather simple rule (if there are such things in
sendmail!), but I've found nothing so far and no feedback from expert sites. I could put this
rule in my .mc file so it would be both documented and be independent of sendmail program updates.
I subscribed to the
sendmail...@lists.sendmail.org maillist but the moderator hasn't even
"approved" my initial post yet. It might be a dead list.
Any ideas on resources for this?
--Mark
-----Original Message-----
> From: Dewayne Geraghty <
dewayne...@gmail.com>
> Date: Sat, 23 Jul 2016 18:39:32 +1000
> Subject: Re: [Samba] sendmail getting domain\user as email userId [formerly:
> How to GSSAPI/Kerberos authenticate with Dovecot]
> To: Mark Foley <
mfo...@ohprs.org>
>
> Mark,
> We've had this problem with sendmail in 2014. A friend John Marshall
> addressed this on FreeBSD. I've included a patch that may assist. The
> patch applies cleanly, though with the cut/paste between my ssh session and
> this windows client, the spacing may be incorrect.
>
> This is a known to sendmail bug, but they were unprepared to rectify.
>
> --- sendmail/srvrsmtp.c.orig 2013-11-23 07:51:56.000000000 +1100
> +++ sendmail/srvrsmtp.c 2014-01-27 17:26:30.000000000 +1100
> @@ -84,7 +84,7 @@
> # define RESET_SASLCONN \
> do \
> { \
> - result = reset_saslconn(&conn, AuthRealm, remoteip, \
> + result = reset_saslconn(&conn, hostname, remoteip, \
> localip, auth_id, &ext_ssf); \
> if (result != SASL_OK) \
> sasl_ok = false; \
> @@ -761,8 +761,8 @@
> if (sasl_ok)
> {
> # if SASL >= 20000
> - result = sasl_server_new("smtp", AuthRealm, NULL, NULL,
> NULL,
> - NULL, 0, &conn);
> + result = sasl_server_new("smtp", hostname, AuthRealm, NULL,
> + NULL, NULL, 0, &conn);
> # elif SASL > 10505
> /* use empty realm: only works in SASL > 1.5.5 */
> result = sasl_server_new("smtp", AuthRealm, "", NULL, 0,
> &conn);
> @@ -5027,7 +5027,7 @@
>
> sasl_dispose(conn);
> # if SASL >= 20000
> - result = sasl_server_new("smtp", hostname, NULL, NULL, NULL,
> + result = sasl_server_new("smtp", hostname, AuthRealm, NULL, NULL,
> NULL, 0, conn);
> # elif SASL > 10505
> /* use empty realm: only works in SASL > 1.5.5 */
> --
> *Disclaimer:*
>
>
>
> *As implied by email protocols, the information in this message is not
> confidential. Any intermediary or recipient may inspect, modify (add),
> copy, forward, reply to, delete, or filter email for any purpose unless
> said parties are otherwise obligated. Nothing in this message may be
> legally binding without cryptographic evidence of its integrity and/or
> confidentiality.*