PDA

View Full Version : SPAM ASSASSIN for other userid



maida
10-29-2003, 05:59 PM
How can I configure SPAM ASSASSIN for my other userids? It seems to be working only for the domain@domain.com account.

Sorry if this is answered somewhere else, but the forum search is not working for me today.

Thanks!

Maida

hipstergk
10-30-2003, 08:45 AM
hi maida

for some reason, according to westhost, you can only change the spamassassin config file for the default email address at your domain (i.e. domain@domain.com).

not really sure why, maybe someone else could shed some light on this...

FZ
10-30-2003, 10:35 AM
I'll try not to make a silly mistake this time... ;)

You can do this easily. What you need to understand is that for individual SpamAssassin preferences and other things, for example Procmail recipes, you need to give the particular user ID(s) their own home directory. There are many ways to do it, the easiest being that you create the E-mail/FTP account via the Site Manager and enable FTP for it. Then, when that is done, just edit it and disable FTP. That will remove FTP access but will create a home directory for the user. Make sure to note what you specified the home directory to be. Now when mail is sent to that particular user ID, a .spamassassin folder should be created in the home directory. Then you can modify the user_prefs file contained therein.

There is another way to do this: http://forums.westhost.com/phpBB2/viewtopic.php?p=6444#6444

maida
11-01-2003, 05:56 PM
What do you suggest to use for a home directory?

The default when you create an account is

/ftp/pub/username

Should I create something /usr/username instead?

I actually do want this user to have ftp access...can they get access to the /www/html/ files using this ftp account?

Thanks FZ...again! :)

Maida

FZ
11-01-2003, 06:42 PM
Well, the first thing I would point out is that you should try to put it in a central location - i.e. that you keep all home directories in a specific place so you can keep track of them easily. I would not suggest /usr because the "usr" that it is referring to is you, and files in that directory are for you (root account holder), and don't have much to do with the web anyway (it's kind of like an installation directory for programs). I recommend using something like /home/users/username (which is what I use), or simply /home/username. And, if you want to give this person access to the main web site's files, then all you'd need to do is create a symlink to the relevant directory (just like in that workaround I discovered a while ago):


ln -s /var/www/html/ www

(i.e. by typing that in to the SSH command prompt after changing/navigating to the home directory of the user).

maida
11-01-2003, 08:46 PM
Perfect!

Worked like a charm.

FYI, it looks like the /home directory actually points to /usr/home in 2.0.

Do you know what thread the symlink info is in?

Thanks again!

Maida

maida
11-01-2003, 08:48 PM
Found it:

http://forums.westhost.com/phpBB2/viewtopic.php?t=1137

Maida :D

maida
11-01-2003, 09:09 PM
Hmmm...I ran into a little trouble.

I went into my /usr/home/doug directory and typed


ln -s /var/www/html/ www

That seemed to work okay...

But when I logged in using that user to WS_FTP and clicked on the www "folder/alias" I got this error message


RTR www
550 Permission denied on server. You are restricted to your account

Any ideas?

Maida

FZ
11-02-2003, 06:48 AM
Hmm, about that /usr/home/ thing, you're right... I just never noticed that ;)

Anyway, I'm sorry you ran into trouble. To be honest, I did not test my theory, I just assumed it would work (and I still believe it should)! So I guess to get it working, you'd have to follow the workaround in that post you dug up. But then there are two major flaws that will likely occur:

1) The person's .spamassassin directory would show up in your web-accessible folder. You could curb this by using a .htaccess to password protect it, I suppose.
2) If you created another user and wanted them to have SpamAssassin settings of their own, then they would be created in the same place, overwriting the previous user's settings.

The only thing I can think of right now, is that you could manually add some lines of code to your Procmail file to ensure that SpamAssassin processes incoming mail with the relevant user's settings. In other words, you could create user_prefs files for each of the users you need to, and then in Procmail specify conditions to match the To: address, and then run SpamAssassin on that particular mail with that particular user's user_prefs. This is a really messy way of doing it, though. You need to do it all manually, and you are losing out on some SpamAssassin functionality as well. But, if you only need to do the above for one user, then there should not be a problem. I'll try to think of a way around this and will let you know if I come up with anything.

FZ
11-02-2003, 07:03 AM
Is it necessary for the person to have access to the www files for the main web site, or are you only doing this so they can build their own web site/pages? I ask because you could always give them a (non-www) home directory like you have, give them a subdomain as well, and change Apache config to allow web-access to their home directory as well. In other words, give them a separate web site of their own. And it isn't too hard to do anyway...

maida
11-02-2003, 09:46 AM
Yes, he needs access to the main website...

Setting up his own website sounds like a good idea for other stuff. I'll have to look into that.

That's okay...he can use my log in for the main site, as he has been. No biggie. I just thought it would be nice if he had his own.

The main thing is that the SPAM filter is working.

Thanks again!

Maida

FZ
11-02-2003, 10:15 AM
No problem. And if you need help with setting up "extra web sites", let me know. I've been through the whole process and figured out what needs to be changed and where, etc. so I would be able to save you a couple of headaches (and a good few hours) ;)

maida
11-02-2003, 11:40 PM
No problem. And if you need help with setting up "extra web sites", let me know. I've been through the whole process and figured out what needs to be changed and where, etc. so I would be able to save you a couple of headaches (and a good few hours) ;)

Thanks so much! You know I'll be here looking for help when the time comes :) I really appreciate it!

You rock! :D

Maida

FZ
11-03-2003, 06:51 AM
You're welcome :)