I think if someone just leaves stuff on your porch, you are totally in the clear to throw it away or donate it without even letting it pass through the house. Maybe identify some good places to take stuff in advance, so you won't be trying to figure out where you can dispose of electronics while you are also angry about the electronics being left on your porch. Then if the giver asks you about it, you should feel free to politely tell them what you did with it, and even offer them the name of the place so that next time they want to "get rid of" something, they can just take it directly there themselves (hint, hint).
Firmness is the key, I have found. I remember when my grandmother died, people went over to clean out her house, and when I stopped by the whole dining table was filled with little knickknacks. My dad said, "Take whatever you want!" so I picked up one little thing that I remembered from visiting her house. He's like, "That's it? That's all you want?" Then he took me over to the garage and showed me how the entire 1.5 car space was filled, floor to ceiling, with boxes. "This is what we have to get rid of," he said pointedly. I was like, "Nope, I'm only taking this one thing. Thanks!"
If you're certain it's junk, you are fine to just refuse it outright, repeatedly, with a smile. With some people, or some loads, it might be easier/more prudent to look through the stuff in front of the giver, and take out one small thing that you actually want, or want most, and give the rest back. Act like you thought that's what they wanted you to do. (Then of course you can throw the small thing away later if you want.) If people were bringing over "old family stuff," I know that I would at least want to look through it, and see if there were any old photos/documents/etc. that I wanted to keep, rather than just refusing the whole thing sight unseen.
Fundamentally people should not be imposing their junk on you. They should only give you gifts if they think you would really like it, and not just because you're the first breathing person they met after deciding to get rid of it. Or because they like the pleasure of buying it better than keeping it. So it is completely polite to refuse 100% to let things into your house. I am just a more indirect person, so these are some more indirect methods that might help you.