Autentificación SMPT con Postfix

Imagen de yoellre

Forums: 

Hola a todos, resulta que he instalado un servidor de correo con postfix y dovecot que me trabaja de lo más bien, incluso he hecho algunos cambios en el main.cf(fichero de configuracion) para la autentificación SMTP, lo que aparentemente trabaja. El problema está en que si me conecto por consola, por telnet y envio un mail lo hace sin autentificarse. Necesito saber el modo de obligar a los usuarios que autentifiquen....cuándo me logueo por telnet me sale:

Connected to localhost.
Escape character is '^]'.
220 h10.localdomain ESMTP Postfix (Debian/GNU)
ehlo cucalambe.ltu.sld.cu
250-h10.localdomain
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

pues

Imagen de edsxn

pues por telnet yo pensaba que era totalmente transparente , para pruebas ..

Linux Rules

será acaso porque te

Imagen de deathUser

será acaso porque te conectas desde localhost ...???
quizás a los que están definidos para que puedan hacer relay no necesitan autenticarse o quizás solamente localhost, prueba desde un host que no esté entre los relay-hosts ...

bye
;)

Relay-host

Imagen de yoellre

Sabes, pienso que el problema puede venir por donde me dices, porque lo que tengo configurado es nynetworks, pero no le estaba dando uso al relay-host. De todos modos si me pudieras aclarar bien que son los relay-host te lo agradecería mucho ya que tengo duda respecto a eso.

Vive feliz, vive a plenitud

Un relay-host es un host en

Imagen de deathUser

Un relay-host es un host en el que el MTA confía para enviar y recibir e-mails directamente, por lo que no te pedirá autenticación para el envío de e-mail, revisa la configuración de postfix para los relay-hosts (no se que directiva sea, ya que no uso mucho postfix directamente :)), y asegúrate que el host desde el que estás tratando de probar el envío autenticado no esté entre los relay-hosts...

bye
;)

main.cf

Imagen de yoellre

Aqui te subo la configuración del main.cf de postfix para que me digas que crees que me pueda faltar....

# 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

readme_directory = no

# 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_tls_cert_file = /etc/postfix/postfix-cert.pem
smtpd_tls_key_file = /etc/postfix/postfix-key.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_loglevel = 1
tls_random_source = dev:/dev/urandom
smtp_tls_note_starttls_offer = yes

smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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.

myhostname = h17.ltu.sld.cu
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = h17.ltu.sld.cu, localhost.ltu.sld.cu, , localhost
relayhost = 127.0.0.0/8
mynetworks = 192.168.1.0/28
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-email2email.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous

#smtpd_sasl_local_domain = ltu.sld.cu
#smtpd_sasl_authenticated_header = yes
#broken_sasl_auth_clients = yes
#smtpd_clients_restrictions = permit_mynetworks, permit_sasl_authenticated, reject
#smtpd_sender_restrictions = reject_sender_login_mismatch, reject_non_fqdn_sender
#smtpd_tls_auth_only = yes

Hasta este punto cuándo mando un correo desde cualquier host lo manda sin autenticar, pero cuando se lo ordeno por consola entonces si me pide la autentificación. Para que entiendas, mira lo que te digo...

Trying 201.220.207.217...
Connected to 201.220.207.217.
Escape character is '^]'.
220 h17.ltu.sld.cu ESMTP Postfix (Debian/GNU)
ehlo cucalambe.ltu.sld.cu
250-h17.ltu.sld.cu
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6

Es decir que el macanísmo ya está implementado, pero aún si trato de mandar el correo directamente me deja desde cualquier pc de mi red sin autenticar...

Trying 201.220.207.217...
Connected to 201.220.207.217.
Escape character is '^]'.
220 h17.ltu.sld.cu ESMTP Postfix (Debian/GNU)
ehlo cucalambe.ltu.sld.cu
250-h17.ltu.sld.cu
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:
250 2.1.0 Ok
rcpt to:
250 2.1.5 Ok
data
354 End data with .
correo de prueba
.
250 2.0.0 Ok: queued as 857528119

Dime que crees del tema?????

Vive feliz, vive a plenitud

prueba

Imagen de deathUser

prueba agregando:

smtpd_client_restrictions = reject_unauth_pipelining
smtpd_data_restrictions = reject_unauth_pipelining

a ver como te va ...

bye
;)

nada

Imagen de yoellre

Nada hermano, sigo en las mismas....no me ha dado resultado lo que me dices, sigue mandando sin autentificar...

Vive feliz, vive a plenitud