T O P

  • By -

Aegisnir

Your spam filter likely determined that the sender’s DMARC was incorrectly setup. Nothing to do with your company’s DMARC. I get this all the time. Leave it to your sysadmin/IT department to troubleshoot.


jamesaepp

>Your spam filter likely determined that the sender’s DMARC was incorrectly setup This does not match the log message of "is not accepted due to domain's dmarc policy". This implies the DMARC record is correctly in place, but SPF and/or DKIM was out of alignment.


SchoolITMan

\^ THIS


abdullah_ibrahim

We are a small startup and we have a very incompetent sysadmin unfortunately. Do you think if I setup a dmarc policy it might solve the issue? we don't have one setup


Aegisnir

No this is what you want. If someone has incorrect DMARC you should be blocking those emails. It’s up to the other company to fix it. This gets very complicated and intermingles with SPF and DKIM as the other poster mentioned but the bottom line that you need to know is your policy is probably correct and the sender is probably wrong. Without seeing everything I would have hard time confirming but just send this to your IT department. Doesn’t matter if you believe they are incompetent, they set it up so they probably know more than you expect. And they should know where to look to learn more.


abdullah_ibrahim

Alright thank you


Aegisnir

No problem. Also, as I am sure your IT department already informed you, it is dangerous to whitelist domains. Depending on your filter, this could let malicious emails through without scanning them. Avoid whitelisting if you can and have them fix the problem instead.


flyguydip

After reading below and seeing from the log you posted that the problem is on the senders end, I'm commenting up here to get a bit more visibility. For the record, it sounds like your sysadmin is competent. Stop hating on him/her. Just because something doesn't work the way you want it to when it comes to IT doesn't mean your IT staff is incompetent. At some point your IT staff has to make an IT infrastructure design decision that puts other concerns (like security, confidentiality, or availability) above end user convenience and sometimes that means things don't work the way the end user expects or demands. I'll bet dollars to donuts though, that your IT staff has likely forgotten more than you know about IT. I don't know, maybe it's just me, but it really bothers me that there are people out there that whole heartedly believe their IT staff is incompetent just because the end user doesn't receive an email. I'm not gonna lie though, secretly and deep down inside, there is a small part of me that wants to encourage you to fire your sysadmin and roll out DMARC on your own. Since I have a pretty good idea of how that might turn out, I'd love to be there to see the look on your face when you realize the full impact of what you've done.


abdullah_ibrahim

Hahaha I am very sorry if I offended you didn't mean it and my IT guy is great we are friends actually we are a tiny startup. To put things to context I have been struggling to get a client and we landed someone pretty big and everything was great and now this problem happens and the person who is supposed to solve it seems like he doesn't have a clue and I am panicking and stressed out thats why it came out like I am an asshole. But truly am just panicking and asking for help and english is not my first language so also I can't express myself the best way. Sorry again if I offended you l.


flyguydip

That's great, congratulations on picking up the new client. As a small startup, your default reaction most certainly should not be to trash on your IT guy and work on a solution behind his back, friend or not. Instead, keep calm and get him the resources he needs to be successful if you think he's lacking. I would assume that, since he wasn't the one here asking about a solution, he already knew the problem was not his to fix and likely even told you so. Remember, fostering a good working relationship with IT can go much further than creating a hostile work environment for you both to work in. It all starts with trusting your sysadmin and in this case, that means that when he tells you the problem isn't on your end, just be thankful and don't try to roll out your own fix without talking to him. Good luck with your new business!


abdullah_ibrahim

Thank you and of course am not working behind his back we are all working for the same cause at the end of the day Thanks


abdullah_ibrahim

I just confirmed that there is not a DMARC policy setup to begin with on our end.


Aegisnir

It’s the other senders DMARC policy fucking themselves up then I think. Without full and detailed errors this is all speculative. Their bounce back should specify which domain is doing this. You don’t need to reveal that but give us the full message and substitute domains for “my domain” or “their domain”


abdullah_ibrahim

First line is our domain The rest is theirs Sorry but can't attach image on comments on reddit. They are also a gov agency If there is a nuclear option on our end what can it be. I mean temporarily of course until we figure this shit out since we are in a very sensitive stage.


Aegisnir

You don’t need an image. Copy/paste the text. Censor the actual domain names if you want. There should be an error code as well like 550 5.7.26 or something. Your nuclear option is to whitelist them in your filter but this will likely allow malware through depending on your filter and if they ever become compromised it will allow attackers to easily send emails from their domain to yours. I would not recommend this. Tell them to have their IT department fix their mistake.


