This content has been marked as final.
Show 1 reply
-
1. Re: Delivery of Messages to non-existent users...
gohip Jul 12, 2006 6:51 PM (in response to gohip)ehhh, yuck.
Yeah, I guess the SMTP session "Rcpt to" command, is just verifying the domain is local or relayed, and not that the user has a mailbox.
I determined, after some research, that SMTP command Vrfy, is supposed to verify the existence of the user, if the mail server supports the verify command.
So was going to call verify command, if possible, from rcpt command.
JBCS, does not, as of yet, support it(vrfy command), and may not ever as according to http://www.microsoft.com/technet/technetmag/issues/2005/11/HowITWorksSMTP/default.aspx"Many postmasters disabled this command early in the spam wars, since some spammers began using it to clean their mailing lists. Support in some form, however, is still required by the SMTP specification",
thus it may not be wise to support it.
I felt, that if I were to verify the user, during the SMTP sessions, that the place to do it, would be here, i.e. in the Vrfy command.
So I got the Vrfy command working, by
1. getting an instance of the MailBoxManger
2. parsing the supplied request, to get the address
3. converting this to an SMTPStyle Address
4. then using that address in...
5. mailbox = mailboxManager.getMailboxByAlias(address.getRawAddress()).getDefaultInFolder();
6. same as localDelivery class does it.
so it works, it does what I want, but now, I dont like it, as it neccessitates a transaction with/to database
thus ever time a message was attempted for delivery, we would have to check the database, this seems slower, than to just ditch the mail, after receiving it from the other mail server, as we are currently doing. It seems mySQL, is the only thing that really slows the mail server down, other than doing DNS lookups.
Could read a list of valid mailbox's into memory at startup, but would not be dynamic, ehh, i guess you could just add to list in memory, when adding new mailbox, but seems troublesome.
I guess I will just hold off on this aspect of spam protection for now, but if anyone would like any help getting it going, based on the aforementioned approach, i.e looking up the user, when the mail server receives "Rcpt To: " command, let me know, as I have a version working.
If anyone has any other, bigger, better, more efficient ideas, please let me know!