It really depends on the state. There is a looming piece of Federal legislation that if it becomes law is troubling, but SEMA is already on top of it, and there is already a petition with over 150,000 signatures out of 100,000 needed last I checked, so I doubt it will become law.
Some states emissions test Diesels. My state does not, and also does not emission test vehicles over 8,600 lbs GVWR, so I'm double covered. Even in states that test though, most often all they are testing is tailpipe emissions, and EGR has nothing to do with that at idle since the system isn't active anyway. I likewise doubt they can test to see if the DPF is functional at idle, though they can use a mirror to see if its there like they do for cats. I don't know enough about how the urea injection systems work to know if that's a problem or not. Some states do an opacity test to see if the truck blows smoke or not, but that's easily defeated by just loading a stock tune back in prior to testing and then retuning afterwards.
Now a few states do a visual inspection too, but then there's the question of if they know what to look for or not. If you live in CA I'd be worried. Elsewhere I'd take my chances. I will say though that the EGR cooler on a 6.7 is much more noticeable than on a 6.0, so it probably pays to ask around to be safe.
I'm not a fan of illegality either, and if the emissions systems they put on our trucks didn't cause engine failure and reduce mileage I'd work around them, but sadly that isn't the case. I've wondered for years, and know I'll never get an answer because the people who need to test it are both too dumb and too busy cow towing to those who just want the press of being a "friend of the environment", is what is the impact of emissions per mile? If a vehicle pollutes a bit more, but also gets better mileage at what point do emissions controls become moot? Fuel only has so many atoms and molecules of various elements compounds in it, so the engine burning the fuel cannot create any, all it can do is let them through and/or combine them with atoms and molecules from the air it ingests. The question is how much of each category of pollutants is being emitted to go a mile. We all care about the environment, but the issue I take with Diesel emissions and how they are carried out is much the same as the ethanol that's polluting our gasoline and a lot of other "green" technologies (hybrids, electric vehicles, etc.). Science is never used as a qualifying factor to know whether or not we're making a positive impact, a neutral impact, or a negative impact with these new laws created by bureaucrats who wouldn't know NOx from cow dung. So yeah, I have a problem when I drive by a guy in a Prius who snickers at me thinking "that guy doesn't care", when the mining operations needed to get the nickle for the battery pack in his car polluted the air 3 times more than the lifetime emissions of three regular gas cars while opening the ground to erosion, and the water to runoff pollution.