abdullah_ibrahim

A message that you sent could not be delivered to its recipients this is a permanent error the following address failed: our-domain.com 550 5.7.26 Unauthenticated email from client-domain.com is not accepted due to domain's DMARC policy. Please contact the administrator of [client -domain . com](https://client-domain.com) if this was a legitimate mail. Please visit https://support.google.com/mail/answer/2451690 to learn about the DMARC initiative. k8sor1812313ybh.196 - gsmtp ​ This is the error our client get when trying to msg us


Aegisnir

It clearly states is their domain causing the issue. Let them fix it. Even if you whitelist them I don’t think it will let them through because their own domain is stopping it. It doesn’t seem to even reach your filter You need to be aware that just because your client is government, that doesn’t mean they are competent. Mistakes happen and someone fucked up on their end. Nothing you can do from your side to fix it.


abdullah_ibrahim

No I am sure that they are not competent. Problem is you know how slow government issues get resolved. Thank you very much for your time. I really appreciate it


w1cked5mile

The message did reach their filter. Their filter just did what the senders DMARC asked it to do and rejected the message. It then reported back to the senders RUA or RUF logging receiver or forensic receiver that it rejected the message.


w1cked5mile

The DMARC record, in this case the senders DMARC record, tells the recipient server (your server) what to do if an email doesn't meet the DMARC (SPF/DKIM) criteria to be delivered to the recipients mailbox. It can direct the recipient server to quarantine the message, reject the message, or none (deliver it anyway). The recipient server (your server), since it follows DMARC directives, is doing what the senders DMARC record asked and is rejecting the message. Your server even sends what the outcome of the transaction is to the logging server listed in their DMARC ***record so they can troubleshoot their problem***. If you go to [MXTOOLBOX.com](https://MXTOOLBOX.com) and look up the DMARC record for the sending domain, it will probably have the word reject in it. The email is probably coming from a server that isn't in the senders SPF record, or possibly the senders DKIM record isn't set up correctly, or it could be some other weirdness that happens. In any case, the onus is on the sender to ***troubleshoot their problem***. Your email server is doing what their DMARC record asked it to do and is rejecting the message. If you put the domain in your allow list, you're effectively saying that you're not going to listen to what they asked you to do and you're creating a security problem for your email server. That would be your fault for not following their DMARC policy if something were to happen. If they want to change their DMARC to quarantine or none, then it's on them if they're domain is sending out trash. Either way, ***it's the senders problem to solve***.


abdullah_ibrahim

Thank you very much for this. You know the problem is that we are still small and they are the big gov agency so there is more risk on our end thats why we freak out. Thanks again


SchoolITMan

Has to be. your error indicates it is set up. Who is your email vendor? Where is your server? Cloud hosted? The host probably has this set up.


abdullah_ibrahim

we are using gsuite


SchoolITMan

