Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

[RESOLVED] Smtp email rejected

Erwin69

New member
Joined
Jan 6, 2012
Messages
50
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
 

PlausiblyDamp

New member
Joined
Dec 8, 2016
Messages
1,190
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.
 

Erwin69

New member
Joined
Jan 6, 2012
Messages
50
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!
 

jdc2000

New member
Joined
Oct 12, 2001
Messages
1,597
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.
 

Erwin69

New member
Joined
Jan 6, 2012
Messages
50
Re: Smtp email rejected

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

techgnome

PowerPoster
Joined
May 15, 2002
Messages
32,778
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!

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
 

Erwin69

New member
Joined
Jan 6, 2012
Messages
50
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
 

jdc2000

New member
Joined
Oct 12, 2001
Messages
1,597
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.
 

Erwin69

New member
Joined
Jan 6, 2012
Messages
50
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...
 

Erwin69

New member
Joined
Jan 6, 2012
Messages
50
[SOLVED] Re: Smtp email rejected

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

Everybody thanks for their suggestions.
 
Top