Both answers are correct. It depends on your relationship with the company.
I would say it is safe to unsubscribe to spam IF you know the company. A lot of people agree to get email and unsolicited items when they accept the EULAs (End User License Agreement). This is often the case when you agree to get stuff for free or enter contests. Within the agreement can be language that amounts to adding you to their mailing list in which case the company is in compliance. There are other ways companies can legitimately add you to their database and send you email. Sometimes, the agreement extends these rights to "marketing partners", subsidiaries or indicates all bets are off if the company is sold.
Most companies that are above board will honor your request and provide some sort of confirmation page or email indicating how long it will take to get off their list. I save these messages and if a company crosses over that line, I report them to the FTC. (Link below)
If you don't recognize the company, I would NOT unsubscribe even if they indicate they got your email from a marketing partner etc. I've seen this terminology used by people to make you think it's OK they have your address. My concern here is that the company has already used deceptive means so I don't want to go to one of their other sites and be subject to other deceptions such as spyware, phishing or whatever.
As far as companies confirming valid emails, they can based upon you hitting an unsubscribe link. They can also tell from other means such as using web bugs or graphics which go back to their server to display the image and confirm your email address is good. A web bug or beacon is simply a tiny graphic maybe a pixel in size and usually blends in with the background so you never know it exists.
My suggestion is to use disposable email addresses when signing up for promos, special offers, newsgroups and the like. Don't give out your primary email address.