Serge Knystautas wrote:
I got the proposal for SMTPACL and generally think it's very sound. I like the idea of using the mailet API, with certain restrictions.

There are two things I would suggest changing:
1. The name. ACL doesn't make sense as this isn't a list of anything. This is specific to SMTP, and in fact I might make it a bit more specific to SMTP...
2. The class/state structure. You need to be sure that both mailets AND matchers are aware that this is during an SMTP transaction and we do not have a MimeMessage. So I would do two changes:
why? you just supply Mail implementation to matcher and this Mail implementation is dynamically initialized during smtp dialog.
think of the following:
you can get content of message only after server has sent data after DATA command
you can get sender right after MAIL FROM command
so if you matcher operates on data but admin has put it after rcpt it will just think mail has no content it wont break and it will be compatible with mailet api.
the greatest advantage of such an architecture is compatibility with mailet api. you dont have to rewrite _anything_ in you matchers to use matchers in smtpacl. code reuse rules! :)
as for SMTPResult it is yet another abstract mailet again compatible with mailet api. this type of mailets are handled by SMTPHandler during smtp acl processing.


As for name (SMTPACL) this name was first mentioned in Exim mailer so i decided to keep it anyway it _is_ a list (L) to control(C) access(A) to services of SMTPHandler. But I'm open to name change if you think it is wrong. For admins acl is a good hint. you have acls in cisco routers to control who is allowed to connect to this or that service.

a. class-wise, make an interface (probably empty interface) that declares that this matcher and mailet can be used in the <rcpt> tag, i.e., they don't care about the MimeMessage.

b. state-wise, just use the existing state/errorMessage fields. Instead of SMTPAccept, you just leave getState() as Mail.DEFAULT. Instead of SMTPReject, you do setState(Mail.ERROR) and setErrorMessage("550 cannot find MX for your domain").



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



Reply via email to