Postfix with virtual users + spamassassin via procmail

Hi all,
I'm trying to setup postfix with spamassassin using procmail. The idea is to check only incoming mail and if it's a spam to move the mail to one of those directories - Spam-Probably or Spam-Certainly, for that purpose I need procmail.
Below is the begging of /usr/local/etc/postfix/master.cf:

Code:
smtp      inet  n       -       n       -       -       smtpd
     -o content_filter=procmail:dummy
procmail  unix  -       n       n       -       -       pipe 
 flags=DORX user=procmail argv=/usr/local/bin/procmail -t -o SENDER=${sender} -m USER=${user}@${domain} DOMAIN=${domain} EXTENSION=${extension} RECIPIENT=${recipient} /usr/local/etc/procmailrc

With this setup all the mail (not only the incoming mails) goes through the procmail content filter and all the mail is checked from spam assassin. This is a problem because in this case outgoing mail is not received from any external server. I suppose it happens because the spam assassin checks and header modifications.
Do you have any idea how to setup postfix to pass only incoming mail on that content filter?
 
Back
Top