Make message ID unique for multiple calls in same process
authorJamie Cameron <jcameron@webmin.com>
Thu, 27 Nov 2008 23:26:01 +0000 (23:26 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 27 Nov 2008 23:26:01 +0000 (23:26 +0000)
mailboxes/boxes-lib.pl

index f823346..dcefbd3 100644 (file)
@@ -943,8 +943,10 @@ foreach $h (@{$_[0]->{'headers'}}) {
        }
 if (!$msg_id) {
        # Add a message-id header if missing
-       print MAIL "Message-Id: <",time().".".$$."\@".
-                                 &get_system_hostname(),">",$eol;
+       $main::mailboxes_message_id_count++;
+       print MAIL "Message-Id: <",time().".".$$.".".
+                               $main::mailboxes_message_id_count."\@".
+                               &get_system_hostname(),">",$eol;
        }
 
 # Work out first attachment content type