receiving email / inbound smtp

Hi! I’m interested in processing incoming email on fly for a project of mine. I’m picturing the fly app handling smtp + email parsing, then sending messages to a separate http service for handling. This seems like a convenient way to run the smtp part, and lets me keep my http server behind cloudflare (compared to also handling smtp on that server and pointing an unproxyed mx record at it). I gave this a shot with the experimental config mentioned in Custom TCP ports but couldn’t seem to get anything through on port 25.

Obviously, smtp and 25/465/587 are kind of fraught, so I’m not surprised this doesn’t work. Going by Custom inbound TCP port & long living connections is it possible it would work in the future?

If that’s the case, I’d also be interested to hear your thoughts on how tls would work. I imagine I wouldn’t be able to use the tls handler because of starttls, so either I’d need to provision certs myself or somehow access the ones that fly provisions.

1 Like

I think we should open the SMTP ports for inbound email processing. We’re about halfway done allowing all ports, but we can look at doing these early. This sounds like a cool app to me!

TLS is interesting, I honestly don’t know much about TLS for SMTP. Assuming mail servers do SNI properly, it may just work with our TLS handler. If that doesn’t work, you will need your own certs. We’ve had requests for API access to the certs we manage but haven’t tackled that yet.

2 Likes