Hmm, a lot of different things there...
Spraying on a door - that's usually a pretty clear indication that he's having some sort of territorial issue, probably with something outside that door.
Peeing in other places inappropriately - I dunno. You mention a possible connection with "letting him outside", so I gather that he is an "outdoor/indoor" kitty? That probably isn't helping things, both with regard to getting stressed out by stuff outside the door and with confusion about where he should "go".
I think the first steps to trying to solve this kind of thing is:
a. Use "feliway" diffuser to lower his stress and reduce his need to "spray"
b. Clean places he has urinated using a special enzymatic cleaner made specifically for the job. Make sure it specifically says "enzymes", and mentions cats and urine. Like this:
https://smile.amazon.com/Rocco-Roxie-Su ... pons&psc=1c. Use a black-light to find spots that have urine that you may not suspect (note: once you've cleaned such spots with enzymatic cleaner they will still "light up" under a black light, but will no longer smell.
d. Add more litterboxes and put them right at places where he is "going" inappropriately (you may be able to move them to a "better" place once you've solved the problem).
e. Make sure the box(es) and litter are to his liking. Avoid covered boxes, boxes that are too small, and litter with a bunch of perfume in it. If in doubt experiment with different boxes and litters. There's also "cat attract litter" made for situations like this.
f. If none of this helps, you may have to contact a cat behaviorist. They solve problems like this all the time.