Eu preciso configurar o postfix para enviar por meio de um servidor de retransmissão, mas com um usuário diferente, dependendo do domínio do remetente. Por exemplo:
domain1.com
userA
passwordA
domain2.com
userB
passwordB
Eu preciso enviar relay.server.com
Estes são os arquivos que mudei sem êxito:
/ etc / postfix / transport
.domain1.com smtp:[relay.server.com]
.domain2.com smtp:[relay.server.com]
/ etc / postfix / sasl_passwd
@domain1.com userA:passwordA
@domain2.com userB:passwordB
/ etc / postfix / relayhost_map
domain1.com smtp:[relay.server.com]
domain2.com smtp:[relay.server.com]
/etc/postfix/main.cf
mydomain = domain3.com
myhostname = host.domain3.com
myorigin = $mydomain
relay_domains = relay.server.com, domain1.com, domain2.com
relayhost = [relay.server.com]
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map
smtp_pix_workarounds = delay_dotcrlf
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = !gssapi, !external, static:all
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_tls_security_options = $smtp_sasl_security_options
smtp_sasl_type = cyrus
smtp_sender_dependent_authentication = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
smtp_use_tls = yes
smtpd_sasl_path = smtpd
smtpd_sasl_type = cyrus
soft_bounce = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
O erro que recebi é:
Feb 13 19:04:43 postfixserver postfix/smtp[2718]: 95EE11607CC: to=<[email protected]>, relay=relay.server.com[X.X.X.X]:25, delay=0.28, delays=0/0.04/0.14/0.11, dsn=5.7.0, status=bounced (host relay.server.com[X.X.X.X] said: 530 5.7.0 authentication required in "MAIL FROM:<> SIZE=2263 BODY=8BITMIME" (in reply to MAIL FROM command))
parece que o mapeamento sasl_passwd não está definido corretamente.
obrigado antecipadamente