Fetchmail + Postfix - 无法让它们协同工作

Fetchmail + Postfix - 无法让它们协同工作

任务如下:安全区域中有一台邮件服务器,无法访问互联网和/或其他网络。我需要将其中一个邮箱的内容转发到 Amazon SES 进行投递。我设置了 Fetchmail 以从所述服务器抓取邮件。我设置了 Postfix 以将邮件转发到 AWS。

Fetchmail 接收邮件。如果我尝试使用 Postfix 发送测试邮件 - 它工作正常。但它不会发送由 Fetchmail 下载的邮件。

Fetchmail 配置:

set daemon 300
set logfile /var/log/fetchmail
set postmaster root

set no bouncemail

defaults:
timeout 300
antispam -1
batchlimit 100

poll imap.example.com
  protocol IMAP
  port 993
  user "[email protected]" there is mailer here
  password p@$$W0RD
  nofetchall keep ssl
  smtpaddress localhost

Postfix 配置:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
compatibility_level = 2
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may

smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = gateway.example.com
mydomain = example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = gateway.example.com, $myhostname, localhost.localdomain, localhost
relayhost = [email-smtp.eu-central-1.amazonaws.com]:587
relay_domains = $mydomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/ses
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

相关内容