LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   spamassassin & procmail forward for 1 user (https://www.linuxquestions.org/questions/linux-software-2/spamassassin-and-procmail-forward-for-1-user-314884/)

suhewabe 04-19-2005 09:20 AM

spamassassin & procmail forward for 1 user
 
I currently have procmail / sendmail / spamassassin working for my linuxbox. It's a family webserver so I set up the procmailrc and spamassassin global files for everyone.

It's set up to prefix the subject line with [SPAM] if spamassassin considers it spam. Most everyone has something in their email clients to automatically move those emails to a separate directory so they don't even see it.

Everything's working fine.

I have a 10 year old niece that I'd like to keep from having to see some nasty spams. Although we could set her up with the same idea of moving it to a separate directory, I'd rather set up the server to forward all [SPAM] to her mother and let her mother handle it.

Does anyone know how to set this up?

sgrayban 04-19-2005 09:47 AM

Place the snip below in /etc/procmailrc

Code:

:0
* ^X-Spam-Status: Yes
{
        :0 c
        ! -f root@locahost username@my-domain.com
}


suhewabe 04-19-2005 12:01 PM

What does that do?

Does it forward anything marked as spam (^X-Spam-Status: Yes) that is intended for username@my-domain.com will be forwarded to root?


Also, I assume I put it AFTER my spamassassin call:

Code:

SHELL=/bin/csh
:0 fw
* < 256000
| spamc


sgrayban 04-19-2005 12:15 PM

It does what you want it to do.

-f is from this email to this email

and you put it after that setting you pasted

suhewabe 04-19-2005 12:33 PM

I'm not sure that's quite correct. I gave a test and if I get spam, it forwards it over and over and over again back to me.

I JUST want spam that goes to, say - user niece@myaddress.com to go to hermom@myaddress.com INSTEAD of going to niece@myaddres.com.


All times are GMT -5. The time now is 10:40 AM.