If I correctly read you reply the flow pass via direct-SMTP sent to
destination domain
(case 3) only if the relay host (case 2) isn't online.  My case is more
difficult:
I need that relay host (case 2) should be used ONLY for james-handled domain
for whom
james haven't users locally defined. If the outgoing mail is sent to some
other domain,
james should directly go to case 3.

TIA



Stefano Bagnara-2 wrote:
> 
> 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
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/smtp-gateway-by-destination-domain-tf4129682.html#a11861009
Sent from the James - General mailing list archive at Nabble.com.

Reply via email to