550 Rejected by SpamCop - when using Sendgrid

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
DrmCa
Normal user
Normal user
Posts: 81
Joined: 2011-02-14 21:30

550 Rejected by SpamCop - when using Sendgrid

Post by DrmCa » 2020-10-22 15:01

Hi!

I am developing a plugin for our software, to send via Sendgrid. My setup on Sendgrid is complete, and I am able to send and to receive "Accepted" status from their response object.
The email I sent appears under blocked on Sendgrid, and the error message is in the subject.
I am not sure which setting of my hMailServer determines that emails sent through Sendgrid should be rejected.
The from address on Sendgrid is my own email address, and I send to myself as well.
Emails from Sendgrid itself (account registration and activation, etc) are received fine. Only my own emails sent through their API are rejected.

The subject of the email I am trying to send is "Testing email notifications", the body contains "test email", and there is an attachment in plain text that has 2 lines: "test attachment1" and "test attachment2"

I see that bl.spamcop.net is enabled but I do not know what they do and why they only block Sendgrid. This raises another question: had anyone else been blocked historically, without me knowing? I did not get such impression, since all normal communications that I am involved in are delivered fine, but I am no longer sure.

What am I missing?

Thank you!
Last edited by DrmCa on 2020-10-22 15:13, edited 2 times in total.

User avatar
RvdH
Senior user
Senior user
Posts: 1136
Joined: 2008-06-27 14:42
Location: Netherlands

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by RvdH » 2020-10-22 15:02

Don't spam :lol:
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

DrmCa
Normal user
Normal user
Posts: 81
Joined: 2011-02-14 21:30

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by DrmCa » 2020-10-22 15:03

Very funny. Spamming is what you had just written. Do you seriously believe that you are being helpful?

User avatar
RvdH
Senior user
Senior user
Posts: 1136
Joined: 2008-06-27 14:42
Location: Netherlands

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by RvdH » 2020-10-22 15:06

Tell me, how is your question related to hMailServer?
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

User avatar
mattg
Moderator
Moderator
Posts: 21103
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mattg » 2020-10-22 16:30

DrmCa wrote:
2020-10-22 15:01
I am not sure which setting of my hMailServer determines that emails sent through Sendgrid should be rejected.

https://www.hmailserver.com/forum/viewt ... =2&t=24693


Seriously though, there is no setting in hMailserver to allow mail through sendgrid
If sendgrid is blocking your mail, ASK THEM WHY


or more simply
RvdH wrote:
2020-10-22 15:02
Don't spam :lol:
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

mikedibella
Normal user
Normal user
Posts: 230
Joined: 2016-12-08 02:21

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mikedibella » 2020-10-22 17:52

When SendGrid receives a protocol error from a remote relay during mail submission, the error is dispatched back to you in the evert hook. So SendGrid is telling you that the recipient's server rejected the mail for the reason stated. Some errors also result in addresses being added to the various suppression lists. SendGrid documentation is best to understand this behavior.

DrmCa
Normal user
Normal user
Posts: 81
Joined: 2011-02-14 21:30

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by DrmCa » 2020-10-22 20:15

