You're absolutely right, it's "raw" water from the heat exchanger cicuit. I comes from the pump driven by the V belt supplied by the seacock typically by a 3/4' or 1" hose that enters the exhaust on the " down" side of either your homemade or manufactured exhaust riser or elbow.
Some water lock mufflers are metal, some are plastic some have drains to winterize or drain the exhaust system but most are about the same size for small diesel auxiallary engines less than 40HP. the key issue is whether the remaining water in the exhaust can be drained away from the engine when it isn't running.
You can buy manufactured exhaust elbows and risers from Original Equipment manufacturers or aftermarket manufacturers since almost every inboard powered boat needs one except for "drystack" exhausts used on fishing boats and trawlers.
It really depends on whether your engine is above or below the waterline to determine if you need a riser or not. Westerbeke has great Adobe manuals on line foor the 25XP to locate parts numbers. The elbows for the 3 cylinder M30 might work as well.