You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Vi...@nokia.com on 2005/05/26 13:48:23 UTC

James SMTP routing

Hi all,

I would like to setup james so that it relays incoming messages according to the recipient. I also need a default rule to relay messages to unknown domains to a default relay.

I can't find documenttion about this. Any idea?

Thanks lot in advance,
Vincent.

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: James SMTP routing

Posted by ap...@bago.org.
> I would like to setup james so that it relays incoming 
> messages according to the recipient. I also need a default 
> rule to relay messages to unknown domains to a default relay.
>
> I can't find documenttion about this. Any idea?

Hi Vincent,

Can you provide better information?

Do you need something like this?

domain1.com => gw1.yourgateway.com
domain2.com => gw2.yourgateway.com
domain3.com => gw3.yourgateway.com
Other domains => smarthost.yourdomain.com

If you need this then I think you need to subclass RemoteDelivery mailet to
add this behaviour.

If the known domain are only a few you can fallback to this:

<mailet match="IsRecipient=*@domain1.com" class="RemoteDelivery">
  <outgoing> db://maildb/spool/outgoing1 </outgoing>
  <gateway>gw1.yourgateway.com</gateway>
</mailet>

<mailet match="IsRecipient=*@domain2.com" class="RemoteDelivery">
  <outgoing> db://maildb/spool/outgoing2 </outgoing>
  <gateway>gw2.yourgateway.com</gateway>
</mailet>

<mailet match="IsRecipient=*@domain3.com" class="RemoteDelivery">
  <outgoing> db://maildb/spool/outgoing3 </outgoing>
  <gateway>gw3.yourgateway.com</gateway>
</mailet>

<mailet match="All" class="RemoteDelivery">
  <outgoing> db://maildb/spool/outgoing </outgoing>
  <gateway>smarthost.yourdomain.com</gateway>
</mailet>

Consider that every remoteDelivery will instantiate its own delivery threads
(add <deliveryThreads> 5 </deliveryThreads> to each block).

I would use this solution only with few custom gateway. IMHO too many
RemoteDelivery will bloat your configuration and your runtime environment.


Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org