StrBuf *wefw = NULL;
StrBuf *msgn = NULL;
StrBuf *from = NULL;
- StrBuf *node = NULL;
StrBuf *rfca = NULL;
StrBuf *rcpt = NULL;
StrBuf *cccc = NULL;
StrBuf *replyto = NULL;
StrBuf *nvto = NULL;
+ int message_originated_locally = 0;
serv_printf("MSG0 %ld|1", replying_to);
StrBuf_ServGetln(Line);
}
break;
+ case eIsLocal: {
+ message_originated_locally = 1;
+ break;
+ }
+
case eWeferences:
{
int rrtok;
}
break;
}
-
case eRecipient:
rcpt = NewStrBufPlain(ChrPtr(Line) + 5, StrLength(Line) - 5);
break;
-
-
case eCarbonCopY:
cccc = NewStrBufPlain(ChrPtr(Line) + 5, StrLength(Line) - 5);
break;
-
-
- case eNodeName:
- node = NewStrBufPlain(ChrPtr(Line) + 5, StrLength(Line) - 5);
- break;
case eReplyTo:
replyto = NewStrBufPlain(ChrPtr(Line) + 5, StrLength(Line) - 5);
break;
putbstr("nvto", nvto);
break;
case eXclusivID:
- case eHumanNode:
case eJournal:
case eListID:
case eMesageText:
- case eOriginalRoom:
case eMessagePath:
case eSpecialField:
case eTimestamp:
case eFormatType:
case eMessagePart:
case eSubFolder:
- case ePevious:
case eLastHeader:
break;
*/
if ((ReplyMode == eReply) || (ReplyMode == eReplyAll)) {
StrBuf *to_rcpt;
+
if ((StrLength(replyto) > 0) && (ReplyMode == eReplyAll)) {
to_rcpt = NewStrBuf();
StrBufAppendBuf(to_rcpt, replyto, 0);
}
- else if (StrLength(rfca) > 0) {
+
+ else if ( (StrLength(rfca) > 0) && (message_originated_locally == 0) ) {
to_rcpt = NewStrBuf();
StrBufAppendBuf(to_rcpt, from, 0);
StrBufAppendBufPlain(to_rcpt, HKEY(" <"), 0);
StrBufAppendBuf(to_rcpt, rfca, 0);
StrBufAppendBufPlain(to_rcpt, HKEY(">"), 0);
}
+
else {
to_rcpt = from;
from = NULL;
- if ( (StrLength(node) > 0)
- && (strcasecmp(ChrPtr(node), ChrPtr(WCC->serv_info->serv_nodename)))
- ) {
- StrBufAppendBufPlain(to_rcpt, HKEY(" @ "), 0);
- StrBufAppendBuf(to_rcpt, node, 0);
- }
}
PutBstr(HKEY("recp"), to_rcpt);
}
PutBstr(HKEY("cc"), cc_rcpt);
}
}
+
+ // FOOFOO
+ syslog(LOG_DEBUG, "wefw = %s", ChrPtr(wefw));
+ syslog(LOG_DEBUG, "msgn = %s", ChrPtr(msgn));
+ syslog(LOG_DEBUG, "from = %s", ChrPtr(from));
+ syslog(LOG_DEBUG, "rfca = %s", ChrPtr(rfca));
+ syslog(LOG_DEBUG, "rcpt = %s", ChrPtr(rcpt));
+ syslog(LOG_DEBUG, "cccc = %s", ChrPtr(cccc));
+ syslog(LOG_DEBUG, "replyto = %s", ChrPtr(replyto));
+ syslog(LOG_DEBUG, "nvto = %s", ChrPtr(nvto));
+ syslog(LOG_DEBUG, "local = %d" , message_originated_locally);
+
FreeStrBuf(&wefw);
FreeStrBuf(&msgn);
FreeStrBuf(&from);
- FreeStrBuf(&node);
FreeStrBuf(&rfca);
FreeStrBuf(&rcpt);
FreeStrBuf(&cccc);