Postfix: настроить пересылку почты с помощью virtual_alias_maps и relay_host - PullRequest
0 голосов
/ 26 сентября 2018

Я пытаюсь настроить postfix для пересылки моей почты через внешнее реле SMTP (Mailjet).Само реле уже работает (я проверял его, например, с sendmail).

Что не работает, так это virtual_alias_maps (они «работали» до того, как я настроил реле, но скорость доставки была очень плохой).Возможно ли даже следующее?

  • получать почту на моем VPS по адресу admin@example.com
  • переслать это письмо на admin-example@gmail.com
  • doэто через SMTP Relay

Буду признателен за любые идеи или намеки на то, что я делаю неправильно.

$ postconf -n:

alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.com
myhostname = mail.example.com
myorigin = example.com
readme_directory = no
relay_domains = example.com, another.com, fine.ga
relay_recipient_maps = hash:/etc/postfix/relay_recipients
relayhost = [in-v3.mailjet.com]
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains = another.com, fine.ga
virtual_alias_maps = hash:/etc/postfix/virtual

$ cat / etc / postfix / transport:

example.com       smtp:[in-v3.mailjet.com]
another.com       smtp:[in-v3.mailjet.com]
fine.ga           smtp:[in-v3.mailjet.com]

$ cat / etc / postfix / relay_recipients:

admin@example.com      OK
sterling@example.com   OK
light@example.com      OK
hello@another.com      OK

$ cat / etc / postfix / virtual

example.com             this-text-is-ignored
admin@example.com       admin-example@gmail.com
light@example.com       some-recipient@web.de
sterling@example.com    some-recipient@web.de

another.com             this-text-is-ignored
hello@another.com       hello-another@gmail.com
...