* message, we want to BYPASS saving the sender's copy (because there
* is no local sender; it would otherwise go to the Trashcan).
*/
- if ((!CC->internal_pgm) || (strlen(recipient) == 0)) {
+ if ((!CC->internal_pgm) || (recps == NULL)) {
if (CtdlSaveMsgPointerInRoom(actual_rm, newmsgid, 0) != 0) {
lprintf(3, "ERROR saving message pointer!\n");
CtdlSaveMsgPointerInRoom(AIDEROOM, newmsgid, 0);
extract(recipient, recps->recp_local, i);
lprintf(9, "Delivering private local mail to <%s>\n",
recipient);
- if (getuser(&userbuf, recipient) == 0) {
+ if (!strcasecmp(recipient, "sysop")) {
+ CtdlSaveMsgPointerInRoom(AIDEROOM, newmsgid, 0);
+ }
+ else if (getuser(&userbuf, recipient) == 0) {
MailboxName(actual_rm, &userbuf, MAILROOM);
CtdlSaveMsgPointerInRoom(actual_rm, newmsgid, 0);
}
else {
lprintf(9, "No user <%s>\n", recipient);
+ CtdlSaveMsgPointerInRoom(AIDEROOM, newmsgid, 0);
}
}
char newusername[SIZ];
struct CtdlMessage *msg;
int anonymous = 0;
- int mtsflag = 0;
char errmsg[SIZ];
int err = 0;
struct recptypes *valid = NULL;
return;
}
- if (!strcasecmp(recp, "sysop")) {
- mtsflag = 1;
- }
}
/* Is this a room which has anonymous-only or anonymous-option? */
CC->quickroom.QRname, anonymous, format_type, masquerade_as);
if (msg != NULL) {
- CtdlSubmitMsg(msg, valid, (mtsflag ? AIDEROOM : "") );
+ CtdlSubmitMsg(msg, valid, "");
CtdlFreeMessage(msg);
}
CC->fake_postname[0] = '\0';
if (mailfrom[i] == '<') lp = i;
if (mailfrom[i] == '>') rp = i;
}
- if ((lp>=0)&&(rp>lp)) {
+ if ( (lp>=0) && (rp>lp) ) {
mailfrom[rp] = 0;
strcpy(mailfrom, &mailfrom[lp]);
}
} while (scan_done == 0);
if (strlen(mailfrom)==0) strcpy(mailfrom, "someone@somewhere.org");
-
/* Figure out what mail exchanger host we have to connect to */
num_mxhosts = getmx(mxhosts, node);
lprintf(9, "Number of MX hosts for <%s> is %d\n", node, num_mxhosts);
if (successful_bounce == 0) {
CtdlSubmitMsg(bmsg, NULL, AIDEROOM);
}
+
+ /* Free up the memory we used */
+ if (valid != NULL) {
+ phree(valid);
+ }
}
CtdlFreeMessage(bmsg);