Postfix:使用virtual_alias_maps和relay_host设置邮件转发

时间:2018-09-26 09:14:08

标签: postfix-mta mailjet

我正在尝试设置后缀,以通过外部SMTP中继(Mailjet)转发邮件。中继本身已经可以工作(例如,我使用sendmail进行了测试)。

不起作用的是virtual_alias_maps(在我设置中继之前它们“起作用”,但是传送速度很差)。以下可能吗?

  • 通过admin@example.com在我的VPS上接收邮件
  • 将此邮件转发到admin-example@gmail.com
  • 通过SMTP中继进行此操作

对于任何想法或暗示我在做什么错,我将不胜感激。

$ 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

0 个答案:

没有答案