If I'm not wrong, I noticed that if I send a message telnetting to port 
25 and add a "Message_Id:" header to the message I'm sending, this 
header is retained by xmail: when I then receive the message, it 
contains the same Message_Id header I inserted. Xmail does not replace 
it with a new Message_Id header.
That's good for me because I need to log this message_id into the smtp log.

I went to the source code, looking for a way to add a column to the smtp 
log (I'm not skilled in c++).
I think I know how to add a column to the smtp log file, maybe by 
changing this method in SMTPSvr.cpp:


==========================================================================
static int SMTPLogSession(SMTPSession & SMTPS, char const *pszSender,
              char const *pszRecipient, char const *pszStatus,
              unsigned long ulMsgSize)
{

    char szTime[256] = "";

    MscGetTimeNbrString(szTime, sizeof(szTime) - 1);

    RLCK_HANDLE hResLock = RLckLockEX(SVR_LOGS_DIR SYS_SLASH_STR 
SMTP_LOG_FILE);

    if (hResLock == INVALID_RLCK_HANDLE)
        return (ErrGetErrorCode());

    char szIP[128] = "???.???.???.???";

    MscFileLog(SMTP_LOG_FILE, "\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%s\""
           "\t\"%lu\""
           "\t\"%s\""
           "\n", SMTPS.szSvrFQDN, SMTPS.szSvrDomain, 
SysInetNToA(SMTPS.PeerInfo, szIP),
           szTime, SMTPS.szClientDomain, SMTPS.szDestDomain, pszSender, 
pszRecipient,
           SMTPS.szMessageID, pszStatus, SMTPS.szLogonUser, ulMsgSize,
           SMTPS.szClientFQDN);

    RLckUnlockEX(hResLock);

    return (0);

}
==========================================================================


But I was not able to understand if, from inside this method, the 
Message_Id header is available for logging.
Is the Message_Id header available here? How I can retrieve it?

Thank You very much.

-- 
Luca Giuranna


-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to