Link to home
Start Free TrialLog in
Avatar of zarko_r
zarko_r

asked on

Forwarding all spam to a single mailbox using SpamAssassin and Qmail

Hello all,

I'm trying to get spam under control. The boss has agreed to the following scenario. Any message that gets flagged as spam, from any of our domains, to be forwarded to a "global" spam mailbox.
I have successfully integrated SpamAssassin with Qmail to mark emails as spam. Now I just need some help
with putting them into another mailbox.

What I've done thus far is
rename /var/qmail/bin/qmail-queue to be qmail-queue.orig
made a shell script with the name qmail-queue with just one line
    spamc -f | /var/qmail/bin/qmail-queue.orig

I running on
RHEL 2.6.9-22.EL
SpamAssassin 3.1.9-1
Qmail 1.03
Plesk 8.0.1

Any help, even just advice, would be appreciated.
Avatar of Cyclops3590
Cyclops3590
Flag of United States of America image

i probably won't be of much help, because i don't know how qmail works, but the first thing that comes to my mind is procmail.   If you can get the email to be processed by procmail as its being delivered you can have it look at the subject line and see if it was flagged, if so forward it to the spam mailbox, else just deliver it.

keep in mind i haven't used procmail either as i haven't had the need for it yet, but from what i've read, that is one use for it.
Avatar of zarko_r
zarko_r

ASKER

I can't use procmail because the control panel we use (Plesk) integrates with Qmail. Thanks for the suggestion though.
ok, so i take it you don't have command line access to the server then
Avatar of zarko_r

ASKER

I have full root access. It's a dedicated server for all our small companies. The control panel is used by some of the other people in the company to make minor changes so I can't remove it and do everything manually.
ASKER CERTIFIED SOLUTION
Avatar of Cyclops3590
Cyclops3590
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial