> 550 5.7.1 User unknown

Yeah OK.

> I think (as I said in past) that allowing full smtp reply code control at
> this level will be an error.

I don't think it is up to us to dictate how James users chose their
installations to behave.
OTOH I don't think we need to mandate configuration of responses, they
could be hard-coded in the rules or commands themselves.

> I haven't seen in your example how a command handler change the current
smtp
> context: e.g: accepting a recipient means we add the recipient to the
> collection to whom we will send the message, rejecting it means we don't
add
> it. When a DATA is received the server must check wether we accepted at
> least a recipient or not.

This is the state of the message (I haven't modeled it in any detail) and
refrence to it needs to be passed from command to command in order at the
very least to process command-order validations (No RCPT without MAIL for
e.g.)

It is the responsibility of the command handler to modify the message state
based upon the results of the rules.
So if the command is RCPT and the nested sub-command is TO the rules would
be base upon the argument which is a list of recipients and the result
would be either accept or reject the list.
Acceptance or Rejection would be returned (this is elementary object
oriented design) as an object, call it "RulesResponse", which might look
like this..

public interface RulesResponse {
    /**
     * @return true if argument passed rule
     */
    boolean getSuccess();
    /**
     * @return a constant representing one of a set of finite responses
     */
    SMTPResponseCode getSMTPResponseCode();
    /**
     * @return an object from which an extended response code can be
created
     */
    DSNResponseCode getDSNResponseCode();
    /**
     * @return the text message portion of the response
     */
    String getMessage();
    /**
     * @return indicates whether or not the response consists of more
     * than one line of output.
     */
    boolean isResponseMultiline();
}


> I wouldn't like the SMTP server to read the "code" that an handler
returns
> and decide how to behave dependently on the first char of that code.

Trust me I'm a professional, a small amount of elementary OOD will deal
with that. See above.



Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





***************************************************************************
The information in this e-mail is confidential and for use by the addressee(s) 
only. If you are not the intended recipient (or responsible for delivery of the 
message to the intended recipient) please notify us immediately on 0141 306 
2050 and delete the message from your computer. You may not copy or forward it 
or use or disclose its contents to any other person. As Internet communications 
are capable of data corruption Student Loans Company Limited does not accept 
any  responsibility for changes made to this message after it was sent. For 
this reason it may be inappropriate to rely on advice or opinions contained in 
an e-mail without obtaining written confirmation of it. Neither Student Loans 
Company Limited or the sender accepts any liability or responsibility for 
viruses as it is your responsibility to scan attachments (if any). Opinions and 
views expressed in this e-mail are those of the sender and may not reflect the 
opinions and views of The Student Loans Company Limited.

This footnote also confirms that this email message has been swept for the 
presence of computer viruses.

**************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to