@nprofile1q... Yeah. gmail and exchange servers are a pain. I think there are some tutorials for setting them up with `mutt`, but I haven't looked into doing it with `mail`. For something like that you might need to roll-your-own. If you're okay with shell scripting, it's probably doable, but you'd basically need to create an IMAP/POP client. I have one I wrote with Perl, but it was mainly for extracting years worth of "From" addresses for a client so they could generate and update their mailing list. Something more interactive would be a fair amount of work depending on the features you need.