简体   繁体   English

Pear Mail-收件人地址被拒绝-错误

[英]Pear Mail - Recipient address rejected - Error

I am running into the following error using Pear Mail: 我在使用Pear Mail时遇到以下错误:

Notice: Error in sending mail: Failed to add recipient: user@domain.com [SMTP: Invalid response code received from server (code: 550, response: 5.1.1 : Recipient address rejected: User unknown in virtual mailbox table)] in /PEAR/PEAR.php on line 873

The email is not sent. 电子邮件未发送。 Other email addresses such as Gmail and Yahoo are working OK. 其他电子邮件地址,例如Gmail和Yahoo都可以正常工作。 It only errors for specific email clients, as far as I am aware. 据我所知,它仅对特定的电子邮件客户端错误。

I am using the following script to send the queued mail: 我正在使用以下脚本发送排队的邮件:

require_once "Mail/Queue.php";

$db_options['type']        = 'mdb2';
$db_options['dsn']         = 'mysql://username:password@localhost/db';
$db_options['mail_table']  = 'mailqueue';
$mail_options['driver']    = 'smtp';
$mail_options['host']      = 'hostAddress';
$mail_options['port']      = 25;
$mail_options['localhost'] = 'localhost'; //optional Mail_smtp parameter
$mail_options['auth']      = false;
$mail_options['username']  = 'user@domain.com';
$mail_options['password']  = 'password'; 

$max_amount_mails = 100;
$mail_queue =& new Mail_Queue($db_options, $mail_options);
$mail_queue->sendMailsInQueue($max_amount_mails);

Does anyone have any ideas why this error would be caused for specific addresses? 有谁知道为什么会为特定地址导致此错误?

I am running PHP5.2/Apache2(CentOS 5.5)/Pear Mail 1.2.0/Pear Mail Queue 1.2.6/ 我正在运行PHP5.2 / Apache2(CentOS 5.5)/ Pear Mail 1.2.0 / Pear Mail Queue 1.2.6 /

Thank you 谢谢

My goodness, that error message has more padding than error! 我的天哪,该错误消息比错误有更多填充! Let's split it out a bit. 让我们将其分开。

Notice: 
Error in sending mail: 
Failed to add recipient: user@domain.com 
[SMTP: 
Invalid response code received from server 
(code: 550, 
response: 5.1.1 : 
Recipient address rejected: 
User unknown in virtual mailbox table)]

That last line is the only one we care about. 最后一行是我们关心的唯一一行。

The SMTP server looked up the address you were using and is complaining that the user could not be located. SMTP服务器查找了您正在使用的地址,并抱怨找不到用户。 In other words the address is bogus and is being rejected. 换句话说, 该地址是虚假的 ,正在被拒绝。

Somehow that recipient's email is being treated as local mail (eg domain.com points at your local server, and the username doesn't exist on your machine. Do a DNS lookup on that recipient's domain and see what their MX settings are: 以某种方式,收件人的电子邮件被视为本地邮件(例如, domain.com指向您的本地服务器,并且您的计算机上不存在用户名。在该收件人的域上进行DNS查找,并查看其MX设置是什么:

$ host -t mx domain.com
domain.com mail is handled by 10 someserver.domain.com
$ host someserver.domain.com
someserver.domain.com has address x.x.x.x

Possibly the MX host is a "gag" domain, such as localhost , or where the MX server has an IP of 127.0.0.1, which fools spammers into spamming themselves. 可能MX主机是一个“ gag”域,例如localhost ,或者MX服务器的IP为127.0.0.1,从而使垃圾邮件发送者蒙骗了自己。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM