kom.smtpd
Class SMTPRequestLog

java.lang.Object
  |
  +--kom.smtpd.SMTPRequestLog

public class SMTPRequestLog
extends java.lang.Object

Collect data about an e-mail message, and summarize as a string


Field Summary
(package private)  java.lang.String from
          MAIL FROM:
(package private)  java.lang.String mboxPath
          Mailbox file path
(package private)  java.lang.String msg
          Possible error message
(package private)  java.util.Date read
          Date-time when the message was received
(package private)  long size
          Size of message
(package private)  java.lang.String to
          RCPT TO: (may be a list)
 
Constructor Summary
SMTPRequestLog()
          Start a log entry, note the current date-time
 
Method Summary
 java.lang.String getLogInfo()
          Format log entry as a string: R: [date] to receiver(s) from sender mboxPath msg
 void mailFrom(java.lang.String from)
          Save value of MAIL FROM:
 void rcptTo(java.lang.String to)
          Save (a) value of RCPT TO:
 void ready(java.lang.String msg, long size, java.lang.String mboxPath)
          Add final data to log entry
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

read

java.util.Date read
Date-time when the message was received

size

long size
Size of message

mboxPath

java.lang.String mboxPath
Mailbox file path

msg

java.lang.String msg
Possible error message

from

java.lang.String from
MAIL FROM:

to

java.lang.String to
RCPT TO: (may be a list)
Constructor Detail

SMTPRequestLog

public SMTPRequestLog()
Start a log entry, note the current date-time
Method Detail

mailFrom

public void mailFrom(java.lang.String from)
Save value of MAIL FROM:
Parameters:
from - envelope sender address

rcptTo

public void rcptTo(java.lang.String to)
Save (a) value of RCPT TO:
Parameters:
to - an envelope receiver address

ready

public void ready(java.lang.String msg,
                  long size,
                  java.lang.String mboxPath)
Add final data to log entry
Parameters:
msg - error message if non-null
size - error message if non-null
mboxPath - path of mailbox file

getLogInfo

public java.lang.String getLogInfo()
Format log entry as a string: R: [date] to receiver(s) from sender mboxPath msg