Problem configuring Spam filter using GMail


#1

Hi All.
First, sorry my bad english (I’m brazillian, and don’t speak english well).

I trying to configure a PROCMAIL to filter SPAM using a GMAIL account.

I follow exactly the steps in:
http://wiki.dreamhost.com/index.php/Double-Pass_Spam_Filtering_with_Gmail

I create the two files, ‘.forward.postfix’ and ‘.procmailrc’ in my HOME folder. I use WebFTP from dreamhost panel, and after I try using a ‘Putty’ (FTP Shell program).

I inform my emails like (In ‘.procmailrc’):

DEFAULT=$HOME/Maildir/
MAILDIR=$HOME/Maildir
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
SHELL=/bin/sh

forward to gmail account for spam filtering - cf

http://mboffin.com/post.aspx?id=1636
:0

  • !X-Forwarded-For: my_account@gmail.com my_account@my_domain.com.br
    {
    :0fw
    | formail -IDelivered-To

:0
! my_account@gmail.com
}

The files was created exactly like example. But simple not
function. I send email to ‘my_account@my_domain.com.br’ and this email is not FORWARDED to GMAIL. The email goes to my inbox, none redirect.

I am grateful if someone can help me.

Obs.: I’m trying to test with one email but I like to use with all my emails (if it will be good). To do this is only
to add more entries in the same ‘.procmailrc’ file?

e.g.:

DEFAULT=$HOME/Maildir/
MAILDIR=$HOME/Maildir
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
SHELL=/bin/sh

:0
! my_account_1@gmail.com
}

:0
! my_account_2@gmail.com
}

:0
! my_account_3@gmail.com
}


#2

[quote]# forward to gmail account for spam filtering - cf
http://mboffin.com/post.aspx?id=1636[/quote]
This should be on one single line. In the wiki, it is, but in your post, it looks like it’s split into two lines. That would be a problem.

Your example of forwarding three .br addresses through three Gmail address won’t work under regular circumstances.

Normally, email accounts are independent, so they won’t get processed by the same .procmail. In addition, this .procmail setup only works with Shell accounts. Your solution is to make each address a shell account, then give each shell account its own procmail setup, plus a corresponding Gmail account.

I set this up for one account, then opted for a client side spam filter (SpamSweep for the Mac) that queries the server every 5 or so minutes and filters via POP and deletes spam on 6 accounts. Plus I didn’t have to create shell and Gmail accounts for each address.

-Scott


#3

The two lines apearing only here, on file is on the same line.

I’m starting understand, but I dont have idea how to make a ‘shell user’. For me, I only can create a ‘domain user’…
I access using a shell program (Putty), and logging like a ‘domain user’.

Plz, can you help me a undertand how create a shell user, and how configure procmail correctly?

Thanks!


#4

It sounds like your “domain user” is really a shell user.

The wiki describes how to create a “shell user”:
http://wiki.dreamhost.com/Add_New_User

Here’s info describing types of user accounts here:
http://wiki.dreamhost.com/Users

Your procmail setup really needs to be identical to what’s in the wiki. Don’t add any extra lines for extra users. All you have to change are the user@domain.com and user@gmail.com fields. And make sure your new files have permissions of 644.

-Scott


#5

But… for example, In one domain I have 5 emails accounts.
If I like to configure all this accounts to use GMAIL like Spam Filter, I need to create 5 new FTP/Shell accounts, and connect with each one, and create for each one a ‘.procmailrc’ and ‘.forward.postfix’ files ???

I now connected at Dreamhost pannel, and I go to Users>Account Privileges, and set one email from one of my domains, I set Privileges to Mailbox User only. I try to connect to (ftp.mydomain.com.br), and password not be accepted. I go again to Control Pannel and set Privileges to domain too, and again password not accepted.
The password I receive by email after create new user. I wait more than 1 hour, and try again… nothing…

Doubt:

  1. I need to create a Mailbox user oly or a FTP/Shell user for each email?
  2. after this, I will be connect to ftp.mydomain.com.br to set a procmail files, or to another adress???

The first time I conect like admin user from domain (configured like FTP/Shell user), and create two files in home directory. It’s not function… For this a doubt, for each email I need a individial user to each email to set procmail files?

Thanks your help.
Sorry my bad english… hehe.