MD5 is extremelly weak, use SHA-1 instead.
SHA-1 is extremely weak (not as weak as MD5) so use at a minimum SHA256.
And for the OP: plz don't be silly,
don't store passwords for a mail server, only hashes. Anything else smells....
Usually your problem with decrypting (which is a no, no ,no) is solved by an out-of band solution that you know but is not in anyway connected to the password or file(s) you control. Like with SMS or (worse but still plausible) a question about your favorite dinner ever or something like that.
Don't ever store passwords from somebody else. it is a stupid idea.