mikedibella wrote:
2020-10-22 17:52
When SendGrid receives a protocol error from a remote relay during mail submission, the error is dispatched back to you in the evert hook. So SendGrid is telling you that the recipient's server rejected the mail for the reason stated. Some errors also result in addresses being added to the various suppression lists. SendGrid documentation is best to understand this behavior.
This is exactly my point. My hMailServer is telling Sendgrid the error in the subject. I am wondering why it does.
I did reach out to Sendgrid and they told me exactly the same thing: that their IP pool is sometimes getting blacklisted by SpamCop.
But the bottom line is, it is my hMailServer (and when I say 'mine' I mean that it is in my infrastructure, not my provider's or any 3d party) is rejecting mail coming from Sendgrid.
mattg wrote:
2020-10-22 16:30
RvdH wrote:
2020-10-22 15:02
Don't spam :lol:
Through my own research I found that my only 2 options are either to disable SpamCop or to wait until Sendgrid gets their act together and negotiates with SpamCop that they de-blacklist Sendgid's shared IP pool (it may even be 1 single IP address on their pool that my email happened to come through). I thought that someone here could point me in the right direction earlier, but you focused on attacking me instead.

PS: I do not understand why you are viciously attacking an innocent victim. Sendgrid is for spamming like HTTP is for child porn. I cannot help it: I have to develop a wrapper for Sendgrid API for an infrastructure monitoring application, but you keep attacking me personally. Give your head a shake. I've done nothing wrong to upset you.

mikedibella
Normal user
Normal user
Posts: 230
Joined: 2016-12-08 02:21

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mikedibella » 2020-10-22 21:19

The remote server only sees SendGrid's IP on connection. Your server is listed in the headers, but the receiving party is going to use the connecting relay's (SendGrid) IP to determine reputation. You are probably using a shared IP plan from SendGrid and the IP your are sharing has been blacklisted by someone else behavior. There is nothing you can do to fix this except upgrade to a dedicated IP plan or use a different relayer.

palinka
Senior user
Senior user
Posts: 2172
Joined: 2017-09-12 17:57

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by palinka » 2020-10-22 21:24

DrmCa wrote:
2020-10-22 20:15
PS: I do not understand why you are viciously attacking an innocent victim. Sendgrid is for spamming like HTTP is for child porn. I cannot help it: I have to develop a wrapper for Sendgrid API for an infrastructure monitoring application, but you keep attacking me personally. Give your head a shake. I've done nothing wrong to upset you.
Firstly, it wasn't vicious by even the broadest standard.

Secondly, you have to understand - there is a certain cadre of spammers that come here for help in spamming. If there's even a quantum of an iota of a chance that a poster is a spammer, they get shut out with extreme prejudice. Sometimes, unfortunately, that results in "false positives". If you're not a spammer, don't take it personally. This is an email board, after all.

If you want to see vicious, post a photo of a fish with an identifiable landmark in the background on my fishing forum. Hoooboy... Nothing brings out the vicious like spot burning.

User avatar
RvdH
Senior user
Senior user
Posts: 1136
Joined: 2008-06-27 14:42
Location: Netherlands

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by RvdH » 2020-10-22 22:13

Attacking? Maybe i an guilty of making fun of you a little :wink:

Before you edited your initial post there was no mention of e-mail receiving from sendgrid by your hmailserver instance that triggered that message, hence it only looked like sendgrid returned that message when you send mail to it
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

DrmCa
Normal user
Normal user
Posts: 81
Joined: 2011-02-14 21:30

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by DrmCa » 2020-10-22 23:36

palinka wrote:
2020-10-22 21:24
Firstly, it wasn't vicious by even the broadest standard.
Being accused of spamming on the internet is about the same as being accused of a murder in real life, so yes, this was vicious.
I joined this forum 10 years ago and posted only relevant content in the most friendly manner but no one cares to even give a benefit of the doubt.
While businesses are dumping on-premise SMTP servers, I have and always will use hMailServer for my business, but I cannot help about what software I develop. If the client orders Sendgrid API, I have to make a living and develop it. So anyone's anger directed at me is misdirected.

User avatar
mattg
Moderator
Moderator
Posts: 21103
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mattg » 2020-10-23 01:28

Not being rude, and certainly not being angry...
mattg wrote:
2020-10-22 16:30
If sendgrid is blocking your mail, ASK THEM WHY
Without knowing Sendgrid at all, mikedibella's advice seems reasonable
mikedibella wrote:
2020-10-22 21:19
The remote server only sees SendGrid's IP on connection. Your server is listed in the headers, but the receiving party is going to use the connecting relay's (SendGrid) IP to determine reputation. You are probably using a shared IP plan from SendGrid and the IP your are sharing has been blacklisted by someone else behavior. There is nothing you can do to fix this except upgrade to a dedicated IP plan or use a different relayer.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Virinum
Normal user
Normal user
Posts: 134
Joined: 2018-11-23 14:42
Location: Germany

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by Virinum » 2020-10-23 06:37

So just to be sure I understand your problem right:

You’ve written a piece of software which sends mails via Sendgrid. This works, right?
Your problem is that if your sending mails to your own mailserver (hMailServer) it gets blocked because of spamcop. Right so far?

Because if so I can understand why you feel offended. I see no reason to think that your sending spam.

You could lower spamcops score or disable this Anti-Spam-Test completely. See Settings -> Anti-spam -> DNS blacklists.

User avatar
mattg
Moderator
Moderator
Posts: 21103
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mattg » 2020-10-23 09:11

Virinum wrote:
2020-10-23 06:37
So just to be sure I understand your problem right:

You’ve written a piece of software which sends mails via Sendgrid. This works, right?
Your problem is that if your sending mails to your own mailserver (hMailServer) it gets blocked because of spamcop. Right so far?
That's not how I read it all - but you may well be correct
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

palinka
Senior user
Senior user
Posts: 2172
Joined: 2017-09-12 17:57

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by palinka » 2020-10-23 15:09

DrmCa wrote:
2020-10-22 23:36
palinka wrote:
2020-10-22 21:24
Firstly, it wasn't vicious by even the broadest standard.
Being accused of spamming on the internet is about the same as being accused of a murder in real life, so yes, this was vicious.
Hmmmm....... That's interesting. Let's review:

A) Someone hurt your feelings

vs

B) Arrest, prosecution, $$$ to defend yourself, reputation defamed publicly, lost career & work opportunities, possible prison sentance, nightmares about dropping the soap, etc, etc.

Yeah, they totally are "about the same".

