Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oliverw92

macrumors newbie
Original poster
Jan 9, 2009
7
0
Hi there,

I have started to look into making a simple email client that might be web based, but i am not sure of that yet. i have been experimenting with some telnet sockets from terminal and some php raw sockets. however i have come across a problem when connecting to mobileme mail. i can log on successfully and enter all the data but once i have finished the data header i get this error: <-- 550 5.7.0 From address is not one of your addresses. i have no idea what it means. i tried using a packet sniffer to see what Mail sends when it sends mail and i then compared this to what my simple php script sends and i cannot see any differences. i was wondering if anyone had any insight on this matter. here are the logs from the packet sniffer and my php script

I posted this thread in mac programming but thought it might be better off here. ill see though :)

packet sniffer on Mail:

Code:
220 asmtp017-bge351000 -- Server ESMTP (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug  7 2008; 32bit))
EHLO [192.168.1.2]
250-asmtp017-bge351000
250-8BITMIME
250-PIPELINING
250-CHUNKING
250-DSN
250-ENHANCEDSTATUSCODES
250-EXPN
250-HELP
250-XADR
250-XSTA
250-XCIR
250-XGEN
250-XLOOP B3FA32E97381AA9B8EDF29D61AC112A1
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=LOGIN
250-NO-SOLICITING
250 SIZE 0
AUTH PLAIN base64ofuserandpass
235 2.7.0 PLAIN authentication successful.
MAIL FROM:<oliverw92@mac.com>
250 2.5.0 Address Ok.
RCPT TO:<oliverw92@mac.com>
250 2.1.5 oliverw92@mac.com OK.
DATA
354 Enter mail, end with a single ".".
Message-Id: <06199306-8C21-4FE6-B4A4-68F4E185F901@mac.com>
From: Oliver Woodings <oliverw92@mac.com>
To: Oliver Woodings <oliverw92@mac.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Subject: hi noob
Date: Sun, 25 Jan 2009 22:52:49 +0000
X-Mailer: Apple Mail (2.930.3)

HAI
.

from php script:

Code:
<-- 220 asmtpout022.mac.com -- Server ESMTP (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug  7 2008; 32bit))
--> EHLO [192.168.1.2]
<-- 250-asmtpout022.mac.com
--> AUTH PLAIN base64ofuserandpass
<-- 250-8BITMIME
<-- 250-PIPELINING
<-- 250-CHUNKING
<-- 250-DSN
<-- 250-ENHANCEDSTATUSCODES
<-- 250-EXPN
<-- 250-HELP
<-- 250-XADR
<-- 250-XSTA
<-- 250-XCIR
<-- 250-XGEN
<-- 250-XLOOP 39B5EB74C4B62EEE8D93ABA70E0A0CB7
<-- 250-STARTTLS
<-- 250-AUTH PLAIN LOGIN
<-- 250-AUTH=LOGIN
<-- 250-ETRN
<-- 250-NO-SOLICITING
<-- 250 SIZE 0
<-- 235 2.7.0 PLAIN authentication successful.
--> MAIL FROM:<oliverw92@mac.com>
<-- 250 2.5.0 Address Ok.
--> RCPT TO:<oliverw92@mac.com>
<-- 250 2.1.5 oliverw92@mac.com OK.
--> DATA
<-- 354 Enter mail, end with a single ".".
--> Message-Id: <06199306-8C21-4FE6-B4A4-68F4E185F901@mac.com>
From: Oliver Woodings <oliverw92@mac.com>
To: Oliver Woodings <oliverw92@mac.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Subject: hi noob
Date: Sun, 25 Jan 2009 22:52:49 +0000
X-Mailer: Apple Mail (2.930.3)

HAI
--> .
<-- 550 5.7.0 From address is not one of your addresses.
 

TLewis

macrumors 65816
Sep 19, 2007
1,311
129
i can log on successfully and enter all the data but once i have finished the data header i get this error: <-- 550 5.7.0 From address is not one of your addresses.
Generally, this means that MM believes that your "from" address (oliverw92@mac.com) "doesn't belong to you". It's typically an anti-spam/anti-forgery "feature" enforced by the mail sender.

Now, "oliverw92@mac.com" may belong to you, but the system doesn't think so. Are you using a different login/account? You probably have to use the same address that belongs to the account. (Or, maybe, MM insists on having @me.com addressses only?) Try sniffing the output of Mail.app or Thunderbird, to see what they use.
 

oliverw92

macrumors newbie
Original poster
Jan 9, 2009
7
0
the first one i posted is the output from the Mail.app being inspected from Packet Peeper. the second is what my php script outputs. im loggin on with exactly the same base64 of my user and pass (i copied and pasted what mail.app sent to make sure).

thanks for replying btw :)
 

TLewis

macrumors 65816
Sep 19, 2007
1,311
129
OK, sorry, I missed that.

IIRC, you might be running into another anti-spam countermeasure: some spam-generating programs would send EHLO followed immediately by the next command (AUTH, in your case) without waiting for the EHLO reply. I think some servers automatically assume that, if you don't wait for the EHLO reply before sending the next command (AUTH), you're a spammer, and reject your mail. Try processing the EHLO replies before sending AUTH -- the last line is "250", immediately followed by a space, and the last EHLO-param ("SIZE 0", in your example).

However, in some cases, I think the last line (the only line, possibly) might be indicated by "250" followed by the last EHLO-param (no space, and no "-"). I'm not sure. Perhaps someone who knows more about SMTP can comment.
 

oliverw92

macrumors newbie
Original poster
Jan 9, 2009
7
0
i dont know how but i have solved it! it appears to be working :) thanks for the help
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.