【问题标题】:SMTP Error (454): Failed to add recipient Relay access denied roundcubeSMTP 错误 (454):无法添加收件人 中继访问被拒绝 roundcube
【发布时间】:2018-12-04 17:58:39
【问题描述】:

我在 VPS 上设置了一个邮件服务器,并安装了 roundcube 来管理 webmail。当我在实习生中发送电子邮件时,它可以正常工作,但是当我尝试将电子邮件发送到另一个邮件服务器(gmail)时,我收到此错误:

SMTP 错误 (454):无法添加收件人“user@gmail.com”(4.7.1:中继访问被拒绝)。

但是当我使用 Thunderbird 发送相同的电子邮件时,它可以正常工作,所以我在日志中发现:

带圆形立方体:

Dec  4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: connect from xxx.xxx.xxx.xxx
Dec  4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: warning: connect to Milter service inet:127.0.0.1:8891: Connection refused
Dec  4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: NOQUEUE: reject: RCPT from xxx.xxx.xxx.xxx: 454 4.7.1 <user@gmail.com>: Relay access denied; from=<user@domain.com> to=<user@gmail.com> proto=ESMTP helo=<mail.domain.com>
Dec  4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: disconnect from xxx.xxx.xxx.xxx ehlo=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=4/5

与雷鸟:

Dec  4 18:44:55 vpsxxxxxx postfix/smtpd[3016]: connect from unknown[xxx.xxx.xxx.xxx]
Dec  4 18:44:55 vpsxxxxxx postfix/smtpd[3016]: warning: connect to Milter service inet:127.0.0.1:8891: Connection refused
Dec  4 18:44:58 vpsxxxxxx postfix/smtpd[3016]: 64DCD5EEC4: client=unknown[xxx.xxx.xxx.xxx], sasl_method=PLAIN, sasl_username=user@domain.com
Dec  4 18:44:58 vpsxxxxxx postfix/cleanup[3019]: 64DCD5EEC4: message-id=<9bf8a7ca-9d6a-847c-5350-0f5c4350951f@domain.com>
Dec  4 18:44:58 vpsxxxxxx postfix/qmgr[2865]: 64DCD5EEC4: from=<user@domain.com>, size=1810, nrcpt=1 (queue active)
Dec  4 18:44:58 vpsxxxxxx postfix/smtpd[3016]: disconnect from unknown[xxx.xxx.xxx.xxx] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Dec  4 18:44:59 vpsxxxxxx postfix/smtp[3020]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c07::1b]:25: Cannot assign requested address
Dec  4 18:45:00 vpsxxxxxx postfix/smtp[3020]: 64DCD5EEC4: to=<user@gmail.com>, relay=gmail-smtp-in.l.google.com[66.102.1.27]:25, delay=1.7, delays=0.25/0.01/0.52/0.91, dsn=2.0.0, status=sent (250 2.0.0 OK 1543945500 f16si12703624wrt.428 - gsmtp)
Dec  4 18:45:00 vpsxxxxxx postfix/qmgr[2865]: 64DCD5EEC4: removed
Dec  4 18:45:01 vpsxxxxxx dovecot: imap-login: Login: user=<user@domain.com>, method=PLAIN, rip=xxx.xxx.xxx.xxx, lip=yyy.yyy.yyy.yyy, mpid=3025, TLS, session=<HDgM0zV8EcXE5dog>
Dec  4 18:45:01 vpsxxxxxx dovecot: imap-login: Login: user=<user@domain.com>, method=PLAIN, rip=xxx.xxx.xxx.xxx, lip=yyy.yyy.yyy.yyy, mpid=3026, TLS, session=<dIQM0zV8EsXE5dog>
Dec  4 18:45:01 vpsxxxxxx dovecot: imap(user@domain.com): Logged out in=1669 out=552

config.inc.php

<?php
$config['db_dsnw'] = 'mysql://databaseuser:password@localhost/database';
$config['default_host'] = 'localhost';
$config['smtp_server'] = 'mail.domain.com';
$config['support_url'] = '';
$config['ip_check'] = true;
$config['des_key'] = 'DES_KEY';
$config['username_domain'] = 'domain.com';
$config['product_name'] = 'domain Webmail';
$config['plugins'] = array(
  'acl', 'additional_message_headers', 'archive', 'attachment_reminder', 'autologon', 
  'debug_logger', 'emoticons', 'enigma', 'example_addressbook', 'help', 'hide_blockquote', 
  'http_authentication', 'identicon', 'identity_select', 'jqueryui', 'krb_authentication', 
  'managesieve', 'markasjunk', 'new_user_dialog', 'new_user_identity', 'newmail_notifier', 
  'password', 'redundant_attachments', 'show_additional_headers', 'squirrelmail_usercopy', 
  'subscriptions_option', 'userinfo', 'vcard_attachments', 'virtuser_file', 'virtuser_query', 'zipdownload'
);
$config['language'] = 'en_EN';
$config['enable_spellcheck'] = false;
?>

domain.com 是我的域名

【问题讨论】:

    标签: email roundcube


    【解决方案1】:

    这是一个配置问题。我将它添加到 config.inc.php 并且它可以工作

    $config['smtp_server'] = 'tls://mail.domain.com';
    $config['smtp_port'] = 587;
    $config['smtp_user'] = '%u';
    $config['smtp_pass'] = '%p';
    $config['smtp_conn_options'] = array(
       'ssl' => array(
          'verify_peer'      => false,
          'verify_peer_name' => false,
       ),
    );
    

    【讨论】:

    • config.inc.php 文件在哪里?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-04-24
    • 1970-01-01
    • 2015-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多