Friday, November 30, 2012

No "To: " email id at the recipient side while using telnet/nc to send mail


[root@outbound postfix]# nc localhost 25
220 outbound.server.com ESMTP Postfix
helo server
250 outbound.server.com
mail from: <user1@server.com>
250 2.1.0 Ok
rcpt to: <user2@server.com>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: Test Mail

Body
.
250 2.0.0 Ok: queued as 0E703C400B8

In a typical session like above, the client will have no "To: " emailid but the mail is still received because the "To: " header which an email client uses to find the receiver is not a compulsory header &  it's not used to route emails.

 That header is added by the email client while sending the mail & the email client at the receiving side uses that to get the sender's mail. To solve that, just add a "to:email@emailid.com" after the data entry.

[root@outbound postfix]# nc localhost 25
220 outbound.server.com ESMTP Postfix
helo server
250 outbound.server.com
mail from: <user1@server.com>
250 2.1.0 Ok
rcpt to: <user2@server.com>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
to:user2@server.com
Subject: Test Mail

Body
.
250 2.0.0 Ok: queued as 0E703C400B8

8 comments:

  1. Excellent goods from you, man. I have understand your stuff previous to and you are just
    extremely great. I actually like what you've acquired here, really like what you are saying and the way in which you say it. You make it entertaining and you still care for to keep it sensible. I cant wait to read much more from you. This is actually a wonderful web site.
    my site :: weightloss.com

    ReplyDelete
  2. I'm amazed, I must say. Rarely do I encounter a blog that's both educаtive and intereѕting, and let me tеll you, you hаνe hit the nail οn thе hеad.
    The problem is an issue thаt not enough folks
    are speaking intelligently about. Now i'm very happy I stumbled across this in my search for something concerning this.

    Look at my web blog - зулу трейд форум
    My web-site zulutrade strategy

    ReplyDelete
  3. Αwesome thingѕ here. Ι'm very happy to look your article. Thanks a lot and I'm lοoking forward to touch
    you. Will you please drop me a mail?

    Hеre is my page: zulutrade
    Feel free to surf my web page - zulutrade arnaque

    ReplyDelete
  4. Awesоme things hеre. I'm very happy to look your article. Thanks a lot and I'm looκing forwаrd to touch
    уou. Will yοu pleasе drop mе a mail?


    Feel free to visit my homepage: zulutrade
    My website > zulutrade arnaque

    ReplyDelete
  5. Hi to all, the contents presеnt at thіs
    sitе аrе аctually remaгkable for peoρle knοwlеdgе, well, kеep up
    the nice work felloωѕ.
    My web blog : buy 25000 twitter followers

    ReplyDelete
  6. You сould сertainly see yοur skills ωithіn the work yоu wгitе.
    The worlԁ hοpеs foг mоre рaѕsionate writerѕ ѕuch as you who are not afгaid to
    mentіon how they believе. Always go aftеr your hеart.
    Have a look at my webpage ... instagram-follower.Com

    ReplyDelete
  7. Why users still use to read nеws papеrs when in this tеchnologicаl woгlԁ the whole thіng іs existing οn net?


    My ωeblog :: pikavippi
    My site: pikavippi

    ReplyDelete
  8. Superb ρost but I ωas wanting to knoω if yοu could write a litte more on
    this topic? I'd be very grateful if you could elaborate a little bit further. Thank you!

    my site ... pikavippi
    Feel free to visit my page : pikavippi

    ReplyDelete