fetchmail with proemial and mutt

One of My Small Projects Required fetch mail to pull mails on linux system.

1. Need to download mail from remote server using fetchmail on linux

2.fetchmail will be added to crontab and scheduled to pull mail for every 2 minutes

3.each mail will be downloaded to a seperate text file

while configuring fetech mail with mda “/usr/bin/procmail -d %T”  getting syntax error   and i tried with  single  quotes ‘  and without quotes too .

/usr/bin/fetchmail –daemon 0 -v -f /etc/fetchmailrc
fetchmail: WARNING: Running as root is discouraged.
fetchmail:/etc/fetchmailrc:13: syntax error at mda

 

Though it  is not the solution for this problem ,  i called fetch mail in crontab this way

*/1 * * * * /usr/bin/fetchmail -m “/usr/bin/procmail -d %T”–daemon 0 -v -f /etc/fetchmailrc &> /dev/null

Recovering Mysql database from A Failed RAID disk

It is always a good idea  to backup mysql database on a production server at regular intervals. Read my post how to  auto schedule a mysql database-backup on windows or linux.

If you are using a RAID 0 drive for mysql and the disk failed to boot  what will you do ?  If you have mysqlbackup It is easy to reinstal mysql and restore database from backup .   But what if you dont have any backup  .. ?

Yeah it happend to me ! . I have used  all the data recovery softwares i found on internet to get the databack . succeeded   Only with TESTDISK and GetMydataback .

As soon as i noticed that my server is no more bootable due to RAID fail , I requetsed datacenter support team to  keep the prsent RAID drive  as secondary driver and add another harddisk   and install OS on it .

I booted off serevr with newly installed OS but i can see the Failed RAID parition  not mounted as it is showing  RAW file system in  diskmanagemnet.

 

Screen Shot 2013-07-27 at 6.40.24 PM

I used TestDisk and tried to copy mysql InnoDB  file  idbdata1  from failed drive which is around 46 GB  , but Test disk is copying the file in a kind of loop .  Once The file being written completely it starts overwriting it again and again .

 

 

Screen Shot 2013-07-27 at 5.17.43 AMScreen Shot 2013-07-27 at 5.17.01 AM

 

 

 

Disable Elasticsearch listening on ipv6

By default elastic search is listening on ipv6 and not ipv4 when installed .

We can make it listen on on ipv4 by adding this line
network.host: _non_loopback:ipv4_ to /etc/elasticsearch/elasticsearch.yml configuration file .

Or we can disable ipv6 at Operating system level by adding below lines to /etc/sysctl.conf file
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

We can restart the server or just sudo sysctl -p to activate the changes

Unable to Remove Webroot Secure anywhere on Mac

———————————-

I have installed Webroot Secure anywhere on my macintosh system . But when I open Micorsoft Remote Desktop , Webroot keeps RDP window minimising for every few seconds .

I tried to uninstall webroot SA from /Applications by shutting down the application and moving it to trash without success .

I was unable to remove it even from command prompt .

Finally I rebooted mac into single-usermode by pressing Command+S and then issued mount -uw / to mount the drive .

with rm -rf /Applications/webroot Secure Anywhere command I finally got rid of it .

I recommend you not to uninstall any antivirus software like webroot if you have it already unless you are facing some issues with it.

Auto Start Oracle Virtual box VM

——————————-

We can make Oracle virtual-box Vm start automatically when host system reboots.
This can be done by attaching a batch file to scheduletasks in windows environment .

Create a batch file that cotanins like ..

“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” startvm “Gues-OS-Name”

then create a basic schedule task and choose when system start option .

If you want the VM window to be hidden and not to leave a command prompt window, you can change the batch file like below

“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” startvm “Gues-OS-Name” –type headless