i have been trying to setup james as a mail exchange similar to some existing sendmail servers i have running. in a nutshell, i am looking for the equivalent of sendmail's 'SMART_HOST' capabilities ('forward all incoming mail to host X'). since i don't see anything that would indicate a way to do this configurationally, am i correct in assuming that this would be handled in james by creating a mailet that forwarded all mail (once it was determined to be addressed to a local domain) to another host that is specficied in the mailet?
http://james.apache.org/provided_mailets_2_1.html
Check out the RemoteDelivery mailet... you add the optional <gateway> parameter.
ok, i have had a chance to play with this and i believe that i misspoke slightly in my original question. by setting up a host in RemoteDelivery all mail is forwarded to that host... including *oubound* (non local) mail. that is SMART_HOST behavior (DS, not DH), but to be able to get mail back out through the same path i need the MX to also act as a 'MAIL_HUB' (DH) so that outbound mail will be delivered. here's my config on mx.myfoo.bar:
<gateway> int.myfoo.com </gateway> <gatewayPort>25</gatewayPort> SMART_HOST behavior is that all mail not destined for 'local' delivery is to be resolved and delivered as addressed. for example, assume that i have domain myfoo.com with an MX (mx.myfoo.com) and an internal mail server (int.myfoo.com) setup so that both mx.myfoo.com and int.myfoo.com consider myfoo.com as a local (serviceable) domain. therefore, inbound mail should (and does) proceed like this: mail from: <[EMAIL PROTECTED] > rcpt to: <[EMAIL PROTECTED]> mybar.com -----> mx.myfoo.com -------> int.myfoo.com and outbound mail should proceed like this: mail from: <[EMAIL PROTECTED]> rcpt to: <[EMAIL PROTECTED]> int.myfoo.com -----> mx.myfoo.com -----> mybar.com but instead it does this: int.myfoo.com -----> mx.myfoo.com =====> int.myfoo.com int.myfoo.com rejects the note because it is a relay (as it should, this note should be delivered to mybar.com by mx.myfoo.com). does this make sense? it is hard to convey with simple text, but what i am looking for is the configuration of a simple MX that will accept inbound messages and pass them onto a defined [internal] host and relay outbound messages on behalf of the same defined host. i thought that using RemoteDelivery to handle the first requirement and RemoteAddrNotInNetwork to handle the latter, this would work. however, what i am seeing is that RemoteDelivery is overriding RemoteAddrNotInNetwork so the effect of the relay is to send the note back to the originating machine. since RemoteAddrNotInNetwork only rejects, do i need to create a mailet that supercedes RemoteAddrNotInNetwork to deliver outbound mail before it can be redirected to the originating host? thanks b -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
