From d67c973726ac0093d30f49af8ea59276c06fdcc5 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 8 Jun 1999 18:30:46 +0000 Subject: [PATCH] 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. --- qmail-send.c | 6 ++++++ 1 file changed, 6 insertions(+) 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)) -- 2.11.0