I also recommend that when you bring a new bunny home that you don’t offer too much freedom too fast. IF he has a smaller cage than offer an xpen for exercise and you can use it to expand and block areas as he gets better with his habits. It would be normal though for even a littertrained bunny to mark a “new” home with territorial markings. This is different than the piles of poo that normally will be in the box if he’s trained. It may take a couple of weeks for that to subside as he identifies HIS space and marks it with his poo. That is why it is important to provide “his” space first and let him get comfortable in it without allowing him too much freedom right away otherwise your whole house will become his place to claim (with poo)
IF he is leaving piles of poo and urine outside of the box, then you will have to try and figure when he does it the most (many times after meal time) and try and be there and as soon as he lifts his tail to pee or he seems to be sitting in a position that tells you he’s pooing, you can scoot him to the box, and then offer a healthy treat once he’s in the box. NOTE: many will naturally pick a corner for the poo business and so sometimes it’s just about moving the box. But if it seems your bunny avoids the box, then healthy things he likes to the hay during the hours he seems to poo the most. Like get some shredded carrots and add a little bit to the hay. Or if he likes craisins, then cut up the craisin into tiny little pieces (since they are sugary it’s better to cut them up instead of adding a few whole ones)
Once he seems to do better, then allow a little bit more freedom gradually. The thought is, if he recognizes the rest of the place as a general shared territory, he won’t mark it as much. (Not all house bunnies adhere to that rule, but you can train/remind them that it’s not allowed by escorting them back to their place) Even when my bunnies get into a “marking frenzy” out of the blue in their bunnyroom, when the come out to living room, they leave that almost poo free. I can’t say they are always 100% all of the time, as every once in a while, they seem to “test” out their poomakers in the general territory.. but finding a couple of stragglers happens every once in a while.
Also, a bunny at a shelter who seems to have poor litterbox habits doesn’t necessarily mean that he will when he finds a home. Bunnies in shelters may be more apt to mark their territory with all of the other bunny smells around. There was one bunny at a rescue group who was one of the messiest bunnies ever, but he was so loving the person that adopted him said she just didn’t care, she was in love, but low-and-behold, she later updated to say he was almost perfect with his habits in her home. So you just never know.