Passthrough mailserver

I'm looking for suggestions and hair brained ideas.
I manage mail for a number of different domains.
I would like to setup a mailserver that archives/journals all traffic that passes through it.
Or to say it another way.
I want to setup a mailserver that
1. accepts message
2. creates a mailbox if one doesnt exist for this user
3. put the message in a certain predefined folder based on subject
4. forward message to recipient.

I'm basically trying to roll my own cloud spam filter.
I have the filtering down.  I have backup MX in place.
The last step is figuring a non labor intensive way to archive inbound mail for a few days in case the inhouse server is down they would still have web access to mail.

I'm fluent in Exchange but I don't think the licensing will be friendly to my pocket so opensource solution would be prefered.

I have looked at some archiving solutions  but most want LDAP to the main server or some other user verification.

throw your ideas at me.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Since you already this intermediate server that filters and forwards, you're just looking for the archiving part? Check out MailArchiva (, there's a free open source edition.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
2. creates a mailbox if one doesnt exist for this user

IMHO this is not practical (apart from licensing models which use quantity of mailboxes for their method of charging).  Spammers use random text to the left of the @ or probe likely combinations such as sales@ info@ etc.

Archive it by all means, and have a database of these attempts so that the user can sift and analyse them upon demand.  In some ways that's a research service you can market: commonly misspelled mailbox names et al.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.