[12553] | 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> |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | This patch will fix the "X-auth..." warnings from the newer |
---|
| 10 | Sendmails (8.X) while continuing to work with the old sendmails. |
---|
| 11 | |
---|
| 12 | I think the following patch will make everyone happy. |
---|
| 13 | |
---|
| 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). |
---|
| 18 | |
---|
| 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. |
---|
| 25 | |
---|
| 26 | 3) No new configuration options. |
---|
| 27 | |
---|
| 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. |
---|
| 35 | |
---|
| 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. |
---|
| 39 | |
---|
| 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. |
---|
| 44 | |
---|
| 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. |
---|
| 51 | |
---|
| 52 | mh-config (if necessary), make, make inst-all. |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | I hope this helps people. |
---|
| 56 | |
---|
| 57 | /dcn |
---|
| 58 | |
---|
| 59 | Dave Nelson |
---|
| 60 | Academic Computer Services |
---|
| 61 | DePaul University, Chicago |
---|
| 62 | |
---|
| 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; |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | ! if (client && *client) { |
---|
| 71 | ! doingEHLO = 1; |
---|
| 72 | ! result = smtalk (SM_HELO, "EHLO %s", client); |
---|
| 73 | ! doingEHLO = 0; |
---|
| 74 | |
---|
| 75 | ! if (500 <= result && result <= 599) |
---|
| 76 | result = smtalk (SM_HELO, "HELO %s", client); |
---|
| 77 | ! |
---|
| 78 | ! switch (result) { |
---|
| 79 | case 250: |
---|
| 80 | ! break; |
---|
| 81 | |
---|
| 82 | default: |
---|
| 83 | (void) sm_end (NOTOK); |
---|
| 84 | return RP_RPLY; |
---|
| 85 | } |
---|
| 86 | } |
---|
| 87 | |
---|
| 88 | #ifndef ZMAILER |
---|
| 89 | if (onex) |
---|
| 90 | --- 239,276 ---- |
---|
| 91 | return RP_RPLY; |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | ! doingEHLO = 1; |
---|
| 95 | ! result = smtalk (SM_HELO, "EHLO %s", |
---|
| 96 | ! (client && *client) ? client : LocalName()); |
---|
| 97 | ! doingEHLO = 0; |
---|
| 98 | ! |
---|
| 99 | ! switch (result) |
---|
| 100 | ! { |
---|
| 101 | ! case 250: |
---|
| 102 | ! break; |
---|
| 103 | |
---|
| 104 | ! default: |
---|
| 105 | ! if (!(500 <= result && result <= 599)) |
---|
| 106 | ! { |
---|
| 107 | ! (void) sm_end (NOTOK); |
---|
| 108 | ! return RP_RPLY; |
---|
| 109 | ! } |
---|
| 110 | ! |
---|
| 111 | ! if (client && *client) |
---|
| 112 | ! { |
---|
| 113 | result = smtalk (SM_HELO, "HELO %s", client); |
---|
| 114 | ! switch (result) |
---|
| 115 | ! { |
---|
| 116 | case 250: |
---|
| 117 | ! break; |
---|
| 118 | |
---|
| 119 | default: |
---|
| 120 | (void) sm_end (NOTOK); |
---|
| 121 | return RP_RPLY; |
---|
| 122 | + } |
---|
| 123 | } |
---|
| 124 | } |
---|
| 125 | + |
---|
| 126 | |
---|
| 127 | #ifndef ZMAILER |
---|
| 128 | if (onex) |
---|
| 129 | *************** |
---|
| 130 | *** 357,380 **** |
---|
| 131 | return RP_RPLY; |
---|
| 132 | } |
---|
| 133 | |
---|
| 134 | ! if (client && *client) { |
---|
| 135 | ! doingEHLO = 1; |
---|
| 136 | ! result = smtalk (SM_HELO, "EHLO %s", client); |
---|
| 137 | ! doingEHLO = 0; |
---|
| 138 | |
---|
| 139 | ! if (500 <= result && result <= 599) |
---|
| 140 | result = smtalk (SM_HELO, "HELO %s", client); |
---|
| 141 | ! |
---|
| 142 | ! switch (result) { |
---|
| 143 | ! case 250: |
---|
| 144 | break; |
---|
| 145 | |
---|
| 146 | ! default: |
---|
| 147 | (void) sm_end (NOTOK); |
---|
| 148 | return RP_RPLY; |
---|
| 149 | } |
---|
| 150 | } |
---|
| 151 | ! |
---|
| 152 | send_options: ; |
---|
| 153 | if (watch && EHLOset ("XVRB")) |
---|
| 154 | (void) smtalk (SM_HELO, "VERB on"); |
---|
| 155 | --- 372,409 ---- |
---|
| 156 | return RP_RPLY; |
---|
| 157 | } |
---|
| 158 | |
---|
| 159 | ! doingEHLO = 1; |
---|
| 160 | ! result = smtalk (SM_HELO, "EHLO %s", |
---|
| 161 | ! (client && *client) ? client : LocalName()); |
---|
| 162 | ! doingEHLO = 0; |
---|
| 163 | ! |
---|
| 164 | ! switch (result) |
---|
| 165 | ! { |
---|
| 166 | ! case 250: |
---|
| 167 | ! break; |
---|
| 168 | ! |
---|
| 169 | ! default: |
---|
| 170 | ! if (!(500 <= result && result <= 599)) |
---|
| 171 | ! { |
---|
| 172 | ! (void) sm_end (NOTOK); |
---|
| 173 | ! return RP_RPLY; |
---|
| 174 | ! } |
---|
| 175 | |
---|
| 176 | ! if (client && *client) |
---|
| 177 | ! { |
---|
| 178 | result = smtalk (SM_HELO, "HELO %s", client); |
---|
| 179 | ! switch (result) |
---|
| 180 | ! { |
---|
| 181 | ! case 250: |
---|
| 182 | break; |
---|
| 183 | |
---|
| 184 | ! default: |
---|
| 185 | (void) sm_end (NOTOK); |
---|
| 186 | return RP_RPLY; |
---|
| 187 | + } |
---|
| 188 | } |
---|
| 189 | } |
---|
| 190 | ! |
---|
| 191 | send_options: ; |
---|
| 192 | if (watch && EHLOset ("XVRB")) |
---|
| 193 | (void) smtalk (SM_HELO, "VERB on"); |
---|