Welcome, Guest. Please login or register.
May 17, 2012, 02:57:14 pm
Home Help Search Login Register
News: SMF Forum plugin now available: Code Samples

BotScout  |  General Category  |  BotScout Discussion (Moderator: MysteryFCM)  |  Topic: Mail failure - malformed recipient address « previous next »
Pages: [1] Print
Author Topic: Mail failure - malformed recipient address  (Read 1218 times)
dgswislon
Newbie
*
Posts: 5


View Profile
« on: April 10, 2011, 04:30:56 pm »

Botscout working great, thanks, I think my problem lies in SMF forum config, just not sure where. Below is the "Mail failure" which accompanies botscout report. I think the keywords are in the first sentence "you sent", thought I'd see if anyone else had this problem and where they went to resolve it. Thanks ... Doug

Quote
A message that you sent contained one or more recipient addresses that were
incorrectly constructed:

  xxxx@xxxx.com <xxxx@xxxx.com>: malformed address:
<xxxx@xxxx.com> may not follow xxxx@xxxx.com

This address has been ignored. The other addresses in the message were
syntactically valid and have been passed on for an attempt at delivery.

------ This is a copy of your message, including all the headers. ------

To: xxxx@xxxx.com
Subject: Bot Attempt Stopped
To: xxxx@xxxx.com <xxxx@xxxx.com>
From: BotBuster System <BotBuster System>
 X-Mailer: PHP 4.x
Message-Id: <E1Q935u-0006Yo-6a@xxxx.com>
Date: Sun, 10 Apr 2011 15:26:58 -0700

A bot tried to register, but was stopped from doing so.

Bot Name: balkonreont
Bot Email: balkon77777%40gmail.com
IP Address: 109.173.22.246
Logged
Mike
Administrator
Sr. Member
*****
Posts: 280



View Profile
« Reply #1 on: April 10, 2011, 05:18:45 pm »

I'm not 100% sure of the cause, but I think I know what's going on.

It looks like you're sending the email parameter in the form "name@email.com <name@email.com>"

It should just be "name@email.com". The email parameter expects just an email address by itself, and somehow it appears that you're sending the email address followed by the email address in brackets.

It's also possible that you may need to do a tweak to the BotScout code  (or possibly the SMF code). Some servers have trouble with the bare form of the header "From: xxx@xxx.com" setting and need to have the email "From" address set with the "-f" parameter in PHP's mail() command. So instead of this:

mail($to, $subject, $message, $headers);

You might need to do this:

mail($to, $subject, $message, $headers, '-fname@mail.com');





Botscout working great, thanks, I think my problem lies in SMF forum config, just not sure where. Below is the "Mail failure" which accompanies botscout report. I think the keywords are in the first sentence "you sent", thought I'd see if anyone else had this problem and where they went to resolve it. Thanks ... Doug

Quote
A message that you sent contained one or more recipient addresses that were
incorrectly constructed:

  xxxx@xxxx.com <xxxx@xxxx.com>: malformed address:
<xxxx@xxxx.com> may not follow xxxx@xxxx.com

This address has been ignored. The other addresses in the message were
syntactically valid and have been passed on for an attempt at delivery.

------ This is a copy of your message, including all the headers. ------

To: xxxx@xxxx.com
Subject: Bot Attempt Stopped
To: xxxx@xxxx.com <xxxx@xxxx.com>
From: BotBuster System <BotBuster System>
 X-Mailer: PHP 4.x
Message-Id: <E1Q935u-0006Yo-6a@xxxx.com>
Date: Sun, 10 Apr 2011 15:26:58 -0700

A bot tried to register, but was stopped from doing so.

Bot Name: balkonreont
Bot Email: balkon77777%40gmail.com
IP Address: 109.173.22.246
Logged

Please don't PM me for assistance- post your questions in the forum where others can see them.
dgswislon
Newbie
*
Posts: 5


View Profile
« Reply #2 on: April 10, 2011, 07:21:50 pm »

Before I do anything - are you talking about the botscout.php and this code (near bottom) -

mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n X-Mailer: PHP 4.x");

This looks familiar where - "From: $fromText <$fromText>"

Logged
Mike
Administrator
Sr. Member
*****
Posts: 280



View Profile
« Reply #3 on: April 10, 2011, 08:20:17 pm »

Probably. Since the emails you're getting are coming from the BotScout code, I'd make the change there first.

Before I do anything - are you talking about the botscout.php and this code (near bottom) -

mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n X-Mailer: PHP 4.x");

This looks familiar where - "From: $fromText <$fromText>"


Logged

Please don't PM me for assistance- post your questions in the forum where others can see them.
dgswislon
Newbie
*
Posts: 5


View Profile
« Reply #4 on: April 11, 2011, 03:25:50 am »

Changed this:

mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n X-Mailer: PHP 4.x");

To this:

mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText \n X-Mailer: PHP 4.x");

result is no change. If this (above) is the correct line to edit, would you add this '-fname@mail.com' into the line so I can see how it should look

Logged
Mike
Administrator
Sr. Member
*****
Posts: 280



View Profile
« Reply #5 on: April 11, 2011, 05:49:34 am »

Try changing the line to this:

mail($toText, $subjectText, $msgText, "To: $toText \n" . "From: $fromText \n ");

or possibly this:


mail($toText, $subjectText, $msgText,  '-fname@mail.com');

(replace "name@mail.com" with your email address)
Logged

Please don't PM me for assistance- post your questions in the forum where others can see them.
dgswislon
Newbie
*
Posts: 5


View Profile
« Reply #6 on: April 11, 2011, 06:19:10 am »

Thanks Mike, as it turns out, the problem was in this line:

"To: $toText <$toText>\n"

When I removed <$toText> I got botscout reports without malformed email error ( edit on - line 261 botscout.php)

Thanks again for the forum and response, Doug
Logged
Mike
Administrator
Sr. Member
*****
Posts: 280



View Profile
« Reply #7 on: April 11, 2011, 06:29:32 am »

Thanks again for the forum and response, Doug

Glad to help. We may make some edits to the standard code, based on this issue.
Logged

Please don't PM me for assistance- post your questions in the forum where others can see them.
Pages: [1] Print 
BotScout  |  General Category  |  BotScout Discussion (Moderator: MysteryFCM)  |  Topic: Mail failure - malformed recipient address « previous next »
Jump to:  


Login with username, password and session length

BotScout - Mail failure - malformed recipient address

SEO light theme by © Mustang forums. Powered by SMF 1.1.16 | SMF © 2011, Simple Machines