Posts Tagged ‘testing’

Check how webpage looks with Internet Explorer on Linux and FreeBSD with Mozilla Firefox (Netrenderer Firefox plugin)

Thursday, November 1st, 2012

Reading Time: 2minutes

Simulate Internet Explorer in screenshots on GNU / Linux and FreeBSD using Netrenderer in Firefox - Internet Explorer testing tool for web developers on Linux and FreeBSD

I'm not full time web developer. But sometimes, I develop websites too or just had to do some website testing.
I'm using GNU / Linux and BSD as main server and desktop platforms for many years already and hence I don't have regular access to Windows OS and respectively Internet Explorer. In that manner of thoughts it is very useful to have a way to check if a certain website I create displays fine on Internet Explorer 6,7,8 too.

Usually whether I need to test if website displays properly its elements in Internet Explorer I do use the infamous – I guess it is almost impossible anyone is developing websites on Linux and don't know it :). Fortunately while I was googling to remind myself about the exact link location to netrenderer, I've stumbled upon Mozilla Firefox add-on extension which does precisely what website does – i.e. renders a website with HTML Web Engine compatible   to most Internet Explorer versions and creating screenshots on how a website would look under Internet Explorer. Of course the plugin is not a panace and since it only makes screenshots whether there are problems with interactivity (Javascript AJAX) of a website on IE will the plugin will be of zero use. However in general it is good to know if at least the website elements are ordered fine.
After the plugin is added in the usual way as any other plugin in FF, you can start using it with keyboard shortcuts:

Ctrl+Shift+F5/F6/F7/F8 – respectively renders the page in IE5.5, IE 6, IE 7 / IE 8 Beta 2

Pressing CTRL + Shift + FX, makes the IE screenshot of site using

I'm currently running latest Firefox version 16.0.2 and here plugin works, fine I guess on most FF releases not older than few years it should work fine too.

Below is description of the plugin, as taken from plugin website:

IE NetRendered Add-on Description

Adds buttons, tools menu and contextual menu entries to get a screenshot of the current page with IE NetRenderer.

Keyboard shortcuts are also available: Ctrl+Shift+F5/F6/F7/F8 to render the page in IE5.5/6/7/8 Beta 2 (Cmd+Shift+F* on Mac).

Really useful for webmasters which are not using Windows!

You can also access the IE NetRenderer service here:

Please note that the extension developper is not affiliated with GEOTEK, providing the IE NetRenderer service. You can visit his website here:










Apache Benchmarking

Monday, January 14th, 2008

Reading Time: < 1minute
They’re few tools out there which are most common in use to do benchmarking and stess test on webservers. One of them “the most common one”is called “ab” or apache benchmark Check it out here another very common tool is called flood Check it here Flood seems to be the newer and most accurate tool to use for stress testing unfortunately it has one weakness. It only works with configuration file which is in xml format. So every time before you start it you have to generate a new xml file to suite your needs. Also a tool recommended to me in the #apache in the network is called “jmeter”, it’s located here . I personally didn’t tested it because it uses Java as a back end. While googling around I also have stucked on this interesting project PHPSPEED although I wasn’t able to test it looks like a promising test suite.END—–

Fix “Secure Connection Failed” – An error occured SSL received a record that exceeded the maximum permissible length howto

Monday, September 14th, 2015

Reading Time: 2minutes

