设置仅转发电子邮件服务器

我想要做的就是安装postfix,并转发邮件。 我不需要任何东西留在我的服务器上。 这是给我的地狱。 我尽我所能,但后缀拒绝所有继电器。

我想要的是这个。 说我的服务器在example.com。 我要这个:

电子邮件转发:[email protected] – > [email protected] [email protected] – > [email protected] [email protected] – > [email protected]

我所需要的只是一个redirect电子邮件的转发盒。 由于我的configuration显然有些问题,所以我真的可以用一个main.cf的例子来达到我的目的,而且我会在路上。

编辑:日志

奇怪的是日志不给我任何错误。

main.cf:

mreiley@Omega-14:/var/log$ cat /etc/postfix/main.cf # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname 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 = omega-14.omegadev.org alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = omega-14.omegadev.org, localhost.omegadev.org, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all virtual_alias_domains = omegadev.org monovec.com ifmovement.org virtual_alias_maps = hash:/etc/postfix/virtual mreiley@Omega-14:/var/log$ 

虚拟转发文件:

 mreiley@Omega-14:/var/log$ cat /etc/postfix/virtual [EXPUNGED]@omegadev.org [email protected] [email protected] [email protected] mreiley@Omega-14:/var/log$ 

然后,我从Gmail发送一封电子邮件来testingconfiguration。 这是mail.log显示的内容:

 Jul 16 16:00:32 Omega-14 postfix/smtpd[4282]: connect from mail-px0-f179.google.com[209.85.212.179] Jul 16 16:00:32 Omega-14 postfix/smtpd[4282]: 72784483A: client=mail-px0-f179.google.com[209.85.212.179] Jul 16 16:00:32 Omega-14 postfix/cleanup[4287]: 72784483A: message-id=<[email protected]> Jul 16 16:00:32 Omega-14 postfix/qmgr[4274]: 72784483A: from=<[email protected]>, size=2026, nrcpt=1 (queue active) Jul 16 16:00:33 Omega-14 postfix/smtp[4288]: 72784483A: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.53.27]:25, delay=1.5, delays=0.08/0.01/0.08/1.3, dsn=2.0.0, status=sent (250 2.0.0 OK 1279321231 d5si4147919wam.28) Jul 16 16:00:33 Omega-14 postfix/qmgr[4274]: 72784483A: removed 

该日志声称,交付是一个完整的成功,但电子邮件从不出现在我的收件箱或垃圾邮件文件夹。

但是,如果我使用telnet,我会得到一个不同的故事。

 mreiley@Omega-14:/var/log$ telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 omega-14.omegadev.org ESMTP Postfix (Ubuntu) helo omegadev.org 250 omega-14.omegadev.org mail from:[email protected] 250 2.1.0 Ok rcpt to:[email protected] 554 5.7.1 <[email protected]>: Relay access denied 

更新! Google自己似乎阻止了我。 发送到其他提供商的电子邮件会通过,但是当发送到Gmail,他们甚至不打垃圾邮件。

您是否从Gmail发送testing电子邮件? 在笑鱿鱼networking托pipe,我们发现,Gmail不喜欢转发的电子邮件,如果它是从Gmail发送,然后转发到Gmail。 它似乎与其垃圾邮件filter。 我会build议尝试与雅虎,看看会发生什么。

远程login会话和后缀日志似乎没有做同样的事情。

“RCPT TO”应该是本地用户,而不是Gmail用户。

“MAIL FROM”也是不同的,因为在第二,你看起来是本地用户,而第一,你是一个Gmail用户。

所以telnet会话不是一个有效的testing。

日志表明谷歌已经接受了电子邮件。 再次检查垃圾邮件标签。