I've thought about doing this. Last time I tried to set up a mail server on a cheap VPS I didn't have enough memory, ClamAV was the biggest culprit. But I think the new 512 RPis would work quite well.
You don't need that much memory if you're setting up a simple IMAP server; you could probably do it on a super cheap instance on AWS, Rackspace or similar.