The safety pilot can't log any acting PIC time but he could still log PIC time as sole manipulator of the controls (if he ever takes the controls, that is).
That's from an FAA legal interpretation (based on this previous one) that clarifies logging PIC time under IFR without an instrument rating. The interpretation discusses an instrument-rated pilot ("Pilot A") flying with a non-instrument-rated pilot ("Pilot B").
First, acting as PIC and logging PIC are different things, and only Pilot A can act as PIC under IFR:
The FAA has previously stated that there is a distinction between logging PIC time and acting as a PIC. See Herman Interpretation. To act as a PIC (i.e., the pilot who has final authority and responsibility for the operation and safety of the flight), a pilot must be properly rated in the aircraft and be properly rated and authorized to conduct the flight. In your example of an IFR flight, being properly rated and authorized would include having an instrument rating. Accordingly, only Pilot A may act as the PIC, and Pilot A has final authority and responsibility for the safety of the flight regardless of who is manipulating the controls.
But you don't need an instrument rating to log PIC time, as long as you're rated for the aircraft. That means that in simulated instrument conditions the safety pilot ("Pilot B") can't log any time as acting PIC under 61.51(e)(iii) but he can still log PIC time if he's the sole manipulator of the controls, under 61.51(e)(i):
for the purpose of logging PIC time under §61.51(e), a pilot must hold ratings for the aircraft rather than for the conditions of flight. Accordingly, Pilot B may log PIC time for the portion of the flight during which Pilot B was the sole manipulator of the controls.
In other words, Pilot A can log PIC time for the entire flight but Pilot B can log it only for the time spent as sole manipulator. If Pilot B never touches the controls then he can't log any PIC time at all.
In actual IMC, 61.51(e)(iii) doesn't apply because a safety pilot is only required in simulated IMC. The FAA's conclusion is that if Pilot B takes the controls in actual IMC then he can log both PIC and instrument time, but Pilot A can't log anything:
Pilots A and B are flying in actual IMC conditions, not simulated instrument flight conditions, and the aircraft operation is not one for which "more than one pilot is required under ... the regulations under which the flight is conducted." Speranza Interpretation (Dec. 4, 2009). Therefore, Pilot A is not acting as a safety pilot and, as was the case in the Speranza Interpretation, being the PIC in this context is not a basis for Pilot A to log flight time under § 61.51 for the portion of the flight being logged by Pilot B as PIC flight time while the sole manipulator of the controls.
Pilot A is still acting as PIC in that case, he just can't log the time.
Finally, remember that the FAA interpretation is only about the legality of logging PIC time under IFR. Unless you're a CFII, letting someone without an instrument rating fly under IFR would be very risky, even in VMC. There's a good chance that if something went wrong then the FAA would go after both pilots on the basis of 91.13 (careless and reckless operation).