Roundcube Community Forum

 

Failed to send message - Copy or BCC

Started by jeffshead, July 29, 2010, 02:29:04 PM

Previous topic - Next topic

jeffshead

trunk-r3836

I get the "Failed to send message" error when I add a recipient to the Copy and/or BBC field when I compose and send a message.

Sends email OK if only recipient field is filled in.

SKaero


jeffshead

#2
Here is the entry in the error log:
[29-Jul-2010 14:56:02] PHP Warning:  mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 550 Unknown user in C:\folder\mail.mysite.com\program\steps\mail\func.inc on line 1437

This is line 1437 of func.inc:
$sent = mail($to, $subject, $msg_body, $header_str, "-f$from");

jeffshead

#3
When I look in my email server log, I see the following:


&quot;SMTPD&quot; 3452 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: RCPT TO:<Webmaster <[email protected]>>&quot;
&quot;SMTPD&quot; 3452 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;SENT: 550 Unknown user&quot;
&quot;SMTPD&quot; 3436 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: QUIT&quot;
&quot;SMTPD&quot; 3436 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;SENT: 221 goodbye&quot;
&quot;SMTPD&quot; 3428 43298 &quot;2010-07-29 15:07:34.421&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: RCPT TO:<<[email protected]>>&quot;
&quot;SMTPD&quot; 3428 43298 &quot;2010-07-29 15:07:34.421&quot; &quot;127.0.0.1&quot; &quot;SENT: 550 Unknown user&quot;
&quot;SMTPD&quot; 3416 43298 &quot;2010-07-29 15:07:34.421&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: QUIT&quot;


Notice the double << and >>

Could that be the issue? Maybe RC needs to strip some things from the Copy and BCC email addresses to achieve the proper format so the email server can handle the addresses.

SKaero

Not sure but it seem to be a mail server problem, the SVN is working fine for me.

jeffshead

#5
I'm using hMailServer 5.3.2-B1769.

I just reverted back to RC 0.4Beta and I get the same results.

If I use Outlook 2007 (desktop) to send messages using the CC and BCC fields, it works.

Anyone else run into this?

jeffshead

I just made a temporary swith from hMailServer to ISMail EP and get the same results.

I don't think this is a server issue.

Here is a line from the ISMail server log:
2010-07-29 16:37:38 <TRACE-2>: SmtpReceiver: 0002: Problem extracting an address from the string '<Webmaster <[email protected]>>':

jeffshead

Switched back to hMailServer and also find this is the awstats log:

2010-07-29 17:38:48 [email protected] [email protected] 127.0.0.1 127.0.0.1 SMTP ? 550 0

Notice "[email protected]"

Should be [email protected]

jeffshead

#8
I did some more testing.

I disabled all plug-ins and get the same results.

If I let RC populate the Recipient and Copy fields (as pictured below), I get the following in my hMailServer logs:


&quot;SMTPD&quot; 13284 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 220 mysite.com ESMTP&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: HELO No2&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 250 Hello.&quot;
&quot;SMTPD&quot; 13284 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: MAIL FROM:<[email protected]>&quot;
&quot;SMTPD&quot; 13284 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 250 OK&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: RCPT TO:<[email protected]>&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 250 OK&quot;
&quot;SMTPD&quot; 13996 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; [COLOR=Red]&quot;RECEIVED: RCPT TO:<Postmaster <[email protected]>>&quot;[/COLOR]
&quot;SMTPD&quot; 13996 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 550 Unknown user&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: QUIT&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 221 goodbye&quot;

("RECEIVED: RCPT TO:>" should be: "RECEIVED: RCPT TO")

and

2010-07-29 19:01:52 [email protected] [email protected] 127.0.0.1 127.0.0.1 SMTP ? 550 0


If I manually enter addresses in the Recipient and Copy fields (as pictured below), I get the following in my hMailServer logs:


"SMTPD" 13284 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "SENT: 220 mysite.com ESMTP"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "RECEIVED: HELO No2"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "SENT: 250 Hello."
"SMTPD" 13284 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "RECEIVED: MAIL FROM:"
"SMTPD" 13284 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "RECEIVED: RCPT TO:"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 14136 1007 "2010-07-29 19:47:04.625" "127.0.0.1" [COLOR=red]"RECEIVED: RCPT TO:<>"[/COLOR]
"SMTPD" 14136 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "SENT: 550 Unknown user"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "SENT: 221 goodbye"

("RECEIVED: RCPT TO:<>" should be: "RECEIVED: RCPT TO:")

and

2010-07-29 19:47:04 [email protected] [email protected] 127.0.0.1 127.0.0.1 SMTP ? 550 0


Please notice how the email addresses are formated in the logs. The address in the Recipient field is always formatted correctly no matter if RC populates the field or if it's entered manually. The email address in the Copy field gets formatted differently but is never in a format that enables the email server to extract a usable address.

jeffshead

I switched from PHP mail() to SMTP and do not encounter this problem.

Anyone have any ideas as to why this occurs with PHP mail() funtion but not SMTP?

SKaero

It may be a DNS problem of some kind, can you turn on more debugging logs on the mail server?