From: Mark Wooding Date: Tue, 8 Jun 1999 18:30:46 +0000 (+0000) Subject: qmail-send: Add message-id to bounce messages. X-Git-Tag: mdw/1.03-2~2^2 X-Git-Url: https://git.distorted.org.uk/~mdw/qmail/commitdiff_plain/d67c973726ac0093d30f49af8ea59276c06fdcc5 qmail-send: Add message-id to bounce messages. RFC1123 says that message-ids are optional, but SAUCE, for example, objects to messages without them. Avoid upsetting SAUCE. --- diff --git a/qmail-send.c b/qmail-send.c index c31b522..6ad0778 100644 --- a/qmail-send.c +++ b/qmail-send.c @@ -55,6 +55,7 @@ stralloc bouncefrom = {0}; stralloc bouncehost = {0}; stralloc doublebounceto = {0}; stralloc doublebouncehost = {0}; +stralloc control_idhost = {0}; char strnum2[FMT_ULONG]; char strnum3[FMT_ULONG]; @@ -694,6 +695,9 @@ unsigned long id; while (!newfield_datemake(now())) nomem(); qmail_put(&qqt,newfield_date.s,newfield_date.len); + while (!newfield_msgidmake(control_idhost.s,control_idhost.len,now())) + nomem(); + qmail_put(&qqt,newfield_msgid.s,newfield_msgid.len); qmail_puts(&qqt,"From: "); while (!quote("ed,&bouncefrom)) nomem(); qmail_put(&qqt,quoted.s,quoted.len); @@ -1453,6 +1457,8 @@ int getcontrols() { if (control_init() == -1) return 0; if (!stralloc_cats(&doublebounceto,"@")) return 0; if (!stralloc_cat(&doublebounceto,&doublebouncehost)) return 0; if (!stralloc_0(&doublebounceto)) return 0; + if (control_rldef(&control_idhost, "control/idhost",1,"idhost") != 1) + return 0; if (control_readfile(&locals,"control/locals",1) != 1) return 0; if (!constmap_init(&maplocals,locals.s,locals.len,0)) return 0; switch(control_readfile(&percenthack,"control/percenthack",0))