Hello all,
i got following request: The mailserver checks all incoming messages
against viruses (Clamav) and against spam (SpamAssassin). If one of the
content filtering mechanisms (Clamav, SpamAssassin) detect malicious
code in message, resend such message to special mailbox ju...@domain.com.
My requisities are: Postfix + Courier-Imap + SpamAssassin + Clamav +
Maildrop + MySQL.
I have following perplexity: I based on SpamAssassin results
(X-Spam-Flag: Yes) I need to inject emails to special maildir
(/data/mail/ju...@domain.com).
I found this very difficult. I am able to put message into some folder
in scope of recipient's maildir (maildrop -u ${recipient} ), but cannot
inject such message (with X-Spam-Flag: Yes) into another user's account.
My /usr/local/etc/maildroprc:
---cut---
if ( $SIZE < 204800 )
{
exception {
xfilter "/usr/local/bin/spamc -d 127.0.0.1 -p 783"
}
}
if (/^X-Spam-Flag: *YES/)
{
exception {
to "| /usr/local/bin/maildrop -M
/usr/local/etc/maildroprc-fake -d ju...@domain.com"
exit
}
}
---cut---
The configuration /usr/local/etc/maildroprc-fake is emty. I put "-M"
because to avoid infinite loop.
Could you direct me how can I send message with some header to another
mail account?
Thank you for your hints.