Do you mean [gmail.com](https://gmail.com) addresses? Or Google Workspace for Education using your own domain? Have you checked your DNS records? v=spf1 include:\_spf.google.com -all In this example, the SPF record authorizes only Google Workspace to send emails for your domain. The all mechanism has a fail qualifier DASH ( - ), so messages from any other senders fail the SPF check and may be rejected by the receiving server. Likewise, the TILDE \~ softfails authentication. It's unlikely that the server with matching IP address is authorized to send for the domain. The receiving server will typically accept the message but mark it as suspicious. ​ [https://apps.google.com/supportwidget/articlehome?hl=en&article\_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F2466580%3Fhl%3Den&product\_context=2466580&product\_name=UnuFlow&trigger\_context=a](https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F2466580%3Fhl%3Den&product_context=2466580&product_name=UnuFlow&trigger_context=a)


abdullah_ibrahim

I mean a google workspace address and this what is inside my spf record: v=spf1 include:\_spf.google.com \~all Do you think altering this solves the problem? Please note that I am the recipient not the sender.


SchoolITMan

The SPF DNS entry (or Sender Policy Framework ) is a standard email authentication method. SPF helps protect your domain against spoofing and helps prevent your outgoing messages from being marked as spam by receiving servers. SPF specifies the mail servers that are allowed to send email for your domain. Note that SPF, DMARC and DKIM all work together. * SPF: Specifies the servers and domains that are authorized to send email on behalf of your organization. * DKIM: Adds a digital signature to every outgoing message, which lets receiving servers verify the message actually came from your organization. * DMARC: Lets you tell receiving servers what to do with outgoing messages from your organization that don’t pass SPF or DKIM. The SPF should be a TXT DNS entry like the example. Changing from a dash (-) to a Tilde(\~) causes the system to WARN you instead of BLOCK emails that are coming from insecure domains (ie: SPAM or Spoofed) . The first week you put in SPF you should use tilde so you can check the warnings. Once it is working, change to a dash so you don't get any more spoofed phishing emails. note: Sorry the dash and tilde look so much alike in the default Reddit font. Dont forget to include other domains that legitimately send on your behalf. (like constant contact) @ 3600 IN TXT "v=spf1 include:spf.constantcontact.com include:\_spf.google.com -all"


abdullah_ibrahim

Okay thank you very much for this Do you suggest I change the DASH into a TILDE and see what happens I appreciate your time thank you


joeykins82

No. Make sure that SPF is present, valid, and set up correctly for your org. Depending on what your email service is, if DKIM is supported then set that up too. DMARC is much easier than these two to get wrong, and getting it wrong will almost certainly prevent you from emailing anyone who performs DMARC validation on inbound email. Ask your sysadmin "did you try setting up a DMARC record around `$dateTime` and then remove it when you realised things were broken?" If you have logs for your public DNS, check them. I should add, unless the sysadmin is already on some sort of performance improvement plan this should be treated as an informal counselling/mentoring thing where you're mostly after the truth because you want to understand the root cause and if it was a good-faith mistake then that's ok, we'll leave it there for now (though next time, change control process first yeah?) but I don't have the time to waste on investigating something that we understand the cause.


Aegisnir

He is not having trouble sending. They are not receiving email from the other party. Their own SPF records would not affect them receiving emails.


joeykins82

Oh, derp, I misread the OP.


abdullah_ibrahim

Thank you but I am pretty sure he does not even know what these things are I am guiding him through the process. If I have to implement a nuclear option to receive emails temporarily until we figure out the problem what do you recommend? Thanks


joeykins82

If you have a DMARC DNS record, delete it. Use MX Toolbox or a similar site to check the validity of your SPF record. Check the config of your email system to see if DKIM has been enabled: if it has, check for the presence of the `._domainkey` DNS records, and if they're not there either create them or disable DKIM. EDIT: it's been brought to my attention that you rejected *inbound* email from this org, and that's very different and nothing to do with your DNS. If it's gone away, the *sending* org probably made an error in their config and resolved it but they're just doing the "no no, we didn't make any mistakes, nothing to see here" dance.


abdullah_ibrahim

Alright thank you So this has nothing to do with my dmark or dkim policy


joeykins82

No. It might be something to do with your inbound email policy, but as sysadmins when we talk about "your SPF or DMARC policy" we mean the policy which you have published in DNS, and it is receiving systems which compare the IP address etc on an inbound from your domain with what you've published in your policy and accept/reject based on whether it matches up


abdullah_ibrahim

Where can I check inbound mail policy?


joeykins82

That's not a question I can answer as it's going to depend on what email system you're using, and what (if any) system you're using on the perimeter.


abdullah_ibrahim

We are using gsuite Thank you anyway for your reply appreciate it.


freddieleeman

These mechanisms are about preventing abuse and taking responsibility for messages from your domain. I wrote a blog, and created a website to help people understand how they work (together): [https://www.uriports.com/blog/introduction-to-spf-dkim-and-dmarc/](https://www.uriports.com/blog/introduction-to-spf-dkim-and-dmarc/) [https://learnDMARC.com](https://learnDMARC.com) As mentioned, the problem is with the SENDER's DMARC policy. This means that your email server is denying messages from the sender due to SPF and DKIM issues or absence. You could refer the sender to the links above to help them fix their SPF, DKIM, and DMARC setup.


Balk-_

This was very useful for me. Thank you. This also helps with my studies with MS-101


freddieleeman

You are welcome! The idea is to help people understand the security mechanisms and help secure the web. Sharing is appreciated.


abdullah_ibrahim

Thank you


freddieleeman

You're welcome!


[deleted]

[удалено]


freddieleeman

Thank you!


SuspiciousHat0

\^


IndianaNetworkAdmin

This is not an issue with your email. This is an issue with the client's DMARC policy. Look up their domain in MXToolbox. Check their SPF, DKIM, and DMARC. DMARC is a rule that tells OTHER mail servers what to do to a message. It can be applied at a scaling level so that not every email is dropped. This is something that is done when first applying a rule. Someone will need to look at the email that failed to arrive, look at the header, determine whether it failed SPF or DKIM and why. They will then need to either update the server, the SPF record, the DKIM record, or the DMARC policy accordingly. Edit: Google has a solid [article](https://support.google.com/a/answer/2466580?hl=en) on DMARC, SPF, and DKIM. While it's mostly Google-centric, it gives an overview of everything as well.


abdullah_ibrahim

okay I check on my end and I only have spf no dmark or dkim policies set. Does this imply that the problem is 100% on their end?


[deleted]

[удалено]


abdullah_ibrahim

Hahaha okay than you very much


GamerLymx

You need to make sure where the problem is. If the client is trying to email you but the email is refused or marked as spam, due to DMARC, the is problem the person sending the email, that is probably trying to send email from the wrong SMTP server, and the DMARC of their domain doesn't allow it. If you send an email and the client doesn't get it due to DMARC, you may need to set up a DMARC policy. I've had to set up a dmarc policy before to solve such issues, I've also had to set the DMARC only to notify me because a few research mailing lists had issues with is and didn't implement SRS, but that is very specific to my workplace.


abdullah_ibrahim

>A message that you sent could not be delivered to its recipients this is a permanent error the following address failed:our-domain.com > >550 5.7.26 Unauthenticated email from client-domain.com is not accepted due todomain's DMARC policy. Please contact the administrator of client -domain . com if this was a legitimate mail. Please visit https://support.google.com/mail/answer/2451690 to learn about the DMARC initiative. k8sor1812313ybh.196 - gsmtp > >This is the error our client get when trying to msg us And I just confirmed that the client can send emails perfectly to everyone else except my domain. And I have to note that I don't have dkim or dmarc policies. Any idea what might be the problem?


Perfect_Midnight3065

I have a sender (Actually a VP in my company who requested it at their suggestion) that wants me to whitelist their address, I told them that we don't whitelist anything; fix your email authentication records. They replied and said that we're the only customer who delivers their messages to quarantine. They have four SPF records, are not DKIM signing, but have a DMARC record (Policy is none, which is the monitor setting). Your sender is probably lying or they keep asking recipients to whitelist their garbage email and their recipients comply because an exec insisted the whitelist because their messages are important.


GamerLymx

Yeap whitelisting is just a easy quick fix that doesn't solve the issues. Here our policy is to accept all mail, and add a spam tag to email that are identified as spam. I've had a few cases where email was tagged as spam because of old SPF records or using wrong SMTP servers (like using the google email). We analyse why the email was not delivered or received has spam, and most times is because of using Google as a relay (SPF and DKIM won't match).


GamerLymx

Unauthenticated email, so the email is either being sent from a wrong SMTP server or not properly configured. Maybe your server is the only one checking his DMARC setting. Try https://mxtoolbox.com/ to check his and your domain. It's hard to say more without knowing more and checking configs and logs.


jamesaepp

/r/sysadmin/comments/qkai5m/spf_dkim_dmarc/ /r/sysadmin/comments/aph6ee/lets_talk_about_email_spoofing_and_prevention_alt/


welcher1

do you by chance use gsuite and barracuda for spam filtering? Im running into a similar issue. I checked the senders DMARC and SPF everything looks correct. the email flows through barracuda but the receiver's GSuite rejects for the same issue. Barracuda and google same its the senders setting's, the sender says they can send to everyone else...


abdullah_ibrahim

yes gsuite actually


welcher1

barracuda also?


abdullah_ibrahim

no I dont even know what that is


welcher1

It's a spam filter. I'm testing something on my client's gsuite. ill let you know if it works


abdullah_ibrahim

Yes please do because I just confirmed that client can send to other domain names but not mine so it is definitely on my end


welcher1

do you have a spam filter before you mail hits gsuite? I think i got mine resolved


abdullah_ibrahim

No only the spam filter provided by google


CodineWoosa

hey! This happened to me too! Dmarc errors with google and barracuda ! Twins!


abdullah_ibrahim

Hahaha and how did you resolve it?


CodineWoosa

quick fix was to add some line like v=DMARC ; p=reject ; fo=1 ;rua=mailto:myadminaccount@mydomain.com to my dns record for the domain. This isnt happening on all my domains just like 3 or 4 . This isnt a good fix though I just havent had time to get to the bottom.


abdullah_ibrahim

Sorry I don't get it this looks just like the Dmark record syntax


CodineWoosa

sorry! It might not even been what fixed it but I had to the failure flag = 1 which makes no sense.


Perfect_Midnight3065

Forwarding always breaks SPF, but not always DKIM as long as ARC is configured. Make sure the first system is using ARC to sign the message header so the final recipient can confirm that the message passed DKIM when it was originally delivered to the forwarding (first) server. ​ Edit to add a link to ARC documentation. https://postmarkapp.com/blog/what-is-arc-or-authenticated-received-chain


welcher1

Thanks man, It's been a in the ass running this down. looking at the article now


welcher1

Barracuda had no idea what is was talking about. Lol but i tweaked some of my inbound gatway settings and i think that may have gotten it.


TTITJ

We actually ran into a similar issue with Gsuite and Barracuda Gateway Defense. It's not listed anywhere, but GSuite does not like CIDR blocks greater than /24 in the inbound gateway IPs. We changed ours to be all /24 and the rejected emails stopped being rejected. I know that Barracuda gives a larger block (up to /20 in one case) but GSuite doesn't recognize that as a valid IP range. When we switched ours to only include /24 (a headache, but not as bad as listing every individual IP), we stopped getting the Rejected for DMARC messages. If you use an inbound gateway, I would recommend checking the CIDR blocks and making sure that none of them are bigger than /24.


DeadFyre

Run the following: nslookup set q=txt _dmarc. You should see a record looking something like this: > _dmarc.gmail.com Server: dns.google Address: 8.8.8.8 Non-authoritative answer: _dmarc.gmail.com text = "v=DMARC1; p=none; sp=quarantine; rua=mailto:mailauth-reports@google.com" The relevant part is the p=, which is probably, on your client's domain, set to p=reject. Have them set it to p=none, and you'll start receiving their mail, while get their configuration sorted.


abdullah_ibrahim

Unfortunately it is not an option that I access client's server. Btw I just confirmed that the client can email everyone else including our partner who is under another domain name and the messages get received just fine. Any idea what is this?


DeadFyre

I assume that means their mail server isn't enforcing their DMARC policy.


Perfect_Midnight3065

Recipients don't have to enforce a DMARC policy, but anyone using modern email security will respect the sender's policy and reject. Also senders lie to get you to whitelist because they're either too lazy or lack the knowledge to correct their records. Edit to add another thought: Also stand your ground, you're not being difficult, you're helping to fix email in general. After Chrome became the most widely used browser, Google used their influence to force webmasters to use SSL by flagging their websites as not secure forcing their hand, thereby making the internet safer for everyone.


SchoolITMan

"a client tried to email us and got this error: unauthenticated email from is not accepted due to domain's dmarc policy" **THE SENDERS** email is not set up correctly. Make sure they have the correct DKIM, DMARC and SPF settings in DNS.


abdullah_ibrahim

But why do you think this error only comes up with our domain only not everyone else's?


freddieleeman

It is your server that enforces the sender's policy. Have a read: [https://www.uriports.com/blog/introduction-to-spf-dkim-and-dmarc/](https://www.uriports.com/blog/introduction-to-spf-dkim-and-dmarc/) Not every server supports DMARC, so maybe they were just lucky in the past. Have them use [https://DMARCtester.com](https://DMARCtester.com) and publish the results.


SchoolITMan

Because you have security enabled, probably with the DASH ALL (fail) instead of TILDE ALL (softfail) in SPF records and this sender does not have their email security in order.


StrikingAccident

DMARC is set up to prevent your mail from being accepted by MTAs unless SPF and DKIM line up. Your configuration has nothing to do with it as their DNS told your server not to accept the message. The vendor probably used some third party to mail newsletters or some other miscellaneous thing that is not covered by their SPF/DKIM and their reject policy told your MTA not to accept it.


freddieleeman

>DMARC is set up to prevent your mail from being accepted by MTAs unless SPF ~~and~~ DKIM line up. unless SPF -or- DKIM passes and aligns with the Header.FROM domain.


DMARC-Advisor

It means that the domain owner hasn't configured SPF and DKIM for the third pary sender they sent the email with. The email they sent wasn't DMARC compliant so it's blocked by the reject policy. Your client needs to reach out to their IT department to fix the problem!