2
Mail From: command does not work all the time
Problem reported by JohnC - 4/21/2019 at 6:11 PM
Not A Problem
I have two different email clients that send a Mail From command to use an alternate from email address instead of the SMTP login username. In other words the "From:" address should be sales@mydomain.com and not the login username of send@mydomain.com.

I looked in the logs and did a comparison between the two clients:

Client A: has these relevant sequence of events and the Mail From WORKS OK:

rsp: 235 Authentication successful
Authenticated as send@mydomain.com
cmd: MAIL FROM: <sales@mydomain.com>
rsp: 250 OK <sales@mydomain.com> Sender ok

Client B: has these relevant sequence of events and the Mail From does NOT work:

rsp: 235 Authentication successful
Authenticated as send@mydomain.com
cmd: MAIL FROM:<sales@mydomain.com>
rsp: 250 OK <sales@mydomain.com> Sender ok

The ONLY difference I can see is that Client A (the one that works) inserts a space between the Mail From: command and the <sales@mydomain.com>. Where as Client B (mail from does NOT work), does not insert a space.

Why would this omission of a space cause the Mail From: command to not work?

Any help would be greatly appreciated!

2 Replies

Reply to Thread
0
Matt Petty Replied
Employee Post
In both examples I'm seeing a "250 OK" Response on the command indicating a success. They both appear to be functioning. 
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com
0
JohnC Replied
It actually turns out that to have a "From:" address that is different from the SMTP login username, the SMTP client needs to BOTH send the Mail From: command AND include the desired From: address in the Header of the email.

The SMTP client app I was using did not do the header part. So when I manually added the desired From to the header, everything then worked as desired (the From: address was what I desired).

So, it seems the Mail From: command is more a security check, but the header is what dictates the displayed From: address.

Reply to Thread