2017-08-24 76 views
0

我试图安装在gcloud例如多域服务器,下面这个教程https://vorkbaard.nl/installing-a-mailserver-on-debian-8-part-3-mta-postfix/,我修改/etc/postfix/master.cf:如何在gcloud上设置postfix?

smtp  inet n  -  y  -  -  smtpd 

597  inet n  -  y  -  -  smtpd 

当我telnet域597我成功地建立了连接,但试图从mailx或从telnet客户端发送电子邮件我收到错误,好像后缀仍然使用25端口:

Aug 24 19:26:08 localhost postfix/smtp[1404]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400c:c0f::1b]:25: Network is unreachable 

那么我需要更改端口以用于在谷歌计算机实例中的后缀工作? Telnet外部谷歌网络工作正常!

谢谢!

[编辑]

经过调试与测试发送电子邮件到相同的电子邮件发送和recibe,从圆形立方体,并从雷鸟,所以我认为这个问题的外部流量的端口25和我不知道为什么后缀使用25端口,如果master.cf STMP端口设置为597

mail.log调试从roundcube

Aug 25 00:58:59 localhost dovecot: imap([email protected]): Debug: maildir++: root=/var/mail/vmail/inova.cloud/info, index=, indexpvt=, control=, inbox=/var/mail/vmail/inova.cloud/info, alt= 
Aug 25 00:58:59 localhost dovecot: imap([email protected]): Logged out in=50 out=511 
Aug 25 00:59:22 localhost postfix/qmgr[952]: 494C582008: from=<[email protected]>, size=524, nrcpt=1 (queue active) 
Aug 25 00:59:22 localhost postfix/qmgr[952]: 4F95180D0A: from=<[email protected]ajestic-lodge-173213.internal>, size=461, nrcpt=1 (queue active) 
Aug 25 00:59:22 localhost postfix/error[1435]: 494C582008: to=<[email protected]>, relay=none, delay=4617, delays=4617/0.06/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect t$ 
Aug 25 00:59:22 localhost postfix/error[1436]: 4F95180D0A: to=<[email protected]>, relay=none, delay=80226, delays=80226/0.03/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect$ 
Aug 25 00:59:59 localhost dovecot: imap-login: Debug: SSL: elliptic curve secp384r1 will be used for ECDH and ECDHE key exchanges 
Aug 25 00:59:59 localhost dovecot: imap-login: Debug: SSL: elliptic curve secp384r1 will be used for ECDH and ECDHE key exchanges 
Aug 25 00:59:59 localhost dovecot: auth: Debug: auth client connected (pid=1442) 
Aug 25 00:59:59 localhost dovecot: auth: Debug: client in: AUTH#0111#011PLAIN#011service=imap#011secured#011session=0wbZdolXxJkAAAAAAAAAAAAAAAAAAAAB#011lip=::1#011rip=::1#011lport=143#011rport=39364#011resp=AGl$ 
Aug 25 00:59:59 localhost dovecot: auth-worker(1430): Debug: sql([email protected],::1,<0wbZdolXxJkAAAAAAAAAAAAAAAAAAAAB>): query: SELECT email as username, pwd AS password FROM addresses WHERE email = '[email protected]$ 
Aug 25 00:59:59 localhost dovecot: auth: Debug: client passdb out: OK#0111#[email protected] 
Aug 25 00:59:59 localhost dovecot: auth: Debug: master in: REQUEST#0112225078273#0111442#0111#0117898818d71c58f150c8d4f75bb936fb5#011session_pid=1443#011request_auth_token 
Aug 25 00:59:59 localhost dovecot: auth-worker(1430): Debug: sql([email protected],::1,<0wbZdolXxJkAAAAAAAAAAAAAAAAAAAAB>): SELECT 5000 AS uid, 5000 as gid, email, '/var/mail/vmail/domain/info' AS home FROM$ 
Aug 25 00:59:59 localhost dovecot: auth: Debug: master userdb out: USER#0112225078273#[email protected]#011uid=5000#011gid=5000#[email protected]#011home=/var/mail/vmail/domain/info#011auth_token$ 
Aug 25 00:59:59 localhost dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=1443, secured, session=<0wbZdolXxJkAAAAAAAAAAAAAAAAAAAAB> 
Aug 25 00:59:59 localhost dovecot: imap([email protected]): Debug: Added userdb setting: plugin/[email protected] 
Aug 25 00:59:59 localhost dovecot: imap([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/mail/vmail/inova.cloud/info 
Aug 25 00:59:59 localhost dovecot: imap([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/mail/vmail/domain/info 
Aug 25 00:59:59 localhost dovecot: imap([email protected]): Debug: maildir++: root=/var/mail/vmail/domain/info, index=, indexpvt=, control=, inbox=/var/mail/vmail/domain/info, alt= 
Aug 25 00:59:59 localhost dovecot: imap([email protected]): Logged out in=50 out=511 

从外面电子邮件发送它不recive

回答

0

两个重要的事实:

  1. GCE blocks outbound email on port 25, 465 and 587(除端口465或587到只有谷歌Apps的继电器)。
  2. 如果你不使用中继,你不能选择双语端口。这是因为您必须连接到您的目的地正在监听的任何端口,这将是一个标准(阻止)端口。

因此你必须使用电子邮件中继,你不是它的声音。在我上面链接的页面底部是一些可用于电子邮件中继的选项。它们都包含后缀选项。