My server hosts several email addresses, for both individuals and lists. I do not provide SMTP or POP for these users... I simply forward each user's email to their "real" email address (or to a list of addresses) using the mail server's "aliases" file.
I am currently using Gmail as a spam filter in the following cumbersome way: All users' mail is initially forwarded to a single Gmail account. Using the Filter feature of Gmail, I forward it back to my server, but to a modified email address. Finally I forward it to the real address. It works because Gmail applies the spam filter before it applies the Filter feature.
So for users "joe" and "bob" my aliases file (on mysite.com) would have:
joe: myDummyEmail@gmail.com joe-nospam: firstname.lastname@example.org bob: myDummyEmail@gmail.com bob-nospam: email@example.com
In myDummyEmail@gmail.com, I set up the filters:
Tofirstname.lastname@example.org forwards to email@example.com Tofirstname.lastname@example.org forwards to email@example.com
This is basically working, except it's a pain to set up new users. Also, I'm wondering if I could get better quality spam filtering by using the officially sanctioned method of pointing the MX record of mysite.com to gmail.com. How could I duplicate my functionality by using the MX record in that way? Any other ideas?
I'd prefer to not install an anti-spam solution on my own server, because in my experience, none are as good as gmail.
One complication with the MX / Google Apps solution is that for some email addresses I use the "pipe" feature of the aliases file to pipe the message through my own script. So I would want a way to forward some of the messages back to my server anyway. And once I have pointed the MX record for myserver.com to Google, how can any messages be sent back to my server?