我尝试在gcloud实例中设置多域服务器,遵循本教程https://vorkbaard.nl/installing-a-mailserver-on-debian-8-part-3-mta-postfix/,我修改了/etc/postfix/master.cf:
smtp inet n - y - - smtpd
到
597 inet n - y - - smtpd
当我telnet域597我成功连接,但尝试从mailx或telnet客户端发送电子邮件我得到一个错误,好像postfix仍然使用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的外部流量,我不知道为什么postfix使用25端口,如果master.cf stmp port设置为597
mail.log调试从roundcube发送
Aug 25 00:58:59 localhost dovecot: imap(sender@domain.com): 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(sender@domain.com): Logged out in=50 out=511
Aug 25 00:59:22 localhost postfix/qmgr[952]: 494C582008: from=<sender@domain.com>, size=524, nrcpt=1 (queue active)
Aug 25 00:59:22 localhost postfix/qmgr[952]: 4F95180D0A: from=<nano@server.c.majestic-lodge-173213.internal>, size=461, nrcpt=1 (queue active)
Aug 25 00:59:22 localhost postfix/error[1435]: 494C582008: to=<destination@domain>, 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=<destination@domain>, 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(sender@domain.com,::1,<0wbZdolXxJkAAAAAAAAAAAAAAAAAAAAB>): query: SELECT email as username, pwd AS password FROM addresses WHERE email = 'info@$
Aug 25 00:59:59 localhost dovecot: auth: Debug: client passdb out: OK#0111#011user=sender@domain.com
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(sender@domain.com,::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#011sender@domain.com#011uid=5000#011gid=5000#011email=sender@domain.com#011home=/var/mail/vmail/domain/info#011auth_token$
Aug 25 00:59:59 localhost dovecot: imap-login: Login: user=<sender@domain.com>, method=PLAIN, rip=::1, lip=::1, mpid=1443, secured, session=<0wbZdolXxJkAAAAAAAAAAAAAAAAAAAAB>
Aug 25 00:59:59 localhost dovecot: imap(sender@domain.com): Debug: Added userdb setting: plugin/email=sender@domain.com
Aug 25 00:59:59 localhost dovecot: imap(sender@domain.com): Debug: Effective uid=5000, gid=5000, home=/var/mail/vmail/inova.cloud/info
Aug 25 00:59:59 localhost dovecot: imap(sender@domain.com): 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(sender@domain.com): 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(sender@domain.com): Logged out in=50 out=511
从外部电子邮件来看,它没有回复
答案 0 :(得分:2)
两个重要事实:
因此,您必须使用电子邮件中继,而您不会发出声音。在我上面链接的页面底部是您可以使用的电子邮件中继的一些选项。它们都包括后缀选项。