fprintf(out, "%sDate: %s\n", resentstr, dtimenow());
}
- strncpy(from, getusername(), sizeof(from));
+ snprintf(from, sizeof(from), "%s@%s", getusername(), LocalName());
if ((cp = getfullname()) && *cp) {
snprintf(signature, sizeof(signature), "%s <%s>", cp, from);
} else {
if (!(msgflags & MFRM)) {
fprintf(out, "%sFrom: %s\n", resentstr, signature);
} else {
- /* In case the From: header contains multiple addresses. */
+ /*
+ ** Add a Sender: header because the From: header could
+ ** be fake or contain multiple addresses.
+ */
fprintf(out, "%sSender: %s\n", resentstr, from);
}
if (!(msgflags & MVIS)) {
- fprintf(out, "%sBcc: Blind Distribution List: ;\n", resentstr);
+ fprintf(out, "%sBcc: undisclosed-recipients:;\n", resentstr);
}
if (badmsg) {
unlink(tmpfil);
process_bccs(char *origmsg)
{
char *bccdraft = NULL;
- char buf[BUFSIZ];
struct mailname *mp = NULL;
FILE *out = NULL;
fprintf(out, "------------\n");
fclose(out);
- snprintf(buf, sizeof buf, "send %s", bccdraft);
- if (system(buf) != 0) {
+ if (execprogl("send", "send", bccdraft, (char *)NULL) != 0) {
admonish(invo_name, "Problems to send Bcc to %s",
mp->m_text);
unlink(bccdraft);