Autenticação SMTP de vários domínios do postfix SMTP

0

Oi eu estou tentando usar o postfix smtp realy para enviar e-mails. O problema que estou enfrentando é a autenticação por usuário.

Quando tento enviar e-mails usando a função de correio PHP, meu host SMTP (zoho) está me pedindo para autenticar todos os usuários antes de enviar e-mails.

aqui estão minhas configurações

meu 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 (Ubuntu)
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_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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = 8bazaar.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#local_recipient_maps = unix:passwd.byname $alias_maps
mydestination = localhost, localhost.localdomain
#mydestination = $myhostname, 8bazaar.com, localhost.com, localhost
relayhost = [smtp.zoho.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all


# sender-dependent sasl authentication
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay

relayhost = [smtp.zoho.com]:587

# Enable SASL authentication
smtp_sasl_auth_enable = yes
# Disallow methods that allow anonymous authentication
smtp_sasl_security_options = noanonymous
# Location of sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd

smtp_sasl_mechanism_filter = plain

# Enable STARTTLS encryption
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
smtp_tls_security_level = encrypt

compatibility_level = 2

meu arquivo sasl_passwd

# per-sender authentication
[email protected] [email protected]:xxxxxxxxxxxx
[email protected] [email protected]:xxxxxxxxxxxx

# default relayhost
[smtp.zoho.com]:587 [email protected]:xxxxxxxxxxxxxx

meu arquivo sender_relay

[email protected] [smtp.zoho.com]:587
[email protected] [smtp.zoho.com]:587
[email protected] [smtp.zoho.com]:587

quando eu envio e-mail usando php com do usuário [email protected] ele funciona perfeitamente, mas no caso de outros usuários eu recebo após resposta

Mar 30 15:19:39 8bazaar postfix/pickup[21589]: A168346F685: uid=1000 from=<bazaar>
Mar 30 15:19:39 8bazaar postfix/cleanup[21596]: A168346F685: message-id=<[email protected]>
Mar 30 15:19:39 8bazaar postfix/qmgr[21588]: A168346F685: from=<[email protected]>, size=625, nrcpt=1 (queue active)
Mar 30 15:19:42 8bazaar postfix/smtp[21598]: A168346F685: to=<[email protected]>, relay=smtp.zoho.com[204.141.32.118]:587, delay=2.5, delays=0/0/1.7/0.82, dsn=5.0.0, status=bounced (host smtp.zoho.com[204.141.32.118] said: 553 Relaying disallowed as Sales <[email protected]> (in reply to end of DATA command))
Mar 30 15:19:42 8bazaar postfix/cleanup[21596]: 2C71046F686: message-id=<[email protected]>
Mar 30 15:19:42 8bazaar postfix/bounce[21623]: A168346F685: sender non-delivery notification: 2C71046F686
Mar 30 15:19:42 8bazaar postfix/qmgr[21588]: 2C71046F686: from=<>, size=2654, nrcpt=1 (queue active)
Mar 30 15:19:42 8bazaar postfix/qmgr[21588]: A168346F685: removed
    
por Moeen Basra 30.03.2018 / 23:15

0 respostas