Hey @Consoli0, that’s expected behavior.
mailin will try to use port 25 by default, and you need to be the root user to listen to any port below around 1000, since they’re well-known ports for specific services. Your Glitch project doesn’t run under the root credentials so aside from the fact that we only open a single local port it can’t listen to port 25. If you set it to listen to the port we open, then if your project was using Node on that port you’d get an
EADDRINUSE error instead.
Unfortunately DNS doesn’t really work that way - at its simplest it’s basically just a phone book for IP addresses, so setting a record to point to your Glitch project will tell the rest of the internet where to find it, but not what port to use - that’s dependant on the application doing the work. The difference between an A record and an MX record is sort of like the difference between your cell phone number and your home number, if you have both.
What you could do here is to write a little node code to poll an external email address that you used just for your project, and have whatever you were expecting to send you emails to use that address. So you could set up firstname.lastname@example.org and have your project connect to GMail (or the provider of your choice) and retrieve the email from that mailbox. You could also look into something like https://www.cloudmailin.com, which accepts email on your behalf and forwards it to your Node app for processing.
Hope this helps!