--- qmail-smtpd.c.orig Tue Aug 1 15:10:29 2000 +++ qmail-smtpd.c Tue Aug 1 14:43:55 2000 @@ -378,7 +378,7 @@ qp = qmail_qp(&qqt); out("354 go ahead\r\n"); - received(&qqt,"SMTP",local,remoteip,remotehost,remoteinfo,fakehelo); + received(&qqt,"SMTP",local,remoteip,remotehost,remoteinfo,fakehelo,rcptto.s); blast(&hops); hops = (hops >= MAXHOPS); if (hops) qmail_fail(&qqt); --- received.c.orig Tue Aug 1 15:10:07 2000 +++ received.c Tue Aug 1 14:50:53 2000 @@ -37,7 +37,7 @@ /* "Received: from relay1.uu.net (HELO uunet.uu.net) (7@192.48.96.5)\n" */ /* " by silverton.berkeley.edu with SMTP; 26 Sep 1995 04:46:54 -0000\n" */ -void received(qqt,protocol,local,remoteip,remotehost,remoteinfo,helo) +void received(qqt,protocol,local,remoteip,remotehost,remoteinfo,helo,rcptto) struct qmail *qqt; char *protocol; char *local; @@ -45,6 +45,7 @@ char *remotehost; char *remoteinfo; char *helo; +char *rcptto; { struct datetime dt; @@ -65,7 +66,16 @@ safeput(qqt,local); qmail_puts(qqt," with "); qmail_puts(qqt,protocol); - qmail_puts(qqt,"; "); + /* sendmail compatibility hack: received by ... with ... for ; */ + qmail_puts(qqt,"\n for <"); + qmail_puts(qqt, rcptto + 1); + qmail_puts(qqt,">; "); datetime_tai(&dt,now()); qmail_put(qqt,buf,date822fmt(buf,&dt)); + /* fixes some really broken stuff like first generation ExtendNet boxes */ +/* uncomment if you want to support this crap + qmail_puts(qqt, "X-Envelope-To: "); + qmail_puts(qqt,rcptto + 1); + qmail_puts(qqt, "\n"); +*/ }