> -----Original Message----- > From: Leonardo Costa > > i'm using SA at procmail and i set to send the spam emails to the > following file (/var/spool/mail/spam). is there some way to > send it to an especifie file at users home directory?
By the way you are writing this, I assume that you are doing this at the MTA. > #what i have now > :0fw > | /usr/bin/spamassassin > :0: > * ^X-Spam-Status: Yes > /var/spool/mail/spam > > #what i want to have > :0fw > | /usr/bin/spamassassin > :0: > * ^X-Spam-Status: Yes > /home/$user/Mail/Spam > > $user is the guy who will receive a email. The idea is to move the > spam email to the "Spam Folder" of each user of my server. If you use the header, To is obvious candidate. For example: To: [EMAIL PROTECTED] TO='formail -XTo:' USER=`echo $TO | /bin/sed 's/^To: //; s/@.*$//'` This should define USER with the alias dude which would hopefully be the real account. If the alias is really Dude.Wasted, you would be in trouble. The problem you will run into is that the Header To, like any part of the header, can be forged and/or be anything but the user account that usually defines $user. A spammer can put anything in the To. For example: To: [EMAIL PROTECTED] To: Dude To: "The Dude" To: Undisclosed Recipients etc. What you really need is to carry over the envelope RCPT TO list. Procmail will fall short here because it can not loop through the recipient list. You would need to create a program, maybe a Perl script, that will loop through the recipient list and deliver the message to the specified folder. :0 w * ^X-Spam-Status: Yes | (`echo $RCPTLIST | /some/path/spamdelivery.pl`) It would be *much* easier to have a user .procmailrc file that would deliver the message to the spam folder rather than doing this on the MTA side. --Larry ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk