Commit 082c1b5e authored by rswindell's avatar rswindell
Browse files

Generate an RFC822 (generic) Message-ID header field when importing msgs

(using -i). These aren't quite as good as the IDs we can generate when we
have access to the BBS configuration (scfg_t), but it's decently unique and
parent 71cf01c7
......@@ -165,6 +165,32 @@ ulong lf_expand(uchar* inbuf, uchar* outbuf)
char* gen_msgid(smb_t* smb, smbmsg_t* msg, char* msgid, size_t maxlen)
char* host = getenv(
#if defined(_WIN32)
if(host == NULL)
host = getenv(
#if defined(_WIN32)
safe_snprintf(msgid, maxlen
,smb->status.last_msg + 1
return msgid;
/* Adds a new message to the message base */
......@@ -325,6 +351,8 @@ void postmsg(char type, char* to, char* to_number, char* to_address,
smb_hfield_str(&msg, RFC822MSGID, gen_msgid(&smb, &msg, str, sizeof(str)-1));
if(mode&NOCRC || smb.status.max_crcs==0) /* no CRC checking means no body text dupe checking */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment