hi there,
once spamassassin is upgraded on a server, each and every domain has spamassassin and the spamassassin box disabled.
is there anyway to re-enable these things globally, so i do not have to go into each and every domain?
thanks,
John
hi there,
once spamassassin is upgraded on a server, each and every domain has spamassassin and the spamassassin box disabled.
is there anyway to re-enable these things globally, so i do not have to go into each and every domain?
thanks,
John
John Oligario
TurboCash Support & Hosting
osCommerce Support & Hosting
I am also looking for similar solution since last many many months. Most of users do not enable spamassassin by default and their email boxes grow to their quota limits causing bounce backs which are also caught by spamtrapps resulting in server being blacklisted by spamcop and other rbls. PLEASE PLEASE PROVIDE OPTION TO FORCE ENABLE SPAMASSASSIN AND SPAM BOX ON ALL ACCOUNTS ON SERVER. ITS JUST NOT POSSIBLE TO LOGIN TO EACH ACCOUNT AND ENABLE SPAMASSASSIN WHEN YOU HAVE 10'S OF SERVER WITH 100s of domains on each server.
Please don't use CAPS it is considered shouting.Originally Posted by mahinder
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
perhaps he is trying to make a point?
John Oligario
TurboCash Support & Hosting
osCommerce Support & Hosting
Since there is no option in the WHM to enable/activate SpamAssassin for every account, you can write a shell or Perl script to do that.Originally Posted by Mibble
Andy Reed
RHCE and CCNA
ServerTune.com
I am sorry for using caps, i didn't knew its considered shouting, will not do this again. but, I wanted to make my point louder. You try transferring accounts from one server to another one. You will find that spamassassin get deactivate on new server. This creates huge headache for us. I am going to email cpanel and request them for this feature. I will also send them chocolates once its available in WHM for saving lots of my time and headache dealing with RBL's.Originally Posted by AndyReed
![]()
about the script, I tried thinking about it but it seems very difficult. I will do more research tomorrow.
Edit: should i lowercase words in previous post?
Last edited by mahinder; 09-22-2006 at 01:10 PM.
I am interested in this feature combined with a global 'Clear Spam Box'.
I have customers who never login to cpanel only to come back with they can't receive mails.
Thank You
i have written this script to enable spamassassin and spambox on all users till cpanel provide this option in WHM, i have tried it on one server and seems to work fine. here is kiddy script
Now save above script and name it /root/enabless.sh and change to chmod 700. now call script like thisCode:#! /bin/sh M_FILENAME=$1 #echo $M_FILENAME M_USERNAME=`find $M_FILENAME -printf %f` #echo $M_USERNAME touch /home/$M_USERNAME/.spamassassinenable chown $M_USERNAME.$M_USERNAME /home/$M_USERNAME/.spamassassinenable touch /home/$M_USERNAME/.spamassassinboxenable chown $M_USERNAME.$M_USERNAME /home/$M_USERNAME/.spamassassinboxenable echo $M_USERNAME complete echo
find /var/cpanel/users -type f -exec /root/enabless.sh {} \;
this will create
.spamassassinenable
and
.spamassassinboxenable
file in ALL users home directory on server which will enable spamassassin and spambox for domain. works fine on my server. use code on your own risk however it should do no harm to your server.
ok, the script is great,
so my question is what about the /home/username/.spamassasin directory and the files in it - files like user_prefs and so on ?
thanks
I personally just modified the script to copy my .spamassassin directory over, and chown it. I believe it was something like:
Right above the echo $M_USERNAME complete line (with /home/dansoft/.spamassassin being an existing spamassassin directory).Code:cp /home/dansoft/.spamassassin /home/$M_USERNAME/ -R chown $M_USERNAME:$M_USERNAME /home/$M_USERNAME/.spamassassin
But, I've removed this now, and I'm just using MailScanner server-wide![]()
UrkI think that's the most marvellously creative use of find(1) I've seen in years of teaching shell scripting, well done!
![]()
Purely from a scripting point of view, a far simpler form of this would be:
Save it in a file and run it once as a shell script.Code:cd /home for user in `ls /var/cpanel/users` do test ! -d $user && continue touch $user/.spamassassinenable $user/.spamassassinboxenable chown $user.$user $user/.spamassassinenable $user/.spamassassinboxenable echo $user complete done
I have Spam Assassin 3.1.7
I have just migrated about 75 sites to a new server...all secured by ramprage (great job at WebhostingGear.com)
The default setting for all accounts in cPanel is SpamAssasin (SA) disabled.
I want to do both of these:
---------------------------------
a. setup the skeleton directory (/root/cpanel3-skel/) to have all future added accounts SA enabled.
b. SA enable all current accounts (located in /var/cpanel/users)
What I am seeing is that an account that has never had an email account or been SA enabled looks like this (screenshots from using WinSCP):
Pic01
and that the same account after turning on SA looks like this:
Pic02
It appears that I need to have:
1. the file .spamassassinenable
and
2. the folder .spamassassin
No Problem.
Now, my question is around the contents of the folder, .spamassassin
On a newly enabled account, it looks like this:
Pic03
But on an account that has been around the block for a while, the contents of the folder, .spamassassin looks like this:
Pic04
2 Questions:
1. If I am writing a script to enable all accounts in /var/cpanel/users to be SA enabled, what files should be in the folder, .spamassassin?
2. Will the bayes files and the auto-whitelist file get added/written automatically to the .spamassassin folder as that email account is used?
The bayes files could be older data from my old server when I used to run MailScanner....not sure.
I need to know this, so I will determine which files go in the master .spamassassin folder that I will be copying from to all users.
Last edited by d-woo; 12-04-2006 at 07:16 PM.
It turns out that my SpamAssassin (3.1.7) is configured for the entire server.
So, all I need to do is add the file .spamassassinenable to each /home/<user> directory
I placed a copy of that file in /master_files/SA/.spamassassinenable
Here is the script: /my_scripts/SA_enable_all
chmod it as 700Code:#! /bin/sh cd /home for user in `ls /var/cpanel/users` do test ! -d $user && continue rm -rf /home/$user/.spamassassinenable cp /master_files/SA/.spamassassinenable /home/$user/ -R chown $user:$user /home/$user/.spamassassinenable echo $user complete done
[/#] chmod 700 /my_scripts/SA_enable_all
run the script
[/#] cd /my_scripts
[/#] ./SA_enable_all
All existing accounts are now enabled
New Accounts
place a copy of /master_files/SA/.spamassassinenable in /root/cpanel3-skel
[/#] cp /master_files/SA/.spamassassinenable /root/cpanel3-skel/
Any new accounts will be SA enabled
Last edited by d-woo; 12-05-2006 at 12:35 PM.
Handy little scripts.
Now if they could come up with a way to trim the memory usage by spamd, that would be great! It is a real memory hog!!
Thx's
Mickalo
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
Custom Perl and Database Programming