尝试在我的机架空间的云端服务器上设置全面的邮件转发

我正在运行Ubuntu 12 Precise Pangolin,并试图将我的服务器configuration为发送给它的邮件,并将其转发到我的Gmail地址。 我一直在尝试大量的例子,像编辑我的main.cf文件,看起来像这样:

 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = destiny alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = destiny, localhost.localdomain, localhost relayhost = smtp.sendgrid.net mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 51200000 recipient_delimiter = + inet_interfaces = all inet_protocols = all 

在我的/ etc / postfix /虚拟我有:

 @mydomain.com [email protected] @myotherdomain.com [email protected] 

当我通过电子邮件[email protected][email protected]发送邮件时,这[email protected]

所以我得到了build议将以下内容添加到我的/etc/alias

 postmaster:root root:[email protected] 

重新启动后缀,并尝试电邮[email protected][email protected],但它仍然不会发送。

有谁知道我在做什么错在这里? 我会很感激任何帮助。

你的main.cf似乎没有virtual_alias_maps 。 请使用postconf -n的输出replacemain.cf的列表以确保。 为进一步调查,提供一个邮件交易的日志摘录,发送到[email protected]的邮件从提交到Postfix的点开始,直到Postfix决定如何处理它。 最简单的方法是通过查看一个这样的事务的queue ID的日志,例如:

 # grep A19BEB5071E /var/log/mail.log Sep 14 08:34:16 server postfix/qmgr[20790]: A19BEB5071E: from=<[email protected]>, size=1922, nrcpt=1 (queue active) Sep 14 08:34:16 server postfix/smtpd[32758]: proxy-accept: END-OF-MESSAGE: 250 2.0.0 Ok: queued as A19BEB5071E; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<host.example.com> Sep 14 08:34:16 server postfix/pipe[32764]: A19BEB5071E: to=<[email protected]>, relay=cyrus, delay=0.62, delays=0.58/0.01/0/0.04, dsn=2.0.0, status=sent (delivered via cyrus service) Sep 14 08:34:16 server postfix/qmgr[20790]: A19BEB5071E: removed 

FTR,在这个时代,使用全面的方法并不是一个好主意。 我强烈build议不要这样做。