尝试在我的 rackspace 的 cloudspace 服务器上设置 catchall 邮件转发

尝试在我的 rackspace 的 cloudspace 服务器上设置 catchall 邮件转发

我正在运行 Ubuntu 12 Precise Pangolin,并尝试配置我的服务器以接收发送给它的所有邮件并将其转发到我的 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/virtual 中我有:

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

[email protected]当我发送电子邮件或时它不起作用[email protected]

因此我得到建议将以下内容添加到我的/etc/alias

postmaster:root
root:[email protected]

重新启动 Postfix,并尝试发送电子邮件[电子邮件保护]或者[电子邮件保护]但仍然无法发送。

有人知道我在这里做错了什么吗? 我将不胜感激任何帮助。

答案1

您的main.cf似乎没有。请用的输出virtual_alias_maps替换您的列表以确保。为进一步调查,请提供一封发送到的邮件的邮件事务的日志摘录,从它提交到 Postfix 的那一刻开始,直到 Postfix 决定如何处理它为止。最简单的方法是查看此类事务的日志,例如:main.cfpostconf -n[email protected]grepqueue 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,在当今时代,使用万能药不是一个好主意。我强烈建议不要这样做。

相关内容