Howto: Automatically Verify Cron / Crond Is Running And Restart If Not
This one's pretty simple really, but given the fact that I'm constantly running into crond stops with CPanel servers (no clue why, or where, but it's happening), I'll post this here. If it helps someone, then great, if not, hey, no worries.
Firstly, login as root to your server through ssh, however you usually do .
Next, the script (we'll call it /bin/croncheck.sh). Use whatever editor you choose to create the file.
#!/bin/bash .......
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
HOWTO Cron Job To Copy Files From Folder To Root
how to setup a cron job to copy files & directories from one folder to the root folder. I have CPanel X. My root directory is public_html/ I have another directory public_html/uploads containing both files and directories. I need a cron job that will copy all the files & directories from public_html/uploads to the root public_html/ If it helps, here is some system info General server information: Operating system Linux Service Status Click to View Kernel version 2.6.22_hg_grsec_pax Apache version 1.3.39 (Unix) PERL version 5.8.8 Path to PERL /usr/bin/perl Path to sendmail /usr/sbin/sendmail PHP version 4.4.4 MySQL version 4.1.22-standard cPanel Build 11.17.0-STABLE 19434 Theme cPanel X v2.6.0
View Replies!
View Related
Create A Cron Job To Clear Your /tmp Folder Automatically?
how I can create a cron job that runs every 10minutes or so to clear my /tmp folder on one of my servers? Reason I ask is, it keeps getting filled up and doesn't delete the fiels in it and stops certain scripts from running. Also, again, I need step by step instructions, such as: 1) what, where the file is I need to place the cron job in 2) what line of code would I put in that file (what does the cron job line look like for every 10min every day) 3) do I need to restart anything, and if so, what command do I run in shell?
View Replies!
View Related
Auto Restart Apache On Cron
ive got a fairly beefy server but at the moment its hosting alot of resource intensive sites (unfortunatly i dont currently have a choice on where to run them all) and apache is crashing to the point its taking upto 2 mins to load pages within about 24hours but once restarted is fine again. so im wondering if anyone can suggest a way to automaticly restart apache via a cron job every 24hours or so?
View Replies!
View Related
Cron Job Not Working, Restart Services
I'm having a bit of trouble with one cron job that doesn't seem to work. I have others scripts that run hourly fine. However this one does not. The script: restart_monitoring.sh Code: #!/bin/bash service iptables stop service iptables start /root/bandwidth_rules.sh /root/portforward_config.sh exit The two scripts at the end just load a lot of iptables rules back in. The cron job should run hourly (59th minute) The cron job entry Code: 59 * * * * /root/restart_monitoring.sh I have restart crond to enable the new job, still doesn't run. The job is to restart iptables, thus flushing all rules that I have running, then reloading them. I have figured out the problem to be with the "service iptables stop/start" command, it doesn't seem to like doing this...?
View Replies!
View Related
Cron Jobs Not Running
I have a machine, that for some reason stopped running it's cron jobs for some reason, and I can figure out how to get them working again. My /etc/crontab file is as follows. SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly Here are the contents of a sample user cron file. MAILTO="USER" 10 4 * * * php -q -f /home/USER/public_html/tools/updtransfers.php /home/USER/public_html >/dev/null 2>&1 10 5 * * * php -q -f /home/USER/public_html/tools/updateexp.php /home/USER/public_html >/dev/null 2>&1 10 5 * * * php -q -f /home/USER/public_html/tools/invoice_cron.php /home/USER/public_html >/dev/null 2>&1 and another */5 * * * * /usr/local/bin/php -c /home/USER/php.ini /home/USER/public_html/poller.php > /dev/null 2>&1 I've checked my logs, and I can find no errors anywhere. When I run the commands manually via SSH, they work perfectly, they simply are not being run automatically the way they are supposed to be. I have checked, and the crond service is running. I have tried restarting it, but it seams to have no affect. I really have no idea what the issue is. The only thing I seam to have found at one point, was the possibility that the files within the /etc/cron.d directory might be CHMOD'ed wrong, but I haven't found anything to confirm this either way. [root@server cron.d]# ls -all total 60 drwxr-xr-x 2 root root 4096 Dec 17 03:07 . drwx--x--x 94 root root 12288 Jan 3 09:28 .. -rw-r--r-- 1 root root 61 Jun 22 2007 csf_update -rw-r--r-- 1 root root 81 Apr 11 2007 lsm -rw-r--r-- 1 root root 79 Jun 22 2007 prm -rw------- 1 root root 366 Feb 23 2007 sa-update -rw-r--r-- 1 root root 82 Jun 22 2007 spri -rw-r--r-- 1 root root 188 Nov 16 23:14 sysstat [root@server cron.d]#
View Replies!
View Related
Running Perl Script On Cron
I tried using this perl script which supposedly restarts apache when server load reaches 5 and above Code: #!/usr/bin/perl -w #use strict; $|++; open(LOAD,"/proc/loadavg") || die "couldn't open /proc/loadavg: $! "; my @load=split(/ /,<LOAD>); close(LOAD); if ($load[0] > 5) { `/sbin/service httpd restart`; } and placed it in /usr/local/script/loadavg.pl and chmod to 755 and added this to my crontab */1 * * * * root /usr/local/script/loadavg.pl my server load went up to 20 and waited if it will automatically go down via the script but it seems it's not working. I had to restart apache manually.
View Replies!
View Related
Pile Up Of Crond Processes At Certain Times
To me, this sounds really strange and really unrelated, hopefully it will ring a bell in somebody-who-reads-this' mind... After enabled suexec in my webserver (litespeed), every day at two regular times, I notice a ton of crond processes on many different users. This slows down my entire server until they go away and it must be resolved. I have only recently noticed that it is infact crond processes causing this and I hope I have finally found the correct issue. It causes a chain reaction of events and so I have slowly had to crawl up the chain to find the root of the issue... (high iowait, high swapping, high memory, normal processes taking up more cpu%, etc. etc. ........ crond processes) I have checked every single file in /var/spool/cron and none of the cron jobs run remotely near these times (except some that run every minute/15 minutes for example). Also, I don't understand how so many crond processes could be made at once. I will make a better rough estimate when it next happens. What could it be causing this to happen?
View Replies!
View Related
Exim Sender Verify
We had a non-client (not on our server) that was getting 550 email rejections when he attempted to email us due to having Sender Verify enabled. In the past I figured Sender Verify was necessary for fighting spam, amongst other things, but have realized that we may be having more rejections than we know because we never hear about them. Is there a general best practice in terms of enabling Sender Verify or leaving it off? I've never heard about complaints about rejects from legitimate emails senders, so it doesn't seem to be an issue, but then again, you really never know...
View Replies!
View Related
Anyway To Verify RAID 1 Is Working
I had a server admin install a new drive in RAID 1 (mirrored drives). I'm not the best linux guy in the world... but is there a way either through linux, WHM/cPanel, etc. to check and verify that the drives are mirroring correctly? I just want to sleep soundly everynight knowing if a drive failed I'd have another drive up and going.
View Replies!
View Related
Verify If Domain Is On Nameservers
I have a domain: myname.com whose nameservers have been already update to the new host's nameservers: ns1.myhost.com and ns2.myhost.com The new NS for the domain was already propagated over 1 day ago. However, it seems that myname.com is not yet resolving at myhost. How can I check whether myname.com is on ns1.myhost.com nameservers? I have yet no shell access, and it is shared hosting.
View Replies!
View Related
HELO Verify In Exim
!verify = helo !verify = reverse_host_lookup in exim acl and drop message if helo is not passed. But one issue is this validates for users even having account in the server and trying to send mail using server account to someone else I want to put validation for only incoming mails "to" this server What i dont want is to validate the mails that authenticated smtp users send
View Replies!
View Related
Sender Verify Callout
I´m seeing that a lot of servers are rejecting my emails showing this error: 451 - could not verify sender (callout) Reverse DNS is working fine, and I couldnt see any kind of error on dnsstuff.com. I´m using EXIM/CPANEL. I tried to send from one cpanel server to another cpanel server and I´m still getting error.
View Replies!
View Related
Can't Verify My Site On Google
please bear w/ me since this is my first time on launching a site online.. My site is being hosted by a free hosting company.. When I tried viewing the source code of my page some of the html tags are not seen like the <html>,<meta>,<head>... and I can't seem to verify my site on google... Verification status: NOT VERIFIED Last attempt Jan 30, 2009: We've detected that your 404 (file not found) error page returns a status of 200 (Success) in the header. why is this so? Did the host delete those? what should i do?
View Replies!
View Related
How Can I Verify My Dedicated Server Architecture
if there was a way of remotely verifying my dedicated server architecture. The hosting is done through our design company who then use a 3rd party for hosting a number of sites, and as such I don't have direct access to server control panels etc. Short of just taking their word for the fact that we have the servers we're supposed to, I was wondering if there's any way I can be sure. We're supposed to have dual web servers plus a database server.
View Replies!
View Related
Check And Verify DDOS Attack?
in the last couple of days we really have problem accessing web service, while ftp, ssh, work fine. While we getting connection time out, the load on the server is really load around .2 and get numerous e-mail from Cpanel that httpd is failling and try to restart. How can i do to check and verify that there a DDOS attack? What step can i do to possibly minimize DDOS attack?
View Replies!
View Related
Verify That My Mail Server Is Configured Properly?
how I can verify that my mail server is configured properly? This is the problem: I can send out mail without a problem, but I cannot receive mail from external domains (eg: google or hotmail). Some of the message have weird bounce backs like: PERM_FAILURE: SMTP Error (state 13): 550 No Such User Here But the user does exist... I am logged into it right now.
View Replies!
View Related
Sender Verify Failed On Valid Accounts
I have this customer who have been having trouble to receive some emails from valid senders due to Sender verify failed, both senders have valid accounts. Here is an example, De: MDaemon at zeus.XServer.com [mailto:MDaemon@zeus.XServer.com] Enviado el: sábado, 17 de noviembre de 2007 11:16 a.m. Para: albertocarbone@XServer.com Asunto: Error permanente de entrega Failed address: jsoler@CustomerDomain.com --- Session Transcript --- Sat 2007-11-17 11:15:19: Parsing message [xxxxxxxxxxxxxxxxxxxxxxxxpd35000148823.msg] Sat 2007-11-17 11:15:19: * From: albertocarbone@XServer.com Sat 2007-11-17 11:15:19: * To: jsoler@CustomerDomain.com Sat 2007-11-17 11:15:19: * Subject: RE: Zona Franca.- Concepto.- Sat 2007-11-17 11:15:19: * Message-ID: [003201c82934$ba953d00$2fbfb700$@com] Sat 2007-11-17 11:15:19: Intentando SMTP conexión con [CustomerDomain.com] Sat 2007-11-17 11:15:19: Resolviendo registros MX para [ CustomerDomain.com] (Servidor DNS: 200.118.2.66)... Sat 2007-11-17 11:15:23: * P=000 S=000 D=CustomerDomain.com TTL=(240) MX=[ CustomerDomain.com] {xx.xxx.13.172} Sat 2007-11-17 11:15:23: Intentando SMTP conexión con [xx.xxx.13.172:25] Sat 2007-11-17 11:15:23: Esperando la conexión del socket... Sat 2007-11-17 11:15:23: * Conexión establecida (xx.yyy.51.30:3948 -] xx.xxx.13.172:25) Sat 2007-11-17 11:15:23: Esperando la iniciación del protocolo... Sat 2007-11-17 11:15:25: [-- 220-svr01.customerDomainHost.com ESMTP Exim 4.68 #1 Sat, 17 Nov 2007 11:15:29 -0500 Sat 2007-11-17 11:15:25: [-- 220-We do not authorize the use of this system to transport unsolicited, Sat 2007-11-17 11:15:25: [-- 220 and/or bulk e-mail. Sat 2007-11-17 11:15:25: --] EHLO zeus.XServer.com Sat 2007-11-17 11:15:25: [-- 250-svr01.customerDomainHost.com Hello zeus.XServer.com [xx.yyy.51.30] Sat 2007-11-17 11:15:25: [-- 250-SIZE 52428800 Sat 2007-11-17 11:15:25: [-- 250-PIPELINING Sat 2007-11-17 11:15:25: [-- 250-AUTH PLAIN LOGIN Sat 2007-11-17 11:15:25: [-- 250-STARTTLS Sat 2007-11-17 11:15:25: [-- 250 HELP Sat 2007-11-17 11:15:25: --] STARTTLS Sat 2007-11-17 11:15:26: [-- 220 TLS go ahead Sat 2007-11-17 11:15:26: SSL negotiation successful (TLS 1.0, 1024 bit key exchange, 128 bit RC4 encryption) Sat 2007-11-17 11:15:26: --] EHLO zeus.XServer.com Sat 2007-11-17 11:15:26: [-- 250-svr01.customerDomainHost.com Hello zeus.XServer.com [xx.yyy.51.30] Sat 2007-11-17 11:15:26: [-- 250-SIZE 52428800 Sat 2007-11-17 11:15:26: [-- 250-PIPELINING Sat 2007-11-17 11:15:26: [-- 250-AUTH PLAIN LOGIN Sat 2007-11-17 11:15:26: [-- 250 HELP Sat 2007-11-17 11:15:26: --] MAIL From:[ albertocarbone@XServer.com [mailto:albertocarbone@XServer.com] ] SIZE=23231 Sat 2007-11-17 11:15:26: [-- 250 OK Sat 2007-11-17 11:15:26: --] RCPT To:[jsoler@CustomerDomain.com] Sat 2007-11-17 11:15:30: [-- 550-Verification failed for [albertocarbone@XServer.com] Sat 2007-11-17 11:15:30: [-- 550-Called: 82.165.181.92 Sat 2007-11-17 11:15:30: [-- 550-Sent: RCPT TO:[albertocarbone@XServer.com] Sat 2007-11-17 11:15:30: [-- 550-Response: 550 Backscatter Protection detected an invalid or expired email address Sat 2007-11-17 11:15:30: [-- 550 Sender verify failed Sat 2007-11-17 11:15:30: --] QUIT --- End Transcript --- Here is another example 2007-11-19 11:50:19 H=dom21.ipowerweb.com [72.22.92.57] sender verify fail for [hguzman@hoftxxx.net] 2007-11-19 11:50:19 H=dom21.ipowerweb.com [72.22.92.57] F=[hguzman@hoftxxx.net] rejected RCPT [jsoler@CustomerDomain.com]: Sender verify failed Both accounts are valid.
View Replies!
View Related
How To Disable Bounces And Sender Verify With Exim?
in the last few months Ive got a blacklist warning from spamcop over my server sending bounces and now I find out one of my ips is listed at [url]for doing sender verify and bounces. I think both of which are ridiculous to blacklist for and I really think most of the anti-spam blacklist people are nothing more then money making rackets. But I guess it seems reasonable to disable these things as it would save some resources. Anyway what I need to do I guess is only do bounces for local users and disable sender verify. What is the best way to do this with exim? Every server I have to change is cpanel. Ive googled on this the last 2 days and cant find much info, Mailservers isnt my strong point for sure. Any advice Id appreciate. UPDATE I found how to disable callouts [url] Just trying to figure out how to disable bounces now
View Replies!
View Related
How To Verify 100 MBPS Uplink Speed
I recently purchased a new Dedi server, and got 100 MBPS Uplink. Now, I'm uploading 16GB size of files into this server, and I have a suspicious feeling that this upload speed is not what they told me. For the very 1st day, I opened a ticket and they said that they upgraded it to 100 mbps. I saw this speed was faster immediately. On 2nd day, it went down to around same slow speed before. Since then, I kept opening a new ticket and they said it was done, or sometimes I am under DDos attack..? What? I don't even have the site up yet! How come there is DDos attack? Anyway, today I was told that I'm getting billed for this 100 mbps uplink, because it's a new service. What a crazy thing going on here... I am so tired of this ticket game and just don't understand why they don't commit what they told me initially. Can anyone please tell me how I can verify and prove that I am having this 100 MBPS Uplink speed? The only thing I can tell with my eyes is that I can see those FTP upload progress bar. When it's very fast to upload one file, I assume that I have right speed. But is there any tool or command that I can execute on the server shell, and tell them what I get as a proof?
View Replies!
View Related
HOWTO Install FFMPEG
FFMPEG INSTALLATION FROM SOURCE FFMPEG INSTALLATION FROM SOURCE installed by: Robertas Dereskevicius Edited by Jon Nikolakakis OS/ Fedora Core 5 Summary download and install: libffac libffad2 xvid libogg,libvorbis mp3lame ffmpeg Setting Up Install Folder, Logging and download Packages 1)Log into ssh 2) cd /usr/src && mkdir install && cd install 3) Download faad2 and faac from http://faac.sourceforge.net/oldsite/download.php get Faad2 and faac (new versions) wget http://prdownloads.sourceforge.net/f...ar.gz?download wget http://prdownloads.sourceforge.net/f...ar.gz?download 4) Verify that you have these components are installed rpm -qa automake rpm -qa autoconf rpm -qa libtool rpm -qa m4 rpm -qa gcc-c++ If any are missing than simply yum install (packagename), if you dont have a package manager than get one, it will save you alot of time and headaches. Installing Faac 5)tar -zxvf faac-1.24.tar.gz && cd faac 6) sh bootstrap 7) ./configure 8) make 9) make install 10) cd .. Installing Faad2 11) tar -zxvf faad2-2.0.tar.gz 12) cd faad2 && less README.linux 13) There is 2 bugs with this package, so need to manually edit these files 14) nano Makefile.am Edit the file to look like this SUBDIRS = libfaad common frontend plugins EXTRA_DIST = faad2.spec 15) cd common/mp4ff && nano mp4ffint.h 16) Comment out this line //void mp4ff_track_add(mp4ff_t *f); 17)Save file and cd ../.. 18)autoreconf -vif 19) ./configure 20) make 21) make install Installing Libogg and Libvorbis 22)cd .. and then Check to see if libogg and libvorbs rpm -qa libogg-devel rpm -qa libvorbis-devel rpm -qa libncurses-devel If not installed then simply Package Install (replace yum and install settings with your package manager) yum install libogg-devel yum install libvorbis-devel yum install libncurses-devel Installing LAME (for audio) 23)go into lame sourceforge - http://sourceforge.net/project/showf...package_id=309 24)wget http://mesh.dl.sourceforge.net/sourc...me-3.97.tar.gz 25)tar -zxvf lame-3.97.tar.gz 26)cd lame* 27) ./configure; make;make install Installing Xvid 28) cd .. && wget http://downloads.xvid.org/downloads/...e-1.1.2.tar.gz 29)tar -zxvf xvidcore-1.1.2.tar.gz && cd xvid*/build/generic/ 30) ./configure; make; make install; 31) cd ../../.. Installing ffmpeg 32) rpm -q subversion If not install, then install subversion 33)svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg && cd ffmpeg 34) ./configure --enable-shared --enable-xvid --enable-vorbis --enable-libogg --enable-mp3lame --enable-gpl --enable-faad --enable-faac --enable-a52 35)make 36)make install If Installation went ok, run ldd ./ffmpeg If Path to Lib Libraries are not ok 37)Check to see if /usr/local/lib exists on this file cat /etc/ld.so.conf If not echo /usr/local/lib >>/etc/ld.so.conf 38) cat/etc/ld.so.conf Now check to see if (/usr/local/lib exist) 39) save file 40) ldconfig 41) run ldd ./ffmpeg FFmpeg should be complete and installed. On some servers you may need to add Disable Shared and enable flags.
View Replies!
View Related
HowTo : Subdomain Only In Other Host
i have 1 dedicated server, and 1 shared hosting the domain.com is hosted in dedicated server i want the subdomain sub.domain.com in other host i have try this but not working : I. the dedicated server have whm and cpanel in whm i go to DNS Functions --> Edit DNS Zone --> i add sub name , choose A, and enter other ip host II. the shared hosting only have cpanel i go to cpanel --> addons domain --> add my domain.com then go to cpanel again --> Subdomains --> i add sub from domain.com with above step i just got this when accessing the url http://sub.domain.com : Quote: Great Success ! Apache is working on your cPanel® and WHM™ Server If you can see this page, then the people who manage this server have installed cPanel and WebHost Manager (WHM) which use the Apache Web server software and the Apache Interface to OpenSSL (mod_ssl) successfully. They now have to add content to this directory and replace this placeholder page, or else point the server at their real content.
View Replies!
View Related
HowTo - Bouncing Of Dedicated
I'm on CentOS 4.4, webmin, LAMP, OpenSSH and ProFTPD server. But what I'm wondering is how to look at my off network backup space. I can only access my backup space through the DC network/my own server. So I need some kind of way to bounce a GUI ftp connection off the server - which would allow me to look at the files... I know I can use rsync for backing up and restoring. But the way I understand rsync I need to know exactly what I am to move, as it operates on an exact command.
View Replies!
View Related
Howto: ASSP Installation In CPanel
What is ASSP? ASSP is an Anti-Spam SMTP Proxy . The homepage can be found here. ASSP is a lightweight daemon that can filter mail based on various things such as SPF, RBLs, Bayesian word lists, as well as blocking email addresses from getting mail, or having mail filtered. This tutorial will walk you through getting the admin interface for CPanel setup for ASSP. Currently, a paid user interface can be obtained here (note that I am in no way affiliated with, nor have I tried to use this UI, I am just offering the link to those that might find it useful) Firstly, the setup: You will need to activate Cpanel PRO (pro.cpanel.net/activate) for your server in order for this to fully work. This activation is currently free. Simply go to the previous mentioned URL and enter your IP address if you have not done so already. Once you have activated CPanel PRO, go into whm->addon modules and check clamav connector, then click on "save". This will install clamav for you to use Once you have done THIS, go to whm->service manager and UNcheck spamd (it is no longer necessary with ASSP), and again click on save/submit. Note that this IS optional, however the purpose of ASSP is to defeat spam before it GETS to SpamAssassin. Once you have done THAT, go into whm -> tweak settings and uncheck SpamAssassin and BoxTrapper mail. Secondly, the requirements: ASSP needs certain perl modules established To install these, simply login (as root) to your server, and type the following Code: /scripts/perlinstaller --force Compress::Zlib /scripts/perlinstaller --force Email::Valid /scripts/perlinstaller --force File::ReadBackwards /scripts/perlinstaller --force File::Scan::ClamAV /scripts/perlinstaller --force Mail::SPF::Query /scripts/realperlinstaller --force Mail::SRS /scripts/realperlinstaller --force Tie::RDBM /scripts/realperlinstaller Sys::Syslog /scripts/perlinstaller --force Net::LDAP /scripts/perlinstaller --force Time::HiRes /scripts/perlinstaller --force Tie::DBI Note that the --force is optional, however it will make sure you've got it installed. Do these one at a time as some of these have configurable options to them. One more perl module is needed. Since the later versions of Net::DNS are known to cause issues with RBLs, SPFs and the like, it is advised to use 0.57 . This can be obtained by doing the following: Code: mkdir /usr/local/assp cd /usr/local/assp mkdir /usr/local/assp/tmp cd /usr/local/assp/tmp wget [url] tar xzf Net-DNS-0.57.tar.gz cd Net-DNS-0.57 perl Makefile.PL make make test make install Do NOT remove the /usr/local/assp/tmp directory as when you update cpanel, it will try to auto update Net::DNS again, so you will want this intact. Now, let's get with the program here and install ASSP: Code: cd /usr/local/assp wget [url] unzip -d /usr/local/assp /usr/local/assp/ASSP_1.2.6-Install.zip mv --target-directory=/usr/local/assp /usr/local/assp/ASSP/* mv --target-directory=/usr/local/assp /usr/local/assp/ASSP/.DS_Store rm -rf /usr/local/assp/__MACOSX rm -rf /usr/local/assp/ASSP rm -f ASSP_1.2.6-Install.zip rm -f Win32-quickstart-guide.txt;rm -f freshclam.bat cd /usr/local/assp mkdir pb cd pb touch denysmtp.txt touch exportedextreme.txt touch pbdb.black.db touch pbdb.rbl.db touch pbdb.white.db cd /usr/local/assp mkdir /usr/local/assp/notspam mkdir /usr/local/assp/spam mkdir /usr/local/assp/errors mkdir /usr/local/assp/errors/notspam cd /usr/local/assp wget [url] chmod 755 start wget [url] chmod 755 stop cd /etc/rc.d/init.d wget [url] chmod 755 assp The core of ASSP is now installed. However, the development versions have updated functions to use for users. Of course, this is completely optional, but is recommended completely. This can be done by the following in SSH Code: cd /usr/local/assp/ mv assp.pl assp.pl_old mv spamdb spamdb.old mv rebuildspamdb.pl rebuildspamdb.pl.old mv repair.pl repair.pl.old mkdir Data mkdir Data/Lists wget [url] wget [url] 000F4555.2/rebuildspamdb.pl wget [url] wget [url] mv assp.css images wget [url] cd Data/Lists wget [url] chmod u+x /usr/local/assp/*.pl Now, let's get it up and running, and configure it, shall we? Code: cd /usr/local/assp /etc/init.d/assp start You'll see ASSP sending out some messages and then doing nothing. This is ok, and it's the expected response. Now, we need to edit some stuff. Hit ctrl-c (cancel) to shut down ASSP once it's stopped, you'll see the following file in the assp directory - assp.cfg . Edit that with whatever you want for an editor, something like: Code: nano assp.cfg You want to change a few options immediately just to get it working Look for the lines that are something like: Code: runAsGroup:= runAsUser:= and change them to be: Code: runAsGroup:=root runAsUser:=root Then look for the line that is Code: AsADaemon:= and change it to Code: AsADaemon:=1 Now, let's change the password just so that we're secure: look for the line that is Code: webAdminPassword:=nospam4me and change that to Code: webAdminPassword:=insertrandompasswordhere Now, let's tell ASSP to setup and accept mail for our domains. Look for the line something like Code: localDomains:= and change that to be Code: localDomains:=file:/etc/localdomains Almost there, just a couple more changes needed. Look for the line that is something like Code: smtpDestination:=127.0.0.1:225 and change that to be Code: smtpDestination:=127.0.0.1:125 (or another port instead of 125, just REMEMBER the port!) and one more change change the line that looks like Code: listenPort:=125 to Code: listenPort:=25 Now save and exit the file. If you're using nano/pico, that would be ctrl-x , just make SURE to save the file before you exit! Now, let's get ASSP fired up again Code: /etc/init.d/assp start let's make sure you have assp starting on system boot: Code: chkconfig --add assp Let's add a crontab to make sure that ASSP rebuilds the bayesian spam list Quote: crontab -e Code: 10 4 * * * cd /usr/local/assp;/usr/local/assp/rebuildspamdb.pl Occasionally, what I've seen is ASSP will get "hung" on certain things and just kill itself. This fix will work for this, and make sure your ASSP installation is running smoothly Open up another file on the server, my example will be /bin/asspcheck. In this file, add the following contents Code: assplog=/usr/local/assp/check.log DATE=`date "+%m-%d-%y [%k:%M]"` pidof=/usr/local/assp/pid thispid=`cat $pidof` if [ ! -d /proc/$thispid ];then rm -rf $pidof; /etc/init.d/assp start echo "$DATE - ASSP - restarted" >> $assplog else echo "$DATE - ASSP - ok" >> $assplog fi Now, chmod the file itself Code: chmod u+x /bin/asspcheck Now, make sure it's called every 60 seconds. Add this to your root crontab Quote: crontab -e Code: * * * * * /bin/asspcheck Now, let's go BACK into WHM and setup the variables needed to get exim to use ASSP In exim configuration editor, click on "advanced editor" Clear out EVERYTHING from all of the existing boxes. Keeping these with data can cause ASSP to not function as it should When you've done that, add the following to the top box: Code: # assp local_interfaces = 127.0.0.1.125 If you changed this variable to something else Code: smtpDestination:=127.0.0.1:125 put in the other port, NOT 125, so it would look like 127.0.0.1.whateverporthere Click on Save Exim will restart and you now have a working installation of assp Now, let's go to it and work with it a bit, shall we? go to [url], enter the user admin and the password you changed nospam4me to. This will get you logged in and you can tweak the settings as you feel necessary. ASSP is a great and powerful proxy for any mail server, which blocks using RBLS, whitelists, etc. It is advisable to setup the email interface and let your customers know of this so that you can get them to help you in reporting and addressing spam. Parts of this howto were taken from this page, however much of that data has been found to be outdated as far as downloads from CVS and the like go, and I've added quite a bit of useful information into it as well. Go through the ASSP configuration VERY carefully, and ONLY change what you're sure of. Start with the RBLs, increase the list to 5 and max hits to 2 as suggested. If you notice problems with this or know how it might be better, hey, feel free to post in here and I'll keep it as updated as possible :)
View Replies!
View Related
Howto Install Perl Module
I tried to install some software but I got this message: Checking for perl modulesfailed You need to install the LWP perl module (libwww-perl) to install ... Does any one know how I can install this module or is it better to install/update the whole sets of perl module?
View Replies!
View Related
Exim + Cpanel + Dspam Howto
I found a handful of howto's for dspam, but none of them catered for exim with virtual users. After hunting around, I eventually have it working on a cPanel server, with user authentication for mail users. My setup: dspam version 3.6.8, using mysql driver. exim version 4. mysql 4.1 CentOS (2.6.9-023stab033.9-enterprise) cPanel / WHM - latest RELEASE version. Download the source, configure and compile: Code: # cd /usr/local/src # wget http://dspam.nuclearelephant.com/sou...m-3.6.8.tar.gz # tar -zxf dspam-3.6.8.tar.gz # cd dspam-3.6.8 Configure, replacing user/groups with your web-server user (web / apache / nobody), and use your mysql-include / library paths (will need mysql-devel on rh based systems). Code: # ./configure --prefix=/opt/dspam-3.6.8 --with-local-delivery-agent=/usr/sbin/exim --with-storage-driver=mysql_drv --with-userdir=/var/spool/mail/dspam --with-userdir-owner=nobody --with-userdir-group=nobody --with-dspam-mode=none --with-dspam-owner=nobody --with-dspam-group=nobody --enable-whitelist --enable-spam-delivery --enable-alternative-bayesian --disable-dependency-tracking --enable-virtual-users --with-mysql-includes=/usr/include/mysql --with-mysql-libraries=/usr/lib/mysql/ --with-dspam-home=/opt/dspam-3.6.8/var/dspam # make && make install Set up mysql Code: # mysqladmin -p create dspamdb # mysql -p >grant all privileges on dspamdb.* to dspamuser@localhost identified by dspampass; >flush privileges; >exit; Create tables: Code: mysql -p dspamdb < /usr/local/src/dspam-3.6.8/src/tools.mysql_drv/mysql_objects_speed.sql mysql -p dspamdb < /usr/local/src/dspam-3.6.8/src/tools.mysql_drv/virtual_users.sql Link dspam in opt for easy versioning: Code: ln -s dspam-3.6.8 /opt/dspam Copy the web interface files to a web directory: Code: # cp webui/cgi-bin /opt/dspam -r # cp webui/htdocs /opt/dspam/ This next step is required for pop3 authentication. Install perl module Apache::AuthPOP3 - which does apache pop3 authorisation: Code: perl -MCPAN -e shell install Apache::AuthPOP3 Next, apache will need mod_perl installed - WHM -> Apache Update will allow you to enable the perl module (I am running it alongside php with no issues). Then in /usr/local/apache/conf/httpd.conf: Code: ScriptAlias /dspam/ /opt/dspam/cgi-bin/ Alias /dspam_files/ /opt/dspam/htdocs/ <Directory /opt/dspam/cgi-bin> Options None AllowOverride AuthConfig Order allow,deny Allow from all </Directory> Create .htaccess in /opt/dspam/cgi-bin as follows: Code: AuthName "Dspam" AuthType Basic PerlAuthenHandler Apache::AuthPOP3 PerlSetVar MailHost localhost Require valid-user #PerlSetVar UserMap pop3user1=>realname1,pop3user2=>realname2 #Require user pop3user1 pop3user2 pop3user3 pop3user4 there are 2 commented parameters you can set when using POP3 auth - sure its pretty self-explanatory. Set up admin user (the admin_user must be able to authenticate as a pop user): Code: #echo "admin_user" >> /opt/dspam/cgi-bin/admins Create a queuesize script for web user - so dspam can determine how many messages in the queue. Code: vi /usr/local/bin/eximqsize #!/bin/sh /usr/bin/find /var/spool/exim/input/ -type f | wc -l | cut -d" " -f1- ##EOF # chmod 4755 /usr/local/bin/eximqsize # chown nobody /usr/local/bin/eximqsize Configure web ui, edit /opt/dspam/cgi-bin/configure.pl: Code: $CONFIG{'MAIL_QUEUE'} = "/usr/local/bin/eximqsize"; $CONFIG{'WEB_ROOT'} = "/dspam_files"; $CONFIG{'LOCAL_DOMAIN'} = "FQDN"; #your servers fully qualified domain name - e.g. host.yourdomain.com Next, set the default preferences for the system (you need /opt/dspam/bin in your path if you copy and paste this...): Code: dspam_admin ch pref default trainingMode TEFT dspam_admin ch pref default spamAction quarantine dspam_admin ch pref default spamSubject "[SPAM]" dspam_admin ch pref default enableWhitelist on dspam_admin ch pref default showFactors off Permissions: I would suggest reading the README over dspam to get a full understanding of the permissions required for running of dspam. My permissions were: Code: # chown nobody:mail /opt/dspam/var/dspam -R # chown nobody:mail /opt/dspam/etc/ -R Edit dspam.conf (in /opt/dspam/etc/. I have only listed the parameters I changed here...): Code: TrustedDeliveryAgent "/usr/sbin/exim -oMr spam-scanned" Trust: root Trust: mail Trust: nobody / httpd #choose 1 - what ever your webserver runs as - `ps axu | grep httpd` to find out #Use the same details as you did for the "grant all privileges on...." statement in mysql. MySQLServer /var/lib/mysql/mysql.sock MySQLPort MySQLUser dspamuser MySQLPass dspampass MySQLDb dspamdb MySQLCompress true MySQLVirtualTable dspam_virtual_uids MySQLVirtualUIDField uid MySQLVirtualUsernameField username Almost there.... Confirm that mysql is configure to listen on a socket in /etc/my.cnf (or whereever your config file is): Code: # cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock Now the final step - exim configuration. This is the part that took the longest, hopefully it works for you. Just as I read in the howto's I used for this, please please please dont just copy and paste - you stand a good chance of breaking your mail server if you make changes without understanding. Be warned. My config file is /etc/exim.conf. This should be edited using the WHM -> Exim Configuration Editor -> Advanced. Code: #Routers - Add these in the box before virtual_user delivery / user delivery router). dspam_router: no_verify #uncomment the next line to disable dspam for virtual users. # check_local_user condition = "${if and { {!def:h_X-Spam-Flag:} {!def:h_X-FILTER-DSPAM:} {!eq {$sender_address_domain}{$domain}} {!eq {$received_protocol}{local}} {!eq {$received_protocol}{spam-scanned}} } }" headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full" driver = accept transport = dspam_spamcheck ## The next 2 routers allow you to forward spam / non-spam to dspam for training (e.g. spam-yourmail@yourdomain.net). # spam-username dspam_addspam_router: driver = accept local_part_prefix = spam- transport = dspam_addspam # nospam-username dspam_falsepositive_router: driver = accept local_part_prefix = notspam- transport = dspam_falsepositive ##Transports - can be added anywhere: #this adds the spam-scanned protocol header, so when it is passed back to exim after being processed by dspam, it doesnt get stuck in a loop. dspam_spamcheck: driver = pipe command = "/usr/sbin/exim -oMr spam-scanned -bS" transport_filter = "/opt/dspam/bin/dspam --stdout --deliver=innocent,spam --user $local_part@$domain" use_bsmtp = true home_directory = "/tmp" current_directory = "/tmp" user = nobody group = mail log_output = true return_fail_output = true return_path_add = false message_prefix = message_suffix = dspam_addspam: driver = pipe command = "/opt/dspam/bin/dspam --user $local_part@$domain --class=spam --source=error" home_directory = "/tmp" current_directory = "/tmp" user = nobody group = mail log_output = true return_fail_output = true return_path_add = false message_prefix = message_suffix = dspam_falsepositive: driver = pipe command = "/opt/dspam/bin/dspam --user $local_part@$domain --class=innocent --source=error" home_directory = "/tmp" current_directory = "/tmp" user = nobody group = mail log_output = true return_fail_output = true return_path_add = false message_prefix = message_suffix = If you have set up authentication correctly as well, then you should be able to open [url] and log in - if you add your login details to the "admins" file, you can configure defaults, etc. It also allows ALL users (with 1 user being an email account) to log in, using www.yourclientsdomain.com/dspam/dspam.cgi This will not work with suexec enabled!! This is because dspam needs specific permissions, and it is expecting user nobody to access it. If suexec is enabled, you will need to use the default host, and NOT virtual hosts (and even this may not work - testing still required). Watch exim_mainlog after this - you should pick up what transports and routers are being used. Dspam can really hammer a system - mysql, cpu and memory usage will go up a bit, especially on busy production servers. Monitor your servers performance. Other settings: add /opt/dspam/man to MANPATH in /etc/man.config or move dspam man directory to an existing man directory. [ADDED] This dspam.cgi hack will do a lookup in the cpanel config file to find the domain for any username without a domain, and append it on match (or leave just the username part if nothing is found). This requires unsecuring your system a bit - your http user will need to be able to read /etc/trueuserdomains (either chmod 644 or chown nobody): Code: #add this just after $CURRENT_USER is set. if ($CURRENT_USER !~ /@.+./) { open(TUD, "</etc/trueuserdomains"); while(<TUD>) { my ($domain, $user) = split(/:/,$_); chomp($user); $user =~ s/^s*//g; if ($user eq $CURRENT_USER) { $CURRENT_USER = $CURRENT_USER . "@$domain"; } } close(TUD); } That should do it dspam will allow all messages through by default, and will require some training. With this config, users can train using email commands - all they need to do is forward any spam that hits their mailbox to spam-emailaddress@domain.com (their own email address with spam- prepended). Unfortunately this does not allow handling of false positives if you are using a "quarantine" policy instead of subject. the web interface comes in handy for this. I am busy testing a combination of dspam with assp, which seems to be working well - I especially like the greylisting feature of assp and ProtectionBox... Will add to this howto when testing is finish.
View Replies!
View Related
Howto For Suexec, Php As Cgi
I've been attempting to develope a server running apache 2+, php 5, and I was running into issues installing php as cgi.... All my scripts require The shebang: #!/usr/bin/php at the top to execute properly. Anyone know a good site/how to that explains how to do this? has anyone else here run suexec with apache? If so, could you tell me what you compiled it with? Just curious, as I think i'm doing everything right, yet I still fail
View Replies!
View Related
Bandwidth Limiting HOWTO With Linux, Tc And Iproute2
I've seen a lot of requests for a simple howto dealing with bandwidth limiting/"capping" on Linux. I put together a howto yesterday on this which I hope you'll find useful. Ifve recently optimized the scripts used for bandwidth management in one of our UK facilities and I thought Ifd post a quick howto on it. The full script can be found directly here: http://www.adamsinfo.com/bandwith-li...oute2/#more-15 My setup here is a live feed entering eth0 on this linux router and leaving eth1 into a switch connected to a collection of other servers. This is set up as an unrestricted public router, routing between a /30 on eth0 and a /24 on eth1. Note: We canft in any way restrict the amount of traffic that eth0 receives from the outside, so instead we restrict how fast eth0 sends data out, the same applies the other way round. So, if we want to limit the amount of data that the local servers can send, we shape the routerfs external interface (eth0). If we want to limit the amount of data that the local servers can receive, we shape the routerfs internal interface (eth1) With Debian Etch on 2.6.x, run: apt-get install tc iproute2 bc Then script as follows: # Set some variables #!/bin/bash EXT_IFACE=heth0 INT_IFACE=heth1 TC=htch UNITS=hkbith LINE=h10000 #maximum ext link speed LIMIT=h5000 #maximum that wefll allow # Set some variables for individual gclassesh that wefll use to shape internal upload speed, i.e. shaping eth0 CLS1_RATE=h200 # High Priority traffic class has 200kbit CLS2_RATE=h300 # Medium Priority class has 300kbit CLS3_RATE=h4500 # Bulk class has 4500kbit # (Wefll set which ones can borrow from which later) # Set some variables for individual gclassesh that wefll use to shape internal download speed, i.e. shaping eth1 INT_CLS1_RATE=h1000 #Priority INT_CLS2_RATE=h4000 #Bulk [...] A few hundred lines [...] I have tried not to get bogged down with too many irrelevant details here and would be happy to answer any questions or take any corrections. Itfs pretty simple and it works well. Install bmon and you can confirm this yourself. The purpose of this is that I can take a 10mbit connection and limit the traffic to 5mbit ensuring that I donft break the 95th percentile that I want to maintain at the datacenter. I can increase and decrease this at any time as traffic requires or permits respectively.
View Replies!
View Related
Howto Implement A Spam Appliance Correctly
We are planing to implement a spam appliance like the mailfoundry for our 60 cpanel servers. What is the best and easiest way to replace the standard cpanel mx entry in the dns zonefiles with our two new MX entries? Additionaly we need to enable the option "Always accept mail locally even if the primary mx does not point to this server." for all the dnszonefiles where we use the new MX entries. The problem is, that some customers are using already own mx entries, therefore we can not change all of them, but only the entries which point to the cpanel server. Does someone have a script for this, or how would you change this?
View Replies!
View Related
Howto: FP Uploading Sites With Subwebs (subsites)
Here is the procedure to upload websites and their subwebs (subsites) with FP 2002/2003 Upload the website with FTP Install FP extensions Wait for the DNS to pullulate Open your remote website with FP Convert folders to subwebs as needed Upload (again) all your website files with FP An error message will appear: "cannot find a web server at <domain name> on port 80 ...." select <OK> Wait for FP to stop and a message "status unknown" will appear start uploading again A message asking something about replacing remote files will appear. Select <YES> Repeat the process for each subweb (it might take a while) At the end, you will find a status message: "Successful upload", or similar That was all It works for some hosts with cPanel but I cannot be sure if it works for all Some just require oppening the remote site with FP and convert the requiered folders to subwebs as neeeded.
View Replies!
View Related
Moving MultiAccounts To New Host HowTo Request
I know Cpanel has some features to do this unfortunately i have a private lable Pannel that is why I want to move to a host that can allow me to move all my customers in and out as fast as I need to. There are many reasons to leave or find different hosting that is not the question the question is how to do this without having your customers go crazy or if posible to do it without them even noticing more then a short period of downtime late at night. Please offer any opinions or directions on Pannel choice and methods to make the move seamless. Mistakes are also very interesting And although we all know every hosting company is willing to help us do this and they are all nice guys it is important that things like this can be done fast and also without need for outside tech support All things are important like checking php versions and perl moduals and apache, mysql, phpMyadmin versions.. is setting up a dns3. and dns4. and asking customers to use that important for fast migration?
View Replies!
View Related
Howto : Copy Index.shtml To Folders In One Command ..
i would like to copy index.shtml to these folder in 1 command ... PHP Code: [root@BOX wp-content]# ls -latotal 48drwxr-xr-x 9 sitename sitename 4096 Nov 25 16:06 .drwxr-xr-x 6 sitename sitename 4096 Nov 25 15:52 ..drwxrwxrwx 3 sitename sitename 4096 Nov 25 16:05 backupdrwxr-xr-x 2 sitename sitename 4096 Nov 16 15:39 cachedrwxrwxrwx 3 sitename sitename 4096 Nov 25 16:05 gallery-rwxr-xr-x 1 sitename sitename 30 May 5 2007 index.php-rw-r--r-- 1 sitename sitename 457 Nov 25 16:06 index.shtmldrwxrwxrwx 3 sitename sitename 4096 Nov 16 16:27 photosdrwxr-xr-x 28 sitename sitename 4096 Nov 25 15:57 pluginsdrwxr-xr-x 8 sitename sitename 4096 Nov 22 03:01 themesdrwxr-xr-x 3 sitename sitename 4096 Nov 16 04:04 uploads-rw-r--r-- 1 sitename sitename 909 Nov 16 15:43 wp-cache-config.php[root@BOX wp-content]# i mean to let index.shtml index uploads and themes .....etc in 1 command .
View Replies!
View Related
Howto Load Tun/tap On Centos XEN VPS
Anyone have any info on how to do this? It appears my hosts don't know how to do it.. "You have the tun module which can be loaded via a modprobe but the dev entries would appear to be needed to be made. Of course, you could do this if you know how or wait while I research it. We know tun/tap works on openvz but you're the first request we've had on Xen."
View Replies!
View Related
Howto Load Tun/tap On Centos XEN VPS
"You have the tun module which can be loaded via a modprobe but the dev entries would appear to be needed to be made. Of course, you could do this if you know how or wait while I research it. We know tun/tap works on openvz but you're the first request we've had on Xen."
View Replies!
View Related
Howto Convert Ini_set Function In Code To Php.ini Setting
I have a website that was running fine for a month or two until my host recently changed some settings on the server, and now it shows a bunch of errors. I contacted the host and they said > "To avoid the errors, please do not use disabled function. If you need such functionality, you can have your own php.ini on your root http folder containing only necessary option" Since I'm not a programer, I have no idea what they're talking about. So, I asked them how to do that, they're reply of course was> "Please consult with the script writer on how to convert ini_set function in your code to php.ini seting. As the script is not encrypted, you can do it with commenting all ini_set calls and write a substitute on php.ini (Create php.ini file in webroot folder)." I tried to contact the developer, but it appears he has gone MIA! So, now I am left with no clue how to fix the website, so I turn to you guys! The website is [url]. You can see the errors in the header, but I'll post them here as well>> "Warning: ini_set() has been disabled for security reasons in /home/buymydom/public_html/includes/global.php on line 3 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/buymydom/public_html/includes/global.php:3) in /home/buymydom/public_html/includes/global.php on line 32 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/buymydom/public_html/includes/global.php:3) in /home/buymydom/public_html/includes/global.php on line 32" My question is, How do I convert ini_set function in my code to php.ini?
View Replies!
View Related
Automatically Update AWStats?
I'm not 100% sure where to ask this, so feel free to move it to a more appropriate place if necessary. At present, my webhost provides me with some statistics about my website through "AWStats". The problem I have is that if I don't update the 'stats' everyday, then I lose that day's records and I have a gap in my statistics. is there a way I can automate the updating of the AWStats?
View Replies!
View Related
Why Does XINETD Keep Automatically Shutting Down
I use rfxnetworks.com/sim.php on my cpanel server and it all worked fine until the last week where each morning 6am GMT I get a status warning telling me that XINET was down and that it had to restart it. Has something changed? Is there now something weird about XINETD and cpanel? My cpanel is stable and set to automatically update. In fact it looks like something ALWAYS shuts it down and then SIM restarts it looking at a section of messages:- Jul 2 05:57:02 tkey-29dd xinetd: xinetd shutdown succeeded Jul 2 06:00:01 tkey-29dd xinetd: xinetd shutdown failed Jul 2 06:00:01 tkey-29dd xinetd: xinetd startup succeeded What is causing my server to shutdown xinetd in the first place?
View Replies!
View Related
|