Sending e-mail with Indy SMTP vs. spam mail

Posted on 2006-05-26
Last Modified: 2010-04-05
Hello Everybody,
I am writing my own e-mail program like outlook and i devised Indy for this task. I can send e-mails from servers that requires authentication, but the other servers treat my e-mail as a spam mail. I always get those errors :
'553 Sorry, that domain isn't in my list of allowed rcpthosts.' or
'553 sorry, relaying denied from your location [ipaddress] (#5.7.1)'.
But I do not have any problem when I send an e-mail using this SMTP servers with outlook. I did some research. My problem has some thing to do with a header called <X-Library>. It was removed after Indy 9.
What am I supposed to do? How can I send e-mails with my program.
Question by:sad_man
    LVL 17

    Expert Comment

    outlook is an smtp client, and it differs from an smtp server (with relay) in that it will send mail via your ISP (or open servers like hotmail etc. as an example).

    Some servers will _never_ allow smtp from untrusted hosts, and you will never get on their list.
    even popular linux smtp servers run into this problem.
    For simplicity, you can just always send mail via your ISP instead of connecting directly to the mail recipient's smtp server. Your ISP tends to trust you since you're in their ip range.
    If you're committed to conecting directly, and your server succeeds to 80% of sites, then perhaps you could implement a "fallback" to use your ISP in those cases.
    I understand the X-Library issue.
    The thing is, many spammers also used indy, so it got a bad name. I think you get a slightly different message than the 553 you mention above, but some servers just say the same "no, go away" no matter what the reason.
    If you upgraded to Indy10, you wouldn't have the X-Library issue, and that would certainly help, but that wouldn't stop all sites from blocking you.
    The Indy 10 SMTP server has very little in the way of demos too, Indy 9 is easy enough to work out though
    Sorry I can't be of more help.

    Author Comment

    But my program is also an smtp client. I use the TIdSMTP component. Let's say I have an e-mail account whose stmp server is It does not require authentication. I can send e-mails to by outlook, but i can not use my own program for that. what could be the difference between outlook and my program??
    LVL 17

    Accepted Solution

    when you send emails with outlook to the email first goes to
    This will then forward it on.
    If you are using indy, and sending to also, but you are getting an email back with the 553 rejection notice, then it is certainly the X-library header.
    If however, you are sending directly to, then you are not doing what outlook does, and this could be either the header, or simply a case of you being untrusted

    Which version of indy are you actually using?
    if it is Indy 9, then you can manually remove/change the header causing the problem

    Author Comment

    Well yes it is Indy 9. I tried to add the x-library header. but it did not work. I also realized that  when I send an e-mail from an e-mail account which requires authentication to my yahoo mail, the x-library header was sent by Indy smtp. I do not know how and what to do.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now