Those top level domains aren’t set in stone. The majority of TLDs can be used by anyone. It’s more what kind of image you want for your company/project. Lots of open-source projects have .org domains or .io
But you can choose whatever you like. Even a country domain is okay. But I personally wouldn’t choose .com for something open source. Look at the prices and go for .org unless that’s substantially more expensive with your registrar. (My opinion.)
Not possible. Almost all mailservers have migitated for this kind of thing. Even if you wrote a script, it wouldn’t work on any properly configured mailserver…