Gianluca Gargiulo:
> but i want that postfix acts as smtp client only for outlook.com
> domains, not ever.  Where i set this conditions?

Set up an "smtp-auth" delivery agent that is used for outlook.com.
and enable client-side SASL for the "smtp-auth" delivery agent only.

/etc/postfix/main.cf:
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
    # Execute "postmap hash:/etc/postfix/transport" after changing
    # this file.
    outlook.com    smtp-auth:

/etc/postfix/master.cf
    # Execute "postfix reload" after changing this file.
    # Note: no space around "=".
    smtp-auth    inet  n       -       n       -       -       smtpd
        -o smtp_sender_dependent_authentication=yes
        -o smtp_sasl_password_maps=hash:/etc/postfix/transport

This is an untested example. It should be close.

        Wietse

> ----- Messaggio originale -----
> Da: "Wietse Venema" <wie...@porcupine.org> 
> A: "Postfix users" <postfix-users@postfix.org> 
> Inviato: Venerd?, 20 febbraio 2015 14:29:46 
> Oggetto: Re: conditional relay with credential based on domain recipient 
> 
> Wietse Venema: 
> > Gianluca Gargiulo: 
> > > Hi, 
> > > 
> > > due to problem to send to outlook.com domains with my postfix, i'd 
> > > like postfix act as smtp client with my email provider smtp server 
> > > using the sender credentials. 
> > 
> > Maybe you can store the credential in smtp_sasl_password_maps and 
> > set "smtp_sender_dependent_authentication = yes". Then, the 
> > password file is searched by the sender email address instead of 
> > the server name or domain. 
> 
> Correction: Postfix will first search with the sender address, and 
> if no result is found, with the server name or next-hop domain name. 
> 
> > Wietse 
> > 
> > smtp_sender_dependent_authentication (default: no) 
> > Enable sender-dependent authentication in the Postfix SMTP client; this 
> > is available only with SASL authentication, and disables SMTP connec- 
> > tion caching to ensure that mail from different senders will use the 
> > appropriate credentials. 
> > 
> > This feature is available in Postfix 2.3 and later. 
> > 

Reply via email to