Not so long ago I had the need for many unique mailboxes. Registering them manually was too long and I decided to use services like
tempinbox.com . But almost immediately a problem arose, none of them approved automatic use. After this attempt, I realized that I could not get out of it and climbed into the mail settings section of my crooked VDS. As it turned out, everything is very simple.
So for starters, I redirected all mail from the domain to one mailbox, for example all@example.com (this was done in the mail domains section of the ISPmanager panel). After that I wrote a simple php script using IMAP protocol with the mail server. In order to receive mail for a specific mailbox, a request is made to search by recipient.
I think there is nothing more to paint here, I’ll simply add an archive with scripts. There the output is organized in the form of an RSS feed but nothing prevents it from changing.
downloadPS Oh yes, I almost forgot that to bring all the letters out of the box you need to open something like this URL
example.com/rss/samename%40example.com