Hi,
Did you look at authorizedAddresses [1] in smtpserver-template.xml ?
It allows to configure the smptserver to accept only some originating
addresses. Does it completely map your requirements (it sounds like, but
not sure from your mail).
Thx, Eric
[1]
<!-- Uncomment this if you want to authorize specific
addresses/networks.
If you use SMTP AUTH, addresses that match those
specified here will
be permitted to relay without SMTP AUTH. If you do not
use SMTP
AUTH, and you specify addreses here, then only addresses
that match
those specified will be permitted to relay.
Addresses may be specified as a an IP address or domain
name, with an
optional netmask, e.g.,
127.*, 127.0.0.0/8, 127.0.0.0/255.0.0.0, and localhost/8
are all the same
See also the RemoteAddrNotInNetwork matcher in the
transport processor.
You would generally use one OR the other approach.
-->
<authorizedAddresses>127.0.0.0/8</authorizedAddresses>
On 29/03/2013 12:31, Martin Hewitt wrote:
Hi all,
I'm building a system that uses the James SMTP server to send and receive
messages. I intercept these messages with a custom mailet and feed them
into my system. However, when it comes to sending mail through the SMTP
server, there's a bit of difference.
My users have an email address, which is configured in a database, I have a
custom UserRepository that handles the verification of addresses. However,
because users never login to James/IMAP directly, there's no real concept
of a "password". This means I can't use conventional authentication, but I
can't close off port 25, because I won't get incoming mail, but, obviously,
I don't want to have an open SMTP relay running.
What I'm looking to do is configure my mailets such that, if a message is
destined for remote delivery (i.e. is an outgoing message) that the SMTP
server only allows such a delivery if the request originated from the same
machine that the SMTP server is running on.
I'm not sure how (or, even, if) I can get this information from the
Mailet/Matcher API - I think I'm more in Matcher territory than Mailet
territory - but the Matcher still only has access to the Mail object, and I
think I'm probably a bit lower-level than that.
Can/should I run two SMTP instances, one for incoming and one for outgoing?
Can they have different Mailet chains?
Not sure how best to achieve this!
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]