When I was trying to establish a new Internal Business SSL certificate on one of the 6 months planned SPLIT projects (e.g. duplicate a range systems environment to another one), I've stumbled a very odd SSL issue. Once I've setup all the virtualhost SSL configurations properly (identical SSL configuration directives and Apache Webserver version to another host and testing in a browser I was getting the following error:

Secure Connection Failed

An error occurred during a connection to

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

Below is a screenshot:

The page you are trying to view can not be shown because the authenticity of the received data could not be verified. Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.

The first logical thing to do was to check the error.log but there was no any errors there that point me to anything meaningful, besides that the queries I was making to the Domain doesn't show off as requests neither in Apache access.log nor in error.log so this was puzzling.
I thought I might have messed up something during Key file / CSR generation time so I revoked old certificate and reissued it.


$ openssl x509 -text -in |less ertificate: Data: Version: 3 (0x2) Serial Number:

Shows that all is fine with certificate Then when trying to test remote certificate with SSL command:


openssl s_client -CApath -connect

: There was an error After plenty of research in Google I come to conclusion something is either wrong with Listen httpd.conf directive or NameVirtualHost is binded to port 80 or some other port different from 443, however surprisingly I did not used the NameVirtualHost at all in my apache config. After a lot of pondering I finally spot it. The whole certificate isseus were caused by:

< – Less than sign

which I missaw and forget to clean up from template during IP paste (obtained from /sbin/ifconfig |grep -i xx.xx.xx.xx). So finally in order to fix the SSL error I had to just delete <, e.g.:

<VirtualHost <>

had to become:



Such a minor thing took me 3 hours of pondering to resolve and thanksfully it is finally fixed! Then of course had to restart Apache to make fixed Vhost settings working:

# apachectl stop; sleep 2; apachectl start

So now the SSL works again, thanks God!

How to get rid of Debian and Ubuntu GNU / Linux obsolete configuration files and system directories

Wednesday, October 19th, 2011

Reading Time: 2minutes

I've been using Debian GNU / Linux on my Thinkpad laptop for almost 3 years and half. Initially the Debian version which I had installed was a stable Debian Lenny. As I was mostly dissatisfied of the old versions of the programs, I migrated to testing / unstable
Testing / unstables shipped program versions were a bit better but still back in the day I wanted to get advantage of the latest program versions so for a while I switched to unstable .
Later I regretted for this bad idea, after the migration to Unstable, it was too buggy to run on a notebook one uses for everyday work.
Then to revert back to a bit stable I downgraded to testing unstable again.
When Debian launched Debian Squeeze I set in my /etc/apt/sources.list file software repositories to be the one for the stable Debian Squeeze.

As you can see, I've done quite a lot of "experiments" and "excersises". Many packages were installed, then removed, some became obsolete with time others I just temporary installed out of curiosity. Anyways as a result I ended up with many packages uninstalled / removed , which still kept some of their directory structres and configurations on the machine.

Today, I decided to check how many of these obsolete packages are still present in dpkg database and I was shocked to find out 412 debs were still in my package database! To check the number I used cmd:

root@noah:~# dpkg -l | grep -i '^rcs.*$'|wc -l

Considering the tremendous number of packs waiting to be purged, I decided to get rid of this old and already unnecessery files for the sake of clarity, besides that removing the old already uninstalled packages removes old configuration files, readmes, directories and frees some little space and therefore frees some inodes 😉

Before proceeding to remove them, I carefully reviewed and all the package names which I was about to completely purge in order to make sure there is no package with a configuration files I might need in future:

root@noah:~# dpkg -l |grep -i '^rcs.*$'
After reviewing all the deb packages possessing the rc – (remove candidate) flag, I used the following bash one liners to remove the obsolete deb packages:

root@noah:~# for i in $(dpkg -l |grep -i '^rcs.*$'|awk '{ print $2 }'); do echo dpkg --purge $i done...
root@noah:~# for i in $(dpkg -l |grep -i '^rcs.*$'|awk '{ print $2 }'); do dpkg --purge $i done

First line will just print out what will be purged with dpkg , so after I checked it out I used the second one to purge all the RC packs.

Best Windows tools to Test (Benchmark) Hard Drives, SSD Drives and RAID Storage Controllers

Wednesday, April 23rd, 2014

Reading Time: 3minutes

Disk Benchmarking is very useful for people involved in Graphic Design, 3D modelling, system admins  and anyone willing to squeeze maximum of his PC hardware.

If you want to do some benchmarking on newly built Windows server targetting Hard Disk performance, just bought a new hard SSD (Solid State Drives) and you want to test how well Hard Drive I/O operations behave or you want to see a regular HDD benchmarking of group of MS Windows PCs and plan hardware optiomization, check out ATTO Disk Benchmark.

So why exactly ATTO Benchmark? – Cause it is one of the best Windows Free Benchmark tools on the internet.

ATTO is a widely-accepted Disk Benchmark freeware utility to help measure storage system performance. ATTO though being freeware is among top tools utilized in industry. It is very useful in comparing different Hard Disk vendors speed, measure Windows storage systems performance with various transfer sizes and test lengths for reads and writes.

ATTO Disk Benchmark is used by manufacturers of Hardware RAID controllers, its precious tool to test Windows storage controllers, host bus adapters (HBAs).

Here is ATTO Benchmark tool specifications (quote from their webstie):

  • Transfer sizes from 512KB to 8MB
  • Transfer lengths from 64KB to 2GB
  • Support for overlapped I/O
  • Supports a variety of queue depths
  • I/O comparisons with various test patterns
  • Timed mode allows continuous testing
  • Non-destructive performance measurement on formatted drives
  • Transfer sizes from 512KB to 8MB
  • Transfer lengths from 64KB to 2GB
  • Support for overlapped I/O
  • Supports a variety of queue depths
  • I/O comparisons with various test patterns
  • Timed mode allows continuous testing
  • Non-destructive performance measurement on formatted drives
  • – See more at:

Here is mirrored latest version of ATTO Disk for Download. Once you get your HDD statistics you will probably want to compare to other people results. On  TomsHardware's world famous Hardware geek site there are plenty of Hard Drives performance Charts

Of course there are other GUI alternatives to ATTO Benchmark one historically famous is NBench



Nbench is nice little benchmarking program for Windows NT. Nbench reports the following components of performance:

CPU speed: integer and floating operations/sec
L1 and L2 cache speeds: MB/sec
main memory speed: MB/sec
disk read and write speeds: MB/sec

          SMP systems and multi-tasking OS efficiency can be tested using up to 20 separate threads of execution.

          For Console Geeks or Windows server admins there are also some ports of famous *NIX Hard Disk Benchmarking tools:


          NTiogen benchmark was written by Symbios Logic, It's Windows NT port of their popular UNIX benchmark IOGEN. NTIOGEN is the parent processes that spawns the specified number of IOGEN processes that actually do the I/O.
          The program will display as output the number of processes, the average response time, the number of I/O operations per second, and the number of KBytes per second. You can download mirror copy of Ntiogen here

          There are plenty of other GUI and Console HDD Benchmarking Win Tools, i.e.:

          IOMeter (ex-developed by Intel and now abandoned available as open source available on SourceForge)


          Bench32 – Comprehensive benchmark that measures overall system performance under Windows NT or Windows 95, now obsolete not developed anymore abandoned by producer company.

          ThreadMark32 – capable of bench (ex developed and supported by ADAPTEC) but also already unsupported

          IOZone – filesystem benchmark tool. The benchmark generates and measures a variety of file operations. Iozone has been ported to many machines and runs under many operating systems.

          N! B! Important note to make here is above suggested tools will provide you more realistic results than the proprietary vendor tools shipped by your hardware vendor. Using proprietary software produced by a single vendor makes it impossible to analyze and compare different hardwares, above HDD benchmarking tools are for "open systems", e.g. nomatter what the hardware producer is produced results can be checked against each other.
          Another thing to consider is even though if you use any of above tools to test and compare two storage devices still results will be partially imaginary, its always best to conduct tests in Real Working Application Environments. If you're planning to launch a new services structure always test it first and don't rely on preliminary returned soft benchmarks.

          if you know some other useful benchmarking software i'm missing please share.

          Install VMWare tools on Debian and Ubuntu Linux – Enable VMWare Fullscreen and copy paste between OS host and Virtual machine

          Wednesday, May 28th, 2014

          Reading Time: 5minutes


          If you need to use Virtual Machine to run some testing on heterogenous Operating Systems and you have chosen VMWare as a Virtual Machine. You will soon notice some of Virtual Machines functionality like copy between host operating system and Virtual Machine, true fullscreen mode and most importantly Copy paste between your host operating system and VMWare is not working. I'm not too much into Virtualization these days so for me it was truely shocking that a proprietary software like VMWare, claimed to be the best and most efficient Virtual Machine nowadays is not supporting copy / paste, fullscreen and copy between host and guest OS.  For those arguing why I'm using VMWare at all as it is proprietary and there is already free software Virtual Machines like QEMU and Oracle's VirtualBox its simply because now I have the chance to install and use VMWare 9 Enterprise on my work place at HP with a free Corporate license – in other words I'm using VMWare just for the sake of educating myself and would always recommend VirtualBox for those looking for good substitute free alternative to VMWare.

          Before trying out VMWare, I tried Virtualbox to emulate Linux on my HP work PC running Windows with VirtualBox I was having issues with keyboard not working (because of lack of support of USB, no full screen support and lack of copy / paste between OS-es), I've just recently understood this is not because Virtualbox is bad Virtualization solution but because I forgot to installVirtualBox Oracle VM VirtualBox Extension Pack which allows support for USB, enables copy paste and full screen support. The equivalent to Virtualbox Oracle VM VirtualBox in VMWare world is called VMWare-Tools and once the guest operating system is installed inside VMWare VM, its necessary to install vmware-tools to enable better screen resolution and copy paste.

          In Windows Virtual Machine installation of vmware-tools is pretty straight forward you go through VMWare's menus


          VM -> Install Vmware-tools


          follow the instructions and you're done, however as always installing VMWare-tools on Linux is little bit more complicated you need to run few commands from Linux installed inside the Virtual Machine to install vmware-tools. Here is how vmware-tools is installed on Debian / Ubuntu / Linux Mint and rest of Debian based operating systems:

            1. Install Build essentials and gcc You need to have this installed some developer tools as well as GCC compiler in order for the vmware-tools to compile a special Linux kernel module which enables extra support (integration) between the VMWare VM and the installed inside VM Linux distro

          apt-get install --yes build-essential gcc

          2. Install appropriate Linux headers corresponding to current Linux OS installed kernel

          apt-get install --yes linux-headers-$(uname -r)

          3. Mount CD (Virtual) Content to obtain the vmware-tools version for your Linux

          Be sure to have first checked from VMWare menus on menus VM -> Intall Vmware Tools
          This step is a little bit strange but just do it without too much questioning …

          mount /dev/cdrom /mnt/
          umount /media/cdrom0/
          mount /media/cdrom
          mount /dev/sr0 /mnt/cdrom/
          mount /dev/sr0 /mnt/


          Note that /dev/sr0, might already be mounted and sometimes it might be necessary to unmount it first (don't remember exactly if I unmounted it or not)

          4. Copy and Untar VMwareTools-9.2.0-799703.tar.gz

          cp -rpf /media/cdrom/VMwareTools-9.2.0-799703.tar.gz /tmp/
          cd /tmp/
          tar -zxvvf VMwareTools-9.2.0-799703.tar.gz

          5. Run vmware-tools installer

          cd vmware-tools-distrib/

          You will be asked multiple questions you can safely press enter to answer with default settings to all settings, hopefully if all runs okay this will make VMWare Tools installed

          Creating a new VMware Tools installer database using the tar4 format.
          Installing VMware Tools.
          In which directory do you want to install the binary files?
          What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
          What is the directory that contains the init scripts?
          In which directory do you want to install the daemon files?
          In which directory do you want to install the library files?
          The path "/usr/lib/vmware-tools" does not exist currently. This program is
          going to create it, including needed parent directories. Is this what you want?
          In which directory do you want to install the documentation files?
          The path "/usr/share/doc/vmware-tools" does not exist currently. This program
          is going to create it, including needed parent directories. Is this what you
          want? [yes]
          The installation of VMware Tools 9.2.0 build-799703 for Linux completed
          successfully. You can decide to remove this software from your system at any
          time by invoking the following command: "/usr/bin/".
          Before running VMware Tools for the first time, you need to configure it by
          invoking the following command: "/usr/bin/". Do you want
          this program to invoke the command for you now? [yes]
          Making sure services for VMware Tools are stopped.
          Stopping VMware Tools services in the virtual machine:
          Guest operating system daemon: done
          Unmounting HGFS shares: done
          Guest filesystem driver: done
          [EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that creates backups of virtual machines. Please refer to the VMware Knowledge Base for more details on this capability. Do you wish to enable this feature?
          Before you can compile modules, you need to have the following installed…
          kernel headers of the running kernel
          Searching for GCC…
          Detected GCC binary at "/usr/bin/gcc-4.6".
          The path "/usr/bin/gcc-4.6" appears to be a valid path to the gcc binary.
          Would you like to change it? [no]
          Searching for a valid kernel header path…
          Detected the kernel headers at "/lib/modules/3.2.0-4-amd64/build/include".
          The path "/lib/modules/3.2.0-4-amd64/build/include" appears to be a valid path
          to the 3.2.0-4-amd64 kernel headers.
          Would you like to change it? [no]
          The vmblock enables dragging or copying files between host and guest in a
          Fusion or Workstation virtual environment. Do you wish to enable this feature?
          [no] yes
          make: Leaving directory `/tmp/vmware-root/modules/vmblock-only'

          No X install found.
          Creating a new initrd boot image for the kernel.
          update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
          Checking acpi hot plug done
          Starting VMware Tools services in the virtual machine:
          Switching to guest configuration: done
          VM communication interface: done
          VM communication interface socket family: done
          File system sync driver: done
          Guest operating system daemon: done
          The configuration of VMware Tools 8.6.10 build-913593 for Linux for this
          running kernel completed successfully.
          You must restart your X session before any mouse or graphics changes take
          You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
          command line or by invoking "/usr/bin/vmware-toolbox" from the command line
          during an X server session.
          To enable advanced X features (e.g., guest resolution fit, drag and drop, and
          file and text copy/paste), you will need to do one (or more) of the following:
          1. Manually start /usr/bin/vmware-user
          2. Log out and log back into your desktop session; and,
          3. Restart your X session.
          –the VMware team
          Found VMware Tools CDROM mounted at /mnt. Ejecting device /dev/sr0 …

          .To make sure vmware-tools compiled modules are loaded into Linux kernel inside VM, restart the Virtual Machine. Once Linux boots again and you login to gnome-terminal to check what is vmware-tools status (e.g. if properly loaded) run:

          service vmware-tools status
          vmtoolsd is running


          This method of installing works on Debian 7 (Wheezy) but same steps should work on any Ubuntu and rest of Debian derivatives. For Redhat (RPM) based Linux distributions to install vmware-tools after mounting cdrom drive following above instructions you will have an rpm package instead of .tar.gz archive so all you have to do is install the rpm, e.g. launch smth. like:

          rpm -Uhv /mnt/cdrom/VMwareTools-9.2.0-799703.i386.rpm
          Cheers 😉

          MySQL SSL Configure Howto – How to Make MySQL communication secured

          Wednesday, January 15th, 2014

          Reading Time: 3minutes

          mysql-over-ssl-how-to-configure-logo how to configure ssl on mysql server

          Recently I've been asked How to make communication to MySQL database encrypted. The question was raised by a fellow developer who works on developing a Desktop standalone application in Delphi Programming Language with DevArt an (SQL Connection Component capable to connect Delphi applications to multiple databases like MySQL, Oracle, PostgreSQL, Interbase, Firebird etc.

          Communicating in Secured form to MySQL database is not common task to do, as MySQL usually communicates to applications hosted on same server or applications to communicate to MySQL are in secured DMZ or administrated via phpMyAdmin web interface.

          MySQL supports encrypted connections to itself using Secure Socket Layer (SSL) encryption. Setting up MySQL db to be communicated encrypted is a must for standalone Desktop applications which has to extract / insert data via remote SQL.
          Configuring SQL to support communicated queries encrpytion is supported by default and easily configured on most standard Linux version distributions (Debian, RHEL, Fedora) with no need to recompile it.
          1. Generate SSL Certificates

          $ mkdir /etc/mysql-ssl && cd mysql-ssl

          # Create CA certificate
          $ openssl genrsa 2048 > ca-key.pem
          $ openssl req -new -x509 -nodes -days 3600 \
                   -key ca-key.pem -out ca-cert.pem

          Create server certificate, remove passphrase, and sign it
          server-cert.pem is public key, server-key.pem is private key
          $ openssl req -newkey rsa:2048 -days 3600 \
                   -nodes -keyout server-key.pem -out server-req.pem

          $ openssl rsa -in server-key.pem -out server-key.pem
          $ openssl x509 -req -in server-req.pem -days 3600 \
                   -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out server-cert.pem

          Create client certificate, remove passphrase, and sign it
          client-cert.pem is public key and client-key.pem is private key
          $ openssl req -newkey rsa:2048 -days 3600 \
                   -nodes -keyout client-key.pem -out client-req.pem

          $ openssl rsa -in client-key.pem -out client-key.pem
          $ openssl x509 -req -in client-req.pem -days 3600 \
                   -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out client-cert.pem

          After generating the certificates, verify them:

          $ openssl verify -CAfile ca-cert.pem server-cert.pem client-cert.pem

          2. Add SSL support variables to my.cnf

          Once SSL key pair files are generated in order to active SSL encryption support in MySQL server, add to (/etc/my.cnf,  /etc/mysql/my.cnf, /usr/local/etc/my.cnf … ) or wherever config is depending on distro

          # SSL

          3. Restart MySQL server

          /etc/init.d/mysqld restart

          4. Create SQL user to require SSL login

          Create new user with access to database;

          GRANT ALL ON Sql_User_DB.* TO Sql_User@localhost;

          To create administrator privileges user:

          GRANT ALL PRIVILEGES ON *.* TO ‘ssluser’@'%’ IDENTIFIED BY ‘pass’ REQUIRE SSL;

          5. Test SSL Connection with MySQL CLI client or with few lines of PHP

          To use mysql cli for testing whether SSL connection works:

          $ mysql -u ssluser -p'pass' –ssl-ca /etc/mysql-ssl/client-cert.pem –ssl-cert /etc/mysql-ssl/client-key.pem

          Once connected to MySQL to verify SSL connection works fine:

          mysql> SHOW STATUS LIKE 'Ssl_Cipher';
          | Variable_name | Value              |
          | Ssl_cipher    | DHE-RSA-AES256-SHA |

          If you get this output this means MySQL SSL Connection is working as should.

          Alternative way is to use test-mysqli-ssl.php script to test availability to mysql over SSL.

          mysqli_ssl_set($conn, '/etc/mysql-ssl/client-key.pem', '/etc/mysql-ssl/client-cert.pem', NULL, NULL, NULL);
          if (!mysqli_real_connect($conn, '', 'ssluser', 'pass')) { die(); }
          $res = mysqli_query($conn, 'SHOW STATUS like "Ssl_cipher"');

          Note: Change username password according to your user / pass before using the script

          That's all now you have mysql communicating queries data over SSL


          How to fix problem with Skype No Video on MacBook Air with Mac OS X 10.8.6 / Mac OS X Repair OS file permissions with Disk Utility

          Monday, December 9th, 2013

          Reading Time: 2minutes

          mac os x utilities disk utility reset Mac OSX file permissions to default
          My girlfriend Svetlana has MacBook Air and just recently her skype Video calls stopped working once again after Mac OS X offered her to apply some update. Her notebook as of time of writting this post is running Mac OS X version 10.8.6. About 1 month and a halfago she was facing same Skype No VIdeo on Mac BookAri issues for how I fixed her No Video Skype issues back then check here. Initially I thought again the problem will be identical and to test if Web Camera hardware is detected on a hardware level by OS, I tried to check if it is displaying videoi FaceTime application. Last time there was no Video in Skype on her Mac Book Air  I remember clearly camera was detected on OS level and displaying well in Facetime, however this time even in facetime I couldn't see a capture of myself … As obviously problem was not in Skype Mac OS previous time fix of substituting AppleCamera.plugin with older version would not fix it. After some evaluation on problem and reading large number of posts on Apple support forums, I've came to the conclusion that it is possible the whole issues are faced by improper permissions applied by latest applied Mac OS update. In such cases people were recommending to Repair Mac OS Standard OS Files Permissions using an OS embedded tool called Disk Utility.
          Disk Utility is an application that's built into OS X that can perform lots of useful and even scary actions.Sysadmins and advanced users seem to find frequent need of this handy tool but those newer to the Mac OS it is better to only use it after reading the docs and well realizing what exactly doing.

          To Find / Open Disk Utility on Mac OS;

          Launch Applications folder -> Utilities (folder), click the name of your startup disk, and select Repair Disk Permissions.


          Mac OS X 10.8.6 Disk Utility Repair Disk Permissions screenshot
          As I can understand from other ports reverting Mac OS File permissions to their default can solve a number of strange issues with Mac OS.
          After repairing Mac OS X basis OS file permissions and testing in FaceTime and Skype, Camera god detected and Video was working fine 🙂
          Hope this little article helps someone to fix same issues, if so please drop a thank you comment 😉

          Testing Qmail installation for problems: Common reasons for unworking qmail / How to debug Qmail mail server failing to delivery or send emails

          Friday, November 9th, 2012

          Reading Time: 8minutes

          Testing qmail installation for problemes finding qmail common component failures

          Through my 10 years of experience  in managing and "life with qmail", I've at many times had to deal with suddenly broken or misconducting, qmail installs. With some of them the problems started during new Qmail install configuration time, with others QMAIL worked perfectly for years and then suddenly it stopped working. Nomatter what the situation was, there was a kind of "scenario" and common things to check to debug and find out what is causing the respective qmail installation to not work. In this little, article I will try to share my knowledge in hope that others which configure new QMAIL based mail servers or are in situation to need to recover – "resurrect" a one that suddenly stopped working qmail to its normal operations.

          Here are few cases , there are many more, probably hundreds of reasons which might be causing Qmail + Vpopmail  to stop properly delivering e-amails but  as this ones ones are really most likely ones just checking them gives a good clue What is going wrong with  Qmail?.:

          • Something broke up with scheduled daemontools processes;
          • There is no hard disk (the disk is full) and Qmai is unable to writeinside its mail Queue directories (/var/qmail/queue) or Spamassassin or AntiVirus programs fails to write on disk
          • ( /var/qmail/bin/ ) perl script is messed up or if using simscan to do antivirus check-ups instead simscan is failing somewhere
          • something messed up with /var/qmail/control/rcpthosts
          • something messed up with /var/qmail/control/validrcptto.txt or /var/qmail/control/validrcptto.cdb
          •  incorrect main server host in /var/qmail/control/me or /var/qmail/control/plusdomain
          • Messed up vpopmail (virtual domain) records in /var/qmail/control/virtualdomains file
          • problems with insufficient memory (whether there is a softlimit memory limit for /service/qmail-smtpd/run (qmail daemontools start up and monitoring script) – /usr/local/bin/softlimit is no longer proposed used by newer qmail guides but in older ones it was common to appear in /../qmail-smtpd/run
          • Something is wrong with clamd (/usr/sbin/clamd – for example crashed due to bug) or something is wrong with clamav database ( /var/lib/clamav or wherever set to be stored; on some installs /usr/local/lib/clamav) – there most commonly main.cvd and daily.cld break up during freshclam clamav database update.
          • As freshclam takes care for AntiVirus database updates it is good to check it is properly running, either as a service or via a cronjob
          • Assure there are no mistakes or wrong (unexistent) variables in /etc/tcp.smtp file or / and /etc/tcp.smtp.cdb is not broken
          • Permission issues with; qmail main binaries in /var/qmail/bin/ , queue files – /var/qmail/queue or qmail log files /var/log/qmail/…

          As I said there are plenty of other possible, reasons but I listed this here, since they're the most common reasons for problems with sent or receive of messages with Qmail mail server.

          Checking all of the above and making sure they're okay, I've checked daemontools readprodctitle process as it often signalize for problems with any part of qmail install, there all seemed normal no warnings and errors, e.g.:

          qmail:~# ps ax|grep -i -E 'clam|freshclam|spam|vpopmail'
          2241 ? Ssl 3:49 /usr/sbin/clamd
          2408 ? Ss 11:54 /usr/bin/freshclam -d --quiet
          2853 ? S 0:00 tcpserver -H -R -v -c100 0 110 qmail-popup /home/vpopmail/bin/vchkpw qmail-pop3d Maildir
          2856 ? S 0:01 tcpserver -vR -l /var/qmail/control/me -c 30 -u 89 -g 89 -x /etc/tcp.smtp.cdb 0 25 rblsmtpd -t0 -r -r -r -r qmail-smtpd /var/qmail/control/me /home/vpopmail/bin/vchkpw /bin/true
          2857 ? S 0:00 sslserver -e -vR -l -c 30 -u 89 -g 89 -x /etc/tcp.smtp.cdb 0 465 qmail-smtpd /home/vpopmail/bin/vchkpw /bin/true

          qmail:~# ps ax|grep -i qmail
          2840 ? S 0:00 supervise qmail-send
          2844 ? S 0:00 supervise qmail-smtpd
          2846 ? S 0:00 supervise qmail-pop3d
          2848 ? S 0:00 supervise qmail-smtpdssl
          2850 ? S 0:05 qmail-send
          2852 ? S 0:00 multilog t n1024 s1048576 n20 /var/log/qmail/qmail-smtpdssl
          2853 ? S 0:00 tcpserver -H -R -v -c100 0 110 qmail-popup /home/vpopmail/bin/vchkpw qmail-pop3d Maildir
          2854 ? S 0:00 multilog t s100000 n20 /var/log/qmail/qmail-pop3d
          2855 ? S 0:01 multilog t n1024 s1048576 n20 /var/log/qmail/qmail-smtpd
          2856 ? S 0:01 tcpserver -vR -l /var/qmail/control/me -c 30 -u 89 -g 89 -x /etc/tcp.smtp.cdb 0 25 rblsmtpd -t0 -r -r -r -r qmail-smtpd /var/qmail/control/me /home/vpopmail/bin/vchkpw /bin/true
          2857 ? S 0:00 sslserver -e -vR -l -c 30 -u 89 -g 89 -x /etc/tcp.smtp.cdb 0 465 qmail-smtpd /home/vpopmail/bin/vchkpw /bin/true
          2858 ? S 0:01 multilog t n1024 s1048576 n20 /var/log/qmail/qmail-send
          2868 ? S 0:01 qmail-lspawn ./Maildir
          2869 ? S 0:00 qmail-rspawn
          2870 ? S 0:00 qmail-clean
          2871 ? S 0:04 qmail-todo
          2872 ? S 0:01 qmail-clean
          27742 pts/6 S+ 0:00 grep -i qmail

          qmail:~# ps ax |grep -i readproc|grep -v grep
          48060 ?        S      0:00 readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................

          As you see  "….." signalize, all is fine with processes scheduled to run over daemontools process. If you instead get warnings or error messages usually the error will point you what is wrong with the qmail install. Common error, I've got over the years here especially on long time functionining qmail installs is insufficient disk space to write in qmail queue and log files.

          Also above ps ax|grep -i -E 'clam|freshclam|spam|vpopmail'
          shows all 3 clamd, freshclam and vpopmail are up and running so this most likely means all is good with them. Of course sometimes some of those 3 is working and there are problems with the services properly processing emails so it is always a good idea to read qmail log files, in most qmail installations qmail logs are located in /var/log/qmail .

          Quickest way is to check all of the qmail related logs in a loop with something like:

          qmail:~# for i in $(ls -d /var/log/qmail/*qmail*/); do tail -n 10 $i/current|tai64nlocal; sleep 5; done

          Also it is always a good idea to check last 10 lines of clamav, freshclam, qmail-scanner and spamd logs:

          qmail:~# tail -n 10 /var/log/qmail/clamav/clamav.log;
          Fri Nov 9 06:52:28 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 07:52:28 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 08:52:28 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 09:52:28 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 10:52:29 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 11:57:29 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 12:57:29 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 14:14:35 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 15:33:46 2012 -> SelfCheck: Database status OK.
          Fri Nov 9 16:33:46 2012 -> SelfCheck: Database status OK.

          qmail:~# tail -n 10 /var/log/qmail/clamav/freshclam.log
          Fri Nov 9 16:20:44 2012 -> --------------------------------------
          Fri Nov 9 17:20:44 2012 -> Received signal: wake up
          Fri Nov 9 17:20:44 2012 -> ClamAV update process started at Fri Nov 9 17:20:44 2012
          Fri Nov 9 17:20:44 2012 -> WARNING: Your ClamAV installation is OUTDATED!
          Fri Nov 9 17:20:44 2012 -> WARNING: Local version: 0.97.5 Recommended version: 0.97.6
          Fri Nov 9 17:20:44 2012 -> DON'T PANIC! Read
          Fri Nov 9 17:20:44 2012 -> main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
          Fri Nov 9 17:20:44 2012 -> daily.cld is up to date (version: 15557, sigs: 284869, f-level: 63, builder: jesler)
          Fri Nov 9 17:20:44 2012 -> bytecode.cld is up to date (version: 191, sigs: 37, f-level: 63, builder: neo)
          Fri Nov 9 17:20:46 2012 ->

          qmail:~# tail -n 10 /var/log/qmail/qscan/qmail-queue.log
          Fri, 09 Nov 2012 13:14:35 EET:14705:
          from='', subj='Network Developer', via SMTP from
          Fri, 09 Nov 2012 13:14:44 EET:14705: ------ Process 14705 finished. Total of 8.846395 secs
          Fri, 09 Nov 2012 15:04:27 EET:21979: +++ starting debugging for process 21979 (ppid=21969) by uid=89
          Fri, 09 Nov 2012 15:04:27 EET:21979: g_e_h: return-path='', recips=''
          Fri, 09 Nov 2012 15:04:27 EET:21979: from='"G. Georgiev" ', subj='Re: Network Developer', via SMTP from using auth (
          Fri, 09 Nov 2012 15:04:34 EET:21979: ------ Process 21979 finished. Total of 6.626484 secs
          Fri, 09 Nov 2012 15:33:46 EET:23891: +++ starting debugging for process 23891 (ppid=23884) by uid=89
          Fri, 09 Nov 2012 15:33:46 EET:23891: g_e_h: return-path='', recips=''
          Fri, 09 Nov 2012 15:33:46 EET:23891: from='"Sandy Richardson" ', subj='RE: Network Developer', via SMTP from

          qmail:~# tail -n 10 /var/log/spamd/current |tai64nlocal 2012-11-09 16:25:43.091680500 Nov 9 15:04:27.858 [22049] info: spamd: connection from localhost [] at port 54494
          2012-11-09 16:25:43.091683500 Nov 9 15:04:27.948 [22049] info: spamd: checking message <> for qscand:89
          2012-11-09 16:25:43.091684500 Nov 9 15:04:33.837 [22049] info: spamd: clean message (0.0/5.0) for qscand:89 in 6.0 seconds, 1104 bytes.
          2012-11-09 16:25:43.091690500 Nov 9 15:04:33.838 [22049] info: spamd: result: . 0 - scantime=6.0,size=1104,user=qscand,uid=89,required_score=5.0,rhost=localhost,raddr=,rport=54494,mid=<>,autolearn=ham
          2012-11-09 16:25:43.091692500 Nov 9 15:04:34.077 [22043] info: prefork: child states: II
          2012-11-09 16:25:43.091692500 Nov 9 15:33:53.626 [22049] info: spamd: connection from localhost [] at port 54681
          2012-11-09 16:25:43.091696500 Nov 9 15:33:53.656 [22049] info: spamd: checking message <05e201cdbe7e$d1c83c90$7558b5b0$> for qscand:89
          2012-11-09 16:25:43.091697500 Nov 9 15:33:59.467 [22049] info: spamd: clean message (0.0/5.0) for qscand:89 in 5.8 seconds, 33845 bytes.
          2012-11-09 16:25:43.091698500 Nov 9 15:33:59.467 [22049] info: spamd: result: . 0 - scantime=5.8,size=33845,user=qscand,uid=89,required_score=5.0,rhost=localhost,raddr=,rport=54681,mid=<05e201cdbe7e$d1c83c90$7558b5b0$>,autolearn=ham
          2012-11-09 16:25:43.091702500 Nov 9 15:33:59.506 [22043] info: prefork: child states: II

          Whether observing, some of above logs reveals problems to delivery e-mail messages because e-mail boxes are not existing in  /var/qmail/control/validrcptto.cdb – this often happens whether new e-mail boxes are created and the new mail somehow did not enter validrcptto.txt / validrcptto.cdb , you will have to re-build validrcptto.cdb. Rebuilding validrcptto.cdb manually is done with cmd:
          br />  

          qmail:~# /usr/local/bin/mkvalidrcptto > /var/qmail/control/validrcptto.txt qmail:~# cdbmake-12 /var/qmail/control/validrcptto.cdb /var/qmail/control/validrcptto.tmp < /var/qmail/control/validrcptto.txt

          Of course, if the qmail was already properly installed with validrcptto support, this should be done automatically with some cron job set to invoke above commands every 5 minutes or so. In Thibs QmailRocks followed install the script is called /usr/sbin/update-validrcptto and is set to exec every 5 mins.

          If spamassassin is configured to automatically update its set of anti-spam rules, via some cron job or smth. it is always a good idea to check if spamassassin, properly loads up does not fail due to some antispam rule:

          qmail:~# spamassassin --lint -D ...

          You will have to examine carefully, the long returned content for "warning" and "error" keywords. If you don't won't to bother with details you can do, spamassassin –lint

          Another good idea whether problems with qmail is of course to rebuild tcpserver cdb file for smtp – this usually solves problems caused by broken /etc/tcp.smtp.cdb.cdb files.

          Re-building manually tcp.smtp.cdb is done with:
          qmail:~# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
          qmail:~# chmod 644 /etc/tcp.smtp.cdb

          However, most qmail installation guides recommend or set a qmailctl bash script file, to start / stop / reload / flush qmail queue or simply get status of the qmail installation, so it much easier to rebuild tcp.smtp.cdb through it:
          qmail:~# qmailctl cdb
          Reloaded /etc/tcp.smtp.

          Checking the status of the Qmail Queue state and fixing issues with it can be done using little external tool qmHandle – check my previous article ( Cleaning Qmail filled queue with Spam messages )

          To check the basic qmail compontents (qmail-send, qmail-smtpd , qmail-smtpdssl)do:

          qmail:~# qmailctl stat
          /service/qmail-send: up (pid 2850) 1886193 seconds
          /service/qmail-send/log: up (pid 2858) 1886193 seconds
          /service/qmail-smtpd: up (pid 2856) 1886193 seconds
          /service/qmail-smtpd/log: up (pid 2855) 1886193 seconds
          /service/qmail-smtpdssl: up (pid 2857) 1886193 seconds
          /service/qmail-smtpdssl/log: up (pid 2852) 1886193 seconds
          messages in queue: 2
          messages in queue but not yet preprocessed: 0

          Another good practice if you have doubts that something is messed with qmail-queue is to check what is waiting to be send in queue:

          qmail:~# qmail-qstat
          messages in queue: 2
          messages in queue but not yet preprocessed: 0

          In above paste, from my mail server I have just 2 mails, if you however notice here some large numbers like 5000 or 10000, this might be the cause for asetbacks. If you have plenty of undelivered mails waiting in mail server queue, examine the queue:

          qmail:~# qmail-qread ....

          Of course it is sometimes, possible to be in situation, where more than one components are creating mail server's sent / receive delivery issues. Anyhow doing a close examination of all possible components usually should (if not reveal what causes the issue) at least give you some pointer to where to search for the problem.

          Also for qmail installations based on QmailRocks or Thibs QmailRocksguide, there is a tiny shell script provided, that does evaluation on standard qmail files permissions and binary locations and reports, whether it finds problems with some of them. You can fetch a copy of the qmr_inst_check from here . Although the script is created to check a newly install qmail for problems, it also often helps in determining issues with qmails who mysteriously stopped working.

          If you suspect, there are::

          Well that's it. Hope this little walk through give you idea where to check on troublesome Qmail install. Please leave a comment if it help you (somehow) solve your issue. Also will be glad to hear if I'm missing somethingi'm sure I am.

          testing blogit to a moved machine

          Wednesday, June 17th, 2009

          Reading Time: < 1minute
          testing 123END—–