Results 1 to 11 of 11

Thread: [RESOLVED] Smtp email rejected

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Resolved [RESOLVED] Smtp email rejected

    Hi,

    I’m experiencing a strange problem, and after 5+ hours searching the web for solutions to no avail, I hope that someone here can help me.

    The setting:

    My ASP.net multi-language website is hosted on my own VPS, which also hosts Microsoft Exchange Server 2016. There are two forms on the website that generate an email requesting info using smtp. This has basically always worked correctly, but as we’re now implementing a Russian translation, we’re experiencing something strange.

    Sending an email from form 1 works fine with the email address sales-by@xxxx.
    Sending an email from form 2 with the same email address sales-by@xxxx, doesn’t work, but sending the exact same email using the addresses sales-ru@xxxx, sales-ua@xxxx and sales-kz@xxxx works fine.

    Similarly, sending an English email from form 2 with the email address sales-lt@xxxx works fine. However, sending a Russian email with the same address doesn’t work.

    The error is generated at the moment the system tries to send the email and says "Exception message: Mailbox unavailable. The server response was: 5.7.1 Message rejected as spam by Content Filtering."

    So, somehow a change of email address turns the content into spam? Plus the email address is on the same domain as the Exchange Server that is used for the smtp. I implemented a mail flow rule in the Exchange Server to bypass spam filtering for internal emails, but that didn’t help.

    The (simplified) code with confidential info masked to create and send the email:

    Code:
    SmtpClient smtpmail = new SmtpClient();
    smtpmail.Host = "--host-address--";
    smtpmail.UseDefaultCredentials = false;
    smtpmail.Credentials = new System.Net.NetworkCredential("--username--", "--password--");
    MailMessage mail = new MailMessage();
    mail.Subject = "Custom subject in selected language";
    mail.Body = "Custom content in selected language";
    smtpmail.Send(mail);

    Anyone an idea how to fix this?

    Thanks in advance.

    Regards,
    Erwin

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Smtp email rejected

    Are there any security products installed on the exchange server? Spam filters, AV products, etc might be detecting something in the emails they don't like - might be worth checking with the server admin and see if there is anything they can do.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: Smtp email rejected

    Thanks for the quick reply. As far as I know there is nothing special on the Exchange Server. At least I don't see anything, but I'm double checking with the (external) IT support who maintain the VPS and applications on it for me.

    However, we're sending an identical email 4 times, with 4 email addresses that are all in the same domain that is hosted on the Exchange Server, and on ISS that is on the same server. All four of them go through the same process, with or without additional security products. Three of the four send out fine, but one is considered spam, and triggers an error. That is still puzzling me!

  4. #4
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,392

    Re: Smtp email rejected

    It sounds like the error message you are getting is from the recipient's email server. What happens if you send an email using the problem From address back to the same From email address. It that works, it should let you know that this is the case.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: Smtp email rejected

    No, unfortunately that doesn't work. Still the same error message.

  6. #6
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Smtp email rejected

    Quote Originally Posted by Erwin69 View Post
    Thanks for the quick reply. As far as I know there is nothing special on the Exchange Server. At least I don't see anything, but I'm double checking with the (external) IT support who maintain the VPS and applications on it for me.

    However, we're sending an identical email 4 times, with 4 email addresses that are all in the same domain that is hosted on the Exchange Server, and on ISS that is on the same server. All four of them go through the same process, with or without additional security products. Three of the four send out fine, but one is considered spam, and triggers an error. That is still puzzling me!
    How fast are you sending these emails...

    because...

    we're sending an identical email 4 times
    Could be your problem... You're not actually using Exchange Server... you're using SMTP that's running with IIS... and when it sees this pattern, it shuts down because it thinks it's being used as a spam host.

    Is there a reason to be sending 4 identical emails to the different addresses?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: Smtp email rejected

    Hi techgnome,

    The emails are not sent quickly after each other. The comment on sending 4 identical emails was given to explain the inconsistency. Note also that the emails were to the same address, but from different addresses.

    As further background info:

    The website offers the visitor to select the county and language combination that best fits with their location. E.g. Canada + French, Canada + English, US + English, UK + English, Australia + English, etc. The problem came up when we started implementing Russian. The language applies to multiple countries where we are active. E.g. Russia, Ukraine, Belarus, Kazakhstan, etc.

    The visitor can request additional info by filling in a form. To allow the email to go to the applicable team, we've set up email addresses for each country. So, sales-ru@, sales-ua@, etc.

    When I mentioned the 4 identical emails, I was referring to the email that is generated by the website, where the only difference is the sending address. I.e. I select the Russia/Russian combi, fill out the form, and click the send button. All works fine. When I select the Ukraine/Russian combi, same thing. However, when I select the Belarus/Russian combi, the email isn't sent.

    As part of the investigations I made sure that the form is filled out exactly the same way. I even went as far as using the same display name so that the difference only was sales-ru@ vs. sales-by@...

    Hope this is a detailed enough explanation to help find a solution.

    Thanks for your support!

    Regards,
    Erwin

  8. #8
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,392

    Re: Smtp email rejected

    So it sounds like something on the sending system is not liking something, probably the -ru. A simple fix would be to use a different email address in place of the -ru address. You could try white-listing that address also, however, since it is something on your sending system causing the issue, that may not work.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: Smtp email rejected

    Well, that sounds like a pragmatic approach jdc2000, which I generally like. But as I'm dealing with a number of countries, and a range of people who follow up on the various emails, there is a whole "system" behind the email addresses. Plus it still gives me an uneasy feeling not to understand why sales-ru, sales-ua, and sales-kz work, but e.g. sales-lv, sales-ee, and sales-by not. It makes me wonder if next week all of a sudden some of the others will stop working as well...

    I'm now further investigating where the sending server is configured around spam and content filtering. But this probably is more something for an Exchange Server forum...

  10. #10
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,392

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    [SOLVED] Re: Smtp email rejected

    FYI, the problem was solved by whitelisting the domain on the Exchange Server.

    Everybody thanks for their suggestions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width