[postfix-es] postfix como relay

Administrator Administrator en mtpgto.co.cu
Jue Feb 18 15:42:30 CET 2010


Hola, hace un tiempo tengo pensado configurar postfix como relay de un Exchange 2003 encontré esta guía en ingles que explica algunos paso de cómo hacerlo 
Hay algunas cosas que no se muy bien como se hace pero al menos ya las hice 
la guia es esta:
http://postfix.state-of-mind.de/patrick.koetter/mailrelay/

lo que hice fue exportar los usuario del AD siguiendo un script proporcionado en el sitio 
tengo listado todos los usuarios 
en una parte de la guía dice que hay que hacer un postmap fichero en cuestión que contiene los nombres de usuarios
esta parte en especifico no la entiendo 
Build proto MAP
Parse the virtual.txt file for smtp and SMTP entries and write them into a Postfix map format to relay_recipients.proto. Then run postmap /path/to/relay_recipients.proto to make it a Postfix readable DB. We use this Makefile which can be invoked from cron using: cd /etc/postfix && make
Example 2. Makefile
Download Makefile <http://postfix.state-of-mind.de/patrick.koetter/mailrelay/Makefile> 
DB=db
all:    relay_recipients.$(DB)
# "all" means to build virtual.db

relay_recipients.proto:       virtual.txt
    awk -F: '/alias: (SMTP|smtp):/ {printf("%s\tOK\n",$$3)}' virtual.txt > relay_recipients.proto
# We need virtual.txt to build relay_recipients.proto
# awk will use ":" as field separator and for each line
# that contains "alias: (SMTP|smtp):" it will do:
# print the third row, insert a TAB, insert "OK" and add a newline
# into relay_recipients.proto

%.$(DB):             %.proto
    /usr/sbin/postmap $*.proto && mv $*.proto.$(DB) $*.$(DB)
# Building a *.db requires a *.proto file. If that exists,
# postmap is called to build the map from *.proto. If postmap is successful
# the *.proto map will be renamed to *.db

Lo que hice fue guardar el fichero Makefile como .make no se si esto esta bien no conozco mucho sobre el ambiento gnu y lo ejecute me dio unos warnings de alias, de todas maneras creo el fichero relay_recipients.proto yo luego hice # postmap relay_recipients y creo unrelay_recipients.db
Ejecute postfix reload 
Trato de conectar por telnet y conecta pero se cuelga no me dice nada ni nombre del sistema ni nada 
Revisando en /var/log/mail.info encuentro estas líneas 

Feb 17 09:13:34 mx postfix/smtpd[7629]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/relay_recipients"
Feb 17 09:13:35 mx postfix/master[8275]: warning: process /usr/lib/postfix/smtpd pid 7629 exit status 1
Feb 17 09:13:35 mx postfix/master[8275]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Feb 17 09:13:59 mx postfix/trivial-rewrite[7683]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/transport_maps"
Feb 17 09:14:00 mx postfix/master[8275]: warning: process /usr/lib/postfix/trivial-rewrite pid 7683 exit status 1
Feb 17 09:14:00 mx postfix/master[8275]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Feb 17 09:14:35 mx postfix/smtpd[7707]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/relay_recipients"
Feb 17 09:14:36 mx postfix/master[8275]: warning: process /usr/lib/postfix/smtpd pid 7707 exit status 1
Feb 17 09:14:36 mx postfix/master[8275]: warning: /usr/lib/postfix/smtpd: bad command startup - throttling

En mail.err aparecen estas líneas 
Feb 17 09:13:59 mx postfix/trivial-rewrite[7683]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/transport_maps"
Feb 17 09:14:35 mx postfix/smtpd[7707]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/relay_recipients"


Aca esta el main.cf 
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
mydomain = mtpgto.co.cu
myhostname = mx
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = mx.mtpgto.co.cu, mx, localhost.localdomain, localhost
relay_domains = $mydomain
relayhost = 
relay_recipient_maps=hash :/etc/postfix/relay_recipients
mynetworks = 127.0.0.0/8
transport_maps = hash:/etc/postfix/transport_maps
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
unknown_local_recipient_reject_code = 450

Pregunto que hice que mal y por que me da esos errores especifico
Disculpen por lo grande del correo
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.wl0.org/pipermail/postfix-es/attachments/20100218/ca4d8a69/attachment.html>


More information about the postfix-es mailing list