Re: [postfix-es] Parámetros de configuración para cada instancia

Simon J Mudd sjmudd en pobox.com
Sab Oct 11 21:23:45 CEST 2003


Please DO NOT cc: me, I am subscribed to postfix-es!

On Sat, 11 Oct 2003, Abel Molina wrote:

> Supose you have a sever with to NICs. You make default configuration in main.cf with inet_interfaces=127.0.0.1.
> NIC eth0 is for network 0
> NIC eth1 is for network 1
>
> I need to apply differents antispam UCE rules for those networks. So, I put this on master.cf:
>
> <ip_eth0>:25 inet n  -       n     -       -  smtpd
>     -o smtpd_client_restrictions=eth0-smtpd_client_restrictions
>     -o smtpd_helo_restrictions=eth0-smtpd_helo_restrictions
>     -o smtpd_sender_restrictions=eth0-smtpd_sender_restrictions
>     -o smtpd_recipient_restrictions=eth0-smtpd_recipient_restrictions
>
>
> <ip_eth1>:25 inet n  -       n     -       -  smtpd
>     -o smtpd_client_restrictions=eth1-smtpd_client_restrictions
>     -o smtpd_helo_restrictions=eth1-smtpd_helo_restrictions
>     -o smtpd_sender_restrictions=eth1-smtpd_sender_restrictions
>     -o smtpd_recipient_restrictions=eth1-smtpd_recipient_restrictions

Bien. Estas reglas son reglas de SMTPD (smtpd)

> Now in main.cf I put this:
>
> smtpd_restriction_classes =
> 	eth0-smtpd_client_restrictions,
> 	eth0-smtpd_helo_restrictions,
> 	eth0-smtpd_sender_restrictions,
> 	eth0-smtpd_recipient_restrictions,
> 	eth1-smtpd_client_restrictions,
> 	eth1-smtpd_helo_restrictions,
> 	eth1-smtpd_sender_restrictions,
> 	eth1-smtpd_recipient_restrictions
>
> then I set up rules for each class in main.cf
>
> This way (CONFIRMED IT WORKS) I can apply differents antispam UCE rules
> for each network. I can even put differents smtpd_banner and other
> things.

Claro esto funciona porque estás modificando la configuración de smtpd.

> As you see, the three instances (eth1, eth2 & localhost) use the same postfix config directory and spool.
>
> Now I insist in my original problem:
>
> I'm almost completely sure I once made it but now it doesn't want to
> work. I need to add this equivalent lines to master.cf for each ethernet
> X instances:
> -o transport_maps=hash:/etc/postfix/ethX-transport_maps
> -o content_filter=ethX-smtp-amavis:[antivirusX_ip]:10024
> -o relay_domains=hash:/etc/postfix/ethX-relay_domains
> -o relocated_maps=hash:/etc/postfix/ethX-relocated_maps
> -o message_size_limit=<sizeX>
> -o alias_maps=hash:/etc/postfix/ethX-alias_maps

No todos estos parametros están usados por SMTPD (smtpd).

Por ejemplo transport_maps está usado por trivial-rewrite por lo que tu
configuración NO funcionará.

No estoy seguro del resto de los parámetros pero quizá el caso que estás
viendo te deja ver que no puedes reconfigurar TODO postfix a través de
smtpd y las opciones -o.

De todas formas Wietse siempre acepta parches para su documentación. Si
ves que uno de estas reglas está usado por otro demonio y no está
especificado en la página man, mandele un mensaje y ayudarás a otros a
evitar tus problemas.

Simon
-
Para ENVIAR mensajes a esta lista tienes que estar SUSCRITO a ella.
.
Envía la linea "unsubscribe postfix-es" en el cuerpo de un mensaje
a majordomo en WL0.org para quitarte de la lista.



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