This should be really easy to do. Start from the default configuration and replace this mailet code:
<mailet match="HostIsLocal" class="ToProcessor"> <processor> local-address-error </processor> <notice>550 - Requested action not taken: no such user here</notice> </mailet> with this one: <mailet match="HostIsLocal" class="ToProcessor"> <processor> gatewayprocessor </processor> </mailet> then you add a new processor configured this way: <processor name="gatewayprocessor"> <mailet match="All" class="RemoteDelivery"> <outgoing> file://var/mail/outgoinggw/ </outgoing> <delayTime> 5 minutes </delayTime> <delayTime> 10 minutes </delayTime> <delayTime> 45 minutes </delayTime> <delayTime> 2 hours </delayTime> <delayTime> 3 hours </delayTime> <delayTime> 6 hours </delayTime> <maxRetries> 25 </maxRetries> <deliveryThreads> 1 </deliveryThreads> <sendpartial>false</sendpartial> <bounceProcessor>bounces</bounceProcessor> <gateway> master-mx.mydomain.com </gateway> <gatewayPort>25</gatewayPort> <gatewayusername>login</gatewayusername> <gatewayPassword>pass</gatewayPassword> </mailet> </processor> This way your #1 is cough by the RecipientIsLocal matcher and sent to LocalDelivery. If only the HostIsLocal (#2) then you send it to the gateway (via gateway enabled remote delivery), otherwise the standard flow for outgoing mail is #3, the standard RemoteDelivery. Stefano Ice72 ha scritto: > Hi, > > I need to configure James in this way: > > 1) all local defined <user>@mydomain.com receive mail directly > > 2) all mail directed to non-local <user>@mydomain.com are forwarded to > gateway > > > 3) all other mail are delivered via MX/DNS resolution > > Is something like "transport" function in postfix mail-server. Is this > possible? > > TIA
