mail, smart mailbox and address

I’ve been looking for a way to do this for years. Recently got a mac, and wondering if applescript is the answer!

I’ve seen smart mailboxs in mail, but they don’t appear to do exactly what I want…

I have my own domain, and for everything I sign up for, i give a different email address, so for this place, i used “applescript@example.com
For amazon: “amazon@example.com” etc. Now I can create a smart mailbox for each of these addresses but only if I manually create one for each address (from what I can tell…)

What I want, is for a smart mailbox to be created automagically for any email which comes to my domain, so then I’ll have boxes for everyone who emails me, depending on the address they use! A nice filing system.

I guess, if it makes it much easier, it would be fine to do this with actual folders instead of smart mailboxes…although it would be quite nice to still have all the mail stored centrally…

Is this possible? Is it stupidly simple or is it ridiculously complicated? I’ve tried searching to see if this has been done before, but I couldn’t see much

Thanks in advance!