Re: [Postfix-es] Distintos servidores SMTP según direccion destino [SOLUCION]

Toni Colet toni en techno-sol.com
Mar Jun 21 11:59:13 CEST 2005


Bueno, pues ya está!

He seguido las instrucciones que me indicabas y todo ha funcionado correctamente,
menos por un detalle (como no!):

Cuando intentaba entregar el mail al isp externo, me salia un mensaje en el log
local:
(...)
warning: SASL authentication failure: No worthy mechs found
(...)

Pues googleando un rato me he enterado que no tenia los módulos de autentificación
instalados.

# apt-get install libsasl2-modules

Y solucionado!
En resumen: ahora tenemos dos servidores (uno dentro de la oficina y el ISP). Los
clientes locales envian el correo al servidor interno. Si el dominio es, por ejemplo,
@oficina.empresa, el mail se queda, en caso contrario, se identifica contra el ISP
y es él el que se encarga de enviarlo.

Muchas gracias por tu tiempo!
Un saludo
Toni



Simon Mudd wrote:
> toni en techno-sol.com (Toni Colet) writes:
> 
> 
>>El problema está ahora en que el servidor smtp.isp.provider me rechaza
>>el mail que se envia desde la máquina local porque, lógicamente, es necesario
>>identificarse para que permita hacer el relay (es una cuenta de correo
>>con usuario y contraseña)...
>>
>>Entonces *creo* que habría dos soluciones:
>>
>>1) Poner el usuario y la contraseña en noséque fichero para que se identifique
>>en el servidor smtp.isp.provider y así poder enviar el mail, o
>>
>>2) Hacer que la máquina local se encargue ella misma de llevar el correo al destino,
>>saltando el isp... (aunque eso no sé si catalogarlo como "Delirios de Grandeza" ;) )
> 
> 
> La segunda se puede hacer perfectamente, pero si quieres usar la
> opcion (1) tienes que configurar SASL para el cliente smtp.
> 
> Lee el SASL_README pero la parte que te interesa dice:
> 
> --- snip ---
> 
> Turn on client-side SASL authentication, and specify a table with
> per-host or per-destination username and password information. Postfix
> first looks up the server hostname; if no entry is found, then Postfix
> looks up the destination domain name (usually, the right-hand part of
> an email address).
> 
>     /etc/postfix/main.cf:
>         smtp_sasl_auth_enable = yes
>         smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
> 
>     /etc/postfix/sasl_passwd:
>         foo.com             username:password
>         bar.com             username
> 
> Note: some SMTP servers support PLAIN or LOGIN authentication only. By
> default, the Postfix SMTP client does not use authentication methods
> that send plaintext passwords, and defers delivery with the following
> error message: "Authentication failed: cannot SASL authenticate to
> server". To enable plaintext authentication specify, for example:
> 
>     /etc/postfix/main.cf:
>         smtp_sasl_security_options =
> 
> The SASL client password file is opened before the SMTP server enters
> the optional chroot jail, so you can keep the file in /etc/postfix.
> 
> Note: Some SMTP servers support authentication mechanisms that,
> although available on the client system, may not in practice work or
> possess the appropriate credentials to authenticate to the server. It
> is possible via the smtp_sasl_mechanism_filter parameter to further
> restrict the list of server mechanisms that the smtp(8) client will
> take into consideration.
> 
> The Postfix SMTP client is backwards compatible with SMTP servers that
> use the non-standard "AUTH=method..." syntax in response to the EHLO
> command; there is no Postfix client configuration needed to work
> around it.
> --- snip ---
> 
> Un saludo,
> 
> Simon




Más información sobre la lista de distribución Postfix-es