MFC: An off-by-one malloc size was corrupting the installer's memory,
[dragonfly.git] / contrib / sendmail-8.14 / contrib / mh.patch
blob7b23a5b71dd4f73e35dbc65f57acb75364524e3d
1 Message-Id: <199309031900.OAA19417@ignatz.acs.depaul.edu>
2 To: bug-mh@ics.uci.edu
3 cc: mh-users@ics.uci.edu, eric@cs.berkeley.edu
4 Subject: MH-6.8.1/Sendmail 8.X (MH patch) updated
5 Date: Fri, 03 Sep 1993 14:00:46 -0500
6 From: Dave Nelson <dcn@ignatz.acs.depaul.edu>
9 This patch will fix the "X-auth..." warnings from the newer
10 Sendmails (8.X) while continuing to work with the old sendmails.
12 I think the following patch will make everyone happy.
14 1) Anybody with MH-6.8.1 can install this. It doesn't matter
15 what version of sendmail you're running. It doesn't matter
16 if you're not running sendmail (but it won't fix anything
17 for you).
19 2) No configuration file hacks. If the -client switch is
20 absent (the default), the new sendmails will get an EHLO
21 using what LocalName() returns as the hostname. On my systems,
22 this returns the FQDN. If the EHLO fails with a result between
23 500 and 599 and the -client switch is not set, we give up on
24 sending EHLO/HELO and just go deliver the mail.
26 3) No new configuration options.
28 4) Retains the undocumented -client switch. One warning: it
29 is possible using the -client switch to cause the old sendmails
30 to return "I refuse to talk to myself". You could do this under
31 the old code as well. This will happen if you claim to be the
32 same system as the sendmail you're sending to is running on.
33 That's pointless, but possible. If you do this, just like under
34 the old code, you will get an error.
36 5) If you're running a site with both old and new sendmails, you only
37 have to build MH once. The code's the same; works with them
38 both.
40 If you decide to install this, make sure that you look the patch
41 over and that you agree with what it is doing. It works for me, but I
42 can't test it on every possible combination. Make sure that it works
43 before you really install it for your users, if any. No promises.
45 To install this, save this to a file in the mts/sendmail directory.
46 Feed it to patch. Patch will ignore the non-patch stuff. You should have
47 "mts sendmail/smtp" in your configuration file. This works with old and
48 new sendmails. Using "mts sendmail" will cause the new sendmails to
49 print an "X-auth..." warning about who owns the process piping the mail
50 message. I don't know of anyway of getting rid of these.
52 mh-config (if necessary), make, make inst-all.
55 I hope this helps people.
57 /dcn
59 Dave Nelson
60 Academic Computer Services
61 DePaul University, Chicago
63 *** smail.c Fri Sep 3 11:58:05 1993
64 --- smail.c Fri Sep 3 11:57:27 1993
65 ***************
66 *** 239,261 ****
67 return RP_RPLY;
70 ! if (client && *client) {
71 ! doingEHLO = 1;
72 ! result = smtalk (SM_HELO, "EHLO %s", client);
73 ! doingEHLO = 0;
75 ! if (500 <= result && result <= 599)
76 result = smtalk (SM_HELO, "HELO %s", client);
78 ! switch (result) {
79 case 250:
80 ! break;
82 default:
83 (void) sm_end (NOTOK);
84 return RP_RPLY;
88 #ifndef ZMAILER
89 if (onex)
90 --- 239,276 ----
91 return RP_RPLY;
94 ! doingEHLO = 1;
95 ! result = smtalk (SM_HELO, "EHLO %s",
96 ! (client && *client) ? client : LocalName());
97 ! doingEHLO = 0;
99 ! switch (result)
101 ! case 250:
102 ! break;
104 ! default:
105 ! if (!(500 <= result && result <= 599))
107 ! (void) sm_end (NOTOK);
108 ! return RP_RPLY;
111 ! if (client && *client)
113 result = smtalk (SM_HELO, "HELO %s", client);
114 ! switch (result)
116 case 250:
117 ! break;
119 default:
120 (void) sm_end (NOTOK);
121 return RP_RPLY;
127 #ifndef ZMAILER
128 if (onex)
129 ***************
130 *** 357,380 ****
131 return RP_RPLY;
134 ! if (client && *client) {
135 ! doingEHLO = 1;
136 ! result = smtalk (SM_HELO, "EHLO %s", client);
137 ! doingEHLO = 0;
139 ! if (500 <= result && result <= 599)
140 result = smtalk (SM_HELO, "HELO %s", client);
142 ! switch (result) {
143 ! case 250:
144 break;
146 ! default:
147 (void) sm_end (NOTOK);
148 return RP_RPLY;
152 send_options: ;
153 if (watch && EHLOset ("XVRB"))
154 (void) smtalk (SM_HELO, "VERB on");
155 --- 372,409 ----
156 return RP_RPLY;
159 ! doingEHLO = 1;
160 ! result = smtalk (SM_HELO, "EHLO %s",
161 ! (client && *client) ? client : LocalName());
162 ! doingEHLO = 0;
164 ! switch (result)
166 ! case 250:
167 ! break;
169 ! default:
170 ! if (!(500 <= result && result <= 599))
172 ! (void) sm_end (NOTOK);
173 ! return RP_RPLY;
176 ! if (client && *client)
178 result = smtalk (SM_HELO, "HELO %s", client);
179 ! switch (result)
181 ! case 250:
182 break;
184 ! default:
185 (void) sm_end (NOTOK);
186 return RP_RPLY;
191 send_options: ;
192 if (watch && EHLOset ("XVRB"))
193 (void) smtalk (SM_HELO, "VERB on");