Plumbers! Help needed with water heater and pressure valve!

Or at least, I’m pretty sure it’s a pressure valve.

Recently, my water heater has been releasing water intermittently. I say releasing and not leaking, because its clearly discharging water 1. About half an hour after I turn on the heater and if nobody uses the hot water, 2. The water flow stops as soon as the hot water is used.

The water clearly is coming from this valve thing attached to the cold water inlet (see picture ImageShack - Best place for all of your image hosting and image sharing needs) that kind of just discharges… Into my ceiling space.

I have a couple of questions:

Is it normal for this valve to discharge? From what I read on the Internet, this is intended to account for water expansion in closed water systems, which sounds fine, except that its never happened in the past year I’ve been living here.

If the discharge is not normal, it is a problem with the heater or the valve? I suppose there’s no easy way to check on the Internet for this one, but if anyone has a simple test I could run, I could do it.

If the heater and the valve are fine, is the valve supposed to just discharge into my ceiling? You might have noticed that there’s a pipe that kind of ends nowhere in the picture. Was that supposed to be drainage pipe the the previous plumber just half-assed? Wouldn’t surprise me at this point. The false ceiling directly under the valve has a suspiciously thick layer of silicone on the top - I don’t know if that was intended to do anything.

Thoughts, tips welcome!

That third pipe, the one that goes nowhere, where is the other end of it? If the other end also goes nowhere, then it’s supposed to connected to the T&P valve. It’s not really that big of a deal if it’s not connected, yeah, he half assed it by not connecting it, but if the T&P valve opens up, you’ll have other things to worry about. Either way, you can connect it yourself, it’s no big deal and since it doesn’t really get used, doesn’t require any special plumbing skills.

As for that valve on the cold water intake, I’m not sure. Is it open? It could be designed to add a expansion tank to, but those have full city pressure against. I’ve never seen a T that looks like that. If I came across whatever that is in my house, and it was leaking, I’d probably just take it off. It looks like it should just come off and the elbow will just connect to the water heater, just like it does on the hot water side.

That third ppe looks like electrical EMT conduit. A valve on the inlet seams a little strange, I can not tell what it is.