comparison src/context.cpp @ 101:6ac7ba4a8312 stable-5-9

fix <> passed as <<>> to verification hosts
author carl
date Mon, 26 Sep 2005 20:40:29 -0700
parents 63e8633abc34
children aa07452e641b
comparison
equal deleted inserted replaced
100:63e8633abc34 101:6ac7ba4a8312
185 return rc; 185 return rc;
186 } 186 }
187 187
188 188
189 int SMTP::from(char *f) { 189 int SMTP::from(char *f) {
190 // the mail from address was originally passed in from sendmail enclosed in
191 // <>. to_lower_string() removed the <> and converted the rest to lowercase,
192 // except in the case of an empty return path, which was left as the two
193 // character string <>.
190 if (strncmp(efrom, f, maxlen)) { 194 if (strncmp(efrom, f, maxlen)) {
191 rset(); 195 rset();
192 strncpy(efrom, f, maxlen); 196 strncpy(efrom, f, maxlen);
193 init(); 197 init();
194 append("MAIL FROM:<"); 198 append("MAIL FROM:<");
195 append(f); 199 if (*f != '<') append(f);
196 append(">"); 200 append(">");
197 return cmd(NULL); 201 return cmd(NULL);
198 } 202 }
199 return 250; // pretend it worked 203 return 250; // pretend it worked
200 } 204 }