User avatar
SorenR
Senior user
Senior user
Posts: 3818
Joined: 2006-08-21 15:38
Location: Denmark

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by SorenR » 2020-10-23 15:12

Virinum wrote:
2020-10-23 06:37
So just to be sure I understand your problem right:

You’ve written a piece of software which sends mails via Sendgrid. This works, right?
Your problem is that if your sending mails to your own mailserver (hMailServer) it gets blocked because of spamcop. Right so far?

Because if so I can understand why you feel offended. I see no reason to think that your sending spam.

You could lower spamcops score or disable this Anti-Spam-Test completely. See Settings -> Anti-spam -> DNS blacklists.
+1

If sendgrid is marked as SPAM by bl.spamcop.net then it is an issue between sendgrid and spamcop.

SPAM is not on the same level as murder. SPAM is somewhat on the same level as #MeToo/Accused sexism; you can choose to believe it or you can ignore it.
DDOS however is comparable to murder!
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by jimimaseye » 2020-10-23 18:57

Boys and Girls.

Keep focus.

OP has a problem and some lighted hearted responses got taken out of context (such is the nature of black and white text on a forum compared to a verbal voice that has definite intination to define intended tone). Im sure no malice was intended and 2nd language English is difficult for some (Hell knows, even Mother Tongue language gives some of us problems).

Lets drop the 'defend against the undefendable' attempts. Lets just get on to dealing with the problem in hand.

*shoulder bumps all round*
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
SorenR
Senior user
Senior user
Posts: 3818
Joined: 2006-08-21 15:38
Location: Denmark

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by SorenR » 2020-10-23 20:17

jimimaseye wrote:
2020-10-23 18:57
Keep focus.
Allways!
jimimaseye wrote:
2020-10-23 18:57
*shoulder bumps all round*
Corona.jpg
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

mikedibella
Normal user
Normal user
Posts: 230
Joined: 2016-12-08 02:21

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mikedibella » 2020-10-23 20:34

@DrmCa: PM me if you want to take this discussion off the clothesline.

User avatar
SorenR
Senior user
Senior user
Posts: 3818
Joined: 2006-08-21 15:38
Location: Denmark

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by SorenR » 2020-10-23 21:16

I had a quick browse thru my logs... 90% of my subscribed mailinglist emails coming from a sendgrid.net server I had to whitelist at some point in time. 70% of all other emails coming from a sendgrid.net server are tagged as SPAM by SpamAssassin.

That is just for servers in the 149.72.0.0 - 149.72-255.255 range.

That is just October so far.
Last edited by SorenR on 2020-10-23 21:22, edited 1 time in total.
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by jimimaseye » 2020-10-23 21:21

SorenR wrote:
2020-10-23 21:16
70% of all other emails coming from a sendgrid.net server are tagged as SPAM by SpamAssassin.
Under what rules (and what score?)
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
SorenR
Senior user
Senior user
Posts: 3818
Joined: 2006-08-21 15:38
Location: Denmark

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by SorenR » 2020-10-23 21:23

jimimaseye wrote:
2020-10-23 21:21
SorenR wrote:
2020-10-23 21:16
70% of all other emails coming from a sendgrid.net server are tagged as SPAM by SpamAssassin.
Under what rules?
Standard SpamAssassin (default rules), plus Bayes.
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

mikedibella
Normal user
Normal user
Posts: 230
Joined: 2016-12-08 02:21

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mikedibella » 2020-10-23 22:20

SendGrid suffered an incursion in August and a large number of customer accounts were compromised.

https://krebsonsecurity.com/2020/08/sen ... -accounts/

Spammer quickly hoovered up the account and the resulting spam assault BL many SendGrid IPs.

They are still recovering.

palinka
Senior user
Senior user
Posts: 2172
Joined: 2017-09-12 17:57

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by palinka » 2020-10-25 20:14

mikedibella wrote:
2020-10-23 22:20
SendGrid suffered an incursion in August and a large number of customer accounts were compromised.

https://krebsonsecurity.com/2020/08/sen ... -accounts/

Spammer quickly hoovered up the account and the resulting spam assault BL many SendGrid IPs.

They are still recovering.
I've had spammy issues with sendgrid well predating August.

I really hate places like sendgrid. They don't do much to deter spam, and yet they're a major player and therefore they host a ton of legit mail. It makes blocking them untenable, and lots of other rules must be created to deal with their spam. Outlook.com is another one like this.

I hate gmail for other reasons, but at least they have a serious and effective spam policy.

mikedibella
Normal user
Normal user
Posts: 230
Joined: 2016-12-08 02:21

Re: 550 Rejected by SpamCop - when using Sendgrid

Post by mikedibella » 2020-10-25 20:47

More and more, IaaS IP ranges are blacklisted. Makes hosting direct mailing on the major IaaS providers clouds increasingly impractical. Relay providers solve this issue, so I see their use uptrending, not diminishing.

Post Reply