diff --git a/exec/load/mailproc_util.js b/exec/load/mailproc_util.js
index b98c1eacf00515ee810f308e5412a2a8aaf58bf0..3b828435a95193ed9921999cc86ee77c69b429a7 100644
--- a/exec/load/mailproc_util.js
+++ b/exec/load/mailproc_util.js
@@ -20,7 +20,7 @@ function parse_msg_header(msgtxt)
 	for(i in msgtxt) {
 		if(msgtxt[i].length==0)	// Header terminator
 			break;
-		var match = msgtxt[i].match(/(\S+)\s*:\s*(.*)/);
+		var match = msgtxt[i].match(/^(\S+)\s*:\s*(.*)/);
 		if(match)
 			hdr[last_field=match[1].toLowerCase()]=match[2];
 		else if(last_field)		// Folded header field