Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently own a domain bought via, which provides me a basic email setup for the most common needs. I configured it to forward all mail to to I also own a virtual server with a running Postfix that I use for a specific website (all mail to gets forwarded via LMTP to a program written by me).

Since I'm recently experiencing some harassing by spammers, since GoDaddy doesn't seem to filter spam, and since my Windows Phone's Pocket Outlook cannot filter spam, I would like to use SpamAssassin to filter inbound spam by changing my domain's MX records to my server

My ideal setup is the following:

  1. All mail delivered to gets redirected via LMTP as usual via virtual transport without any spam check
  2. All mail to gets redirected to after a severe spam check
  3. I don't care about since I use just one address for now
  4. I would like to train SpamAssassin with customized spam rules, possibly based on the presence of certain keywords (links to certain unsubscribe pages I found recurring)

I currently configured Postfix with

transport                 lmtp:[]:8025                error: Cannot accept mail for this domain

relay                 OK

(I guess I should add OK too)


(looks like a catch-all rule, it's OK as requirement 3)

I installed SpamAssassin, I can do rcspamd start and set it to boot with the server, but I don't know if there is anything else to do for use in Postfix, and how to apply requirement 1 (only mail to gets filtered)

I also tried to send an email via Telnet to make sure my settings are ready for MX change. I received the message into my account but I found that it gone through, like Postfix didn't rewrite the destination but simply relayed the message.

Thank you in advance. I'm no expert in SpamAssassin, and I have little experience in Postfix (enough to avoid making my server an open relay)

share|improve this question

Have you set SpamAssassin as a content-filter or smtpd_proxy_filter?

Postfix needs to know how to talk to SpamAssassin. I've always used Postfix with some kind of SMTP-Proxy (like Amavis or VBoxAdm) so I'm not sure whether SpamAssassin ships with a SMTP-Proxy of its own. Figure this out and use content-filter if you want Post-Queue filtering or smtpd_proxy_filter if you want Pre-Queue filtering. In the case of the pre-queue filter the smtp proxy needs a way to re-inject the mail, so you have to create a new transport in the A content-filter is set in the while a smtpd_proxy_filter must be set in the

share|improve this answer
I didn't set it yet. I just installed it via YaST (openSUSE) – usr-local-ΕΨΗΕΛΩΝ Dec 25 '10 at 11:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.