具有自己的SMTP服务器和本地电子邮件的Google Apps

时间:2013-08-19 20:13:50

标签: smtp google-apps postfix-mta

目前,我们正在使用Google的SMTP将电子邮件从我们的网络服务器发送给注册用户。由于限制(每天500封邮件)不再可行。因此,我们在我们的机器上设置了一个后缀,并重新配置了webapps以使用它。现在,postfix将电子邮件发送到我们自己的电子邮件地址(*@gibbonsfive.de)本地而不是Google Apps。最重要的是,它不会向Google服务器上配置的邮件列表发送任何电子邮件,因为它表示用户/别名不存在。有没有办法让它按以下方式工作:

  • 我们所有电子邮件地址的Google Apps,包括Google的SMTP服务器(正常工作)

  • Webapps正在使用我们自己的SMTP(工作),并且发送给具有我们自己的域(*@gibbonsfive.de)的用户的电子邮件不会在本地发送(不起作用)

我们的设置:

域的bind-config:

...
ns                      IN      A       78.46.106.246
ns1.rollernet.us.       IN      A       208.79.240.3
ns2.rollernet.us.       IN      A       208.79.241.3

@                       IN      MX    10    aspmx.l.google.com.
@                       IN      MX    10    alt1.aspmx.l.google.com.
@                       IN      MX    10    alt2.aspmx.l.google.com.
@                       IN      MX    10     aspmx2.googlemail.com.
@                       IN      A       78.46.106.246 
mail                    IN      A       78.46.106.246
...

/etc/postfix/main.cf中

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no

message_size_limit = 209715200
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

smtp_use_tls=yes
smtpd_use_tls=yes
smtpd_tls_auth_only=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_sasl_path=smtpd
smtpd_sasl_auth_enable=yes
smtpd_sasl_security_options=noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients=yes
smtpd_sender_restrictions =
        permit_sasl_authenticated
        permit_mynetworks
smtpd_recipient_restrictions= 
        permit_mynetworks, 
        permit_sasl_authenticated, 
        reject_unauth_destinatio

smtpd_helo_required=yes
smtpd_helo_restrictions=reject_invalid_helo_hostname
myhostname = romeo.gibbonsfive.de 
myorigin = gibbonsfive.de

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost, localhost.$myorigin, $myorigin
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

1 个答案:

答案 0 :(得分:0)

更改'mydestination'配置修复了它!

mydestination = $myhostname, localhost.$mydomain, localhost