Saturday, April 07, 2018

email slowdown and possible fixes

From March 24 or 25, our mailing list started having a lot of delays in email sending, especially to gmail.com. Found the following issues:

1. For some gmail emails, the server was trying the ipv6 address, and not able to reach it - like

Mar 25 09:34:15 krishna postfix/smtp[19788]: connect to gmail-smtp-in.l.google.com[2404:6800:4003:c03::1b]:25: Network is unreachable

Mar 25 09:34:28 krishna postfix/smtp[20163]: connect to ASPMX.L.GOOGLE.COM[2404:6800:4003:c02::1b]:25: Network is unreachable

This was probably due to a router change at the Studio.

Did this -
https://support.plesk.com/hc/en-us/articles/213398289-Specifying-Postfix-configuration-of-IPv4-IPv6-protocol-support
ie
adding the option:

inet_protocols=ipv4

to the /etc/postfix/main.cf Postfix configuration file. And then as root,

# postfix reload
# service postfix restart

That worked, the emails went out. But the email sending rate was only around 1000 emails per hour, as reported by
# qshape incoming active deferred

2. A lot of mails were being deferred instead of bounced by gmail, OverQuotaTemp.
cat  /var/log/mail.log | grep OverQuotaTemp | wc -l
5878
PB unconfirmed those emails using
cat /var/log/mail.log | grep OverQuotaTemp | grep 'to=' | grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*' | sort | uniq -i

Then also for bouncing emails, like
cat  /var/log/mail.log | grep "does not exist"
cat  /var/log/mail.log.1 | grep "does not exist"
cat  /var/log/mail.log.1 | grep "553 Mail from 111.93.16.162 not allowed"
cat  /var/log/mail.log | grep "status=bounced"
cat  /var/log/mail.log.1 | grep "status=bounced"

3. Mails were still going out slowly, with the usage on the internet port being like

Next try was to speed up sending to gmail.com domain, since the other emails were going out OK. Then, added these two lines to /etc/postfix/main.cf - 

maximal_queue_lifetime = 2d
default_destination_concurrency_limit = 100

decreasing lifetime from 5d to 2d and increasing concurrency limit from 20 to 100. That seemed to improve things - the outgoing rate went up to almost the peak rate - 

and from the next day, the emails were going out like









Thursday, April 05, 2018

notes on startup / shutdown times

On a machine with dual boot,

Time taken for Windows 7 to boot, open firefox and open youtube.com - 3:30 minutes.
Time taken for Linux Mint 18.3 to boot, open firefox and open youtube.com - 1:15 minutes.
Similarly, Windows takes 40 seconds to shut down, while Linux shuts down in less than ten seconds.
Equivalent of Hotspot Shield, if you want to watch something which is blocked - have installed PureVPN extension for both Chrome and Firefox...

Linux vs Windows 7 brief speed test

N's Lenovo B640 laptop had become old and slow. Tried dual booting with Linux Mint, found quite an improvement. 

Time taken for Windows 7 to boot, open firefox and open youtube.com - 3:30 minutes.

Time taken for Linux to boot, open firefox and open youtube.com - 1:15 minutes.

Similarly, Windows takes 40 seconds to shut down, while Linux shuts down in less than ten seconds.

Thursday, March 29, 2018

finding ip ranges via ASN

To obtain all the IP ranges of an ISP or large organization, got a procedure from this quora post -

https://www.quora.com/How-can-I-obtain-a-list-of-IP-addresses-owned-by-a-specific-company-I-would-like-to-provide-a-targeted-offer-to-site-visitors-if-they-work-at-a-certain-company-I-would-like-to-get-a-list-of-the-IP-addresses-that-this-organization-owns


https://www.peeringdb.com/net/1903 has Airtel's ASN.

Then, we can use that ASN in this whois query -

whois -h whois.radb.net -- '-i origin AS9498' | grep -Eo "([0-9.]+){4}/[0-9]+" > airtel.txt
whois -h whois.radb.net -- '-i origin AS9829' | grep -Eo "([0-9.]+){4}/[0-9]+" > bsnl.txt

Wednesday, March 28, 2018

boot from grub - link dump

https://www.linuxquestions.org/questions/linux-software-2/booting-windows-from-the-grub-prompt-275446/

root (hd0,0)
makeactive
chainloader --force +1
boot

But grub 2 is different.
https://www.linux.com/learn/how-rescue-non-booting-grub-2-Linux

grub> set root=(hd0,1)
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot

https://unix.stackexchange.com/questions/77263/use-grub-rescue-to-boot-from-windows-xp-partition-cd-or-usb

set prefix=(hd1,1)/grub
set root=(hd1,1)
insmod normal
normal

https://www.aioboot.com/en/boot-windows-grub2/

from grub rescue prompt,
search -s root -f /NTDETECT.COM
drivemap -s hd0 $root
ntldr /ntldr
boot

https://www.gnu.org/software/grub/manual/grub/grub.html#DOS_002fWindows

parttool (hd0,1) hidden-
parttool (hd0,2) hidden+
set root=(hd0,1)
chainloader +1
parttool ${root} boot+
boot

https://www.aioboot.com/en/boot-windows-grub2/

http://forums.justlinux.com/showthread.php?153121-Fun-with-GPT-partitioning

unable to make XP boot from a cloned volume on Intel Mac

Just a few lines of notes - trying making other partitions hidden to make XP boot - doesn't work, since partition is GPT, grub says hidden - unknown argument or whatever.

using dd to clone a usb drive

From
https://www.garron.me/en/bits/convert-store-copy-bootable-usb-iso-file-another-usb.html

Tuesday, March 27, 2018

Linux Mint 18.1 not booting - solved

Linux Mint was not booting into graphical mode. It was not even dropping me into an emergency shell - a dialog box about not being able to connect to upstart would appear, your session lasted only 10 seconds etc, and the window manager would restart. Initially I thought this was due to some problem related to booting as in my previous post. But then, saw this post on the Linux Mint forums. So, hit Ctrl Alt F2 to get a shell, (in my case, fn+Ctrl+Option, since this is a Macbook), did
  apt remove virtualbox-guest*
and rebooted OK. 

Monday, March 26, 2018

link dump - ALSA etc - for software lock-in amplifier

ALSA tutorial for beginners - 2004 - http://www.linuxjournal.com/article/6735?page=0,1


Checking the code and compiling from https://www.av8n.com/physics/lockin.htm

http://www.qtcentre.org/threads/53452-QtGui-QApplication-No-such-file-or-directorty

QApplication and Qwidgets derived classes are in widgets module in Qt 5 so to fix that you need to add QT += widgets in the .pro file and run qmake and also use #include <QApplication> instead of #include <QtGui/QApplication> (and the code becomes compatible with both Qt 4 and 5), you can read more here

Or download 10.04,
and
https://help.ubuntu.com/community/Installation/FromUSBStick#Install_and_run_Startup_Disk_Creator_alias_usb-creator

Thursday, March 22, 2018

link dump for triple boot of Windows, Linux and MacOS on Macbook

1. https://lifehacker.com/how-to-run-a-portable-version-of-windows-from-a-usb-dri-1565509124


https://medium.com/@manujarvinen/setting-up-a-multi-boot-of-5-linux-distributions-ca1fcf8d502

2. Brief notes: Using rEFInd, need to allow drive to spin up for it to be visible on refind.

usb drive not seen with refind.

Windows XP installer did not allow installation to partition which was created after the mac partition, so creating a new partition by moving the mac partition - 8 hours!

3. EFI fix - https://apple.stackexchange.com/questions/57597/how-to-fix-broken-efi-partition

https://www.kubuntuforums.net/showthread.php/43221-GRUB-2-A-Guide-for-Users/page15?p=379352#post379352

Tried gdisk -> Advanced -> H

Finally. Install Mint alongside other partitions.

4. https://www.tecmint.com/command-line-tools-to-monitor-linux-performance/

5. EFI - Created with Linux mint install graphical using 200 MB at beginning.

Edit: 7 Nov 2019 - https://www.intowindows.com/how-to-create-live-usbcddvd-of-vistaxp/


Edit: 2 Jan 2021 - Possibly a portable Win10 using WintoUSB may be the easiest option, for Windows 7 and higher versions of Windows - the Macbook is supposed to boot from CD if we press and hold the C keyhttps://en.wikipedia.org/wiki/WinBuilder#Actively_developed_projects


restoring to a different path

 A link dump on restoring a cloned disk to a different path - 



Wednesday, March 21, 2018

recovering after overwriting EFI partition

Tried to install Windows XP on the Macbook running OS X 10.6 and Linux Mint 18.1 dual boot. Though a new primary partition was created at the beginning of the drive, Windows XP refused to install on it, saying there are too many partitions.



In the process, the EFI boot partition was overwritten. So, the machine would not boot. Tried creating a refind boot USB drive - that showed up the Mac and Linux boot loaders, but did not boot either of them - the Linux boot ended in an emergency shell, and the Mac boot ended with the Mac apple turning into a cross, and not booting.

Googled various options, and thought the easiest way would be to do another Linux install. Made another Linux Mint installable USB drive by doing dd of the Mint 18.3 iso to a 16 GB drive, recreated an EFI partition using the installer's GUI partitioning tool, installed the 18.3 to another partition created in free space, and after install, the 18.3 and MacOS were successfully booting.

The original Linux Mint 18.1 was still not booting - dropping into emergency shell. 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.'



journalctl -xb showed that the reason for not booting up was that it was not able to mount /boot/efi with UUID - the UUID had changed, of course, since the boot partition had been re-created. So, just booted into the new 18.3 Linux install, mounted the 18.1 volume, sudo nano edited the /etc/fstab with the UUID from the 18.3's /etc/fstab, and then rebooted - all OK.

Here are some of the things I googled and found - something like rough notes -

enabling bios mode
https://superuser.com/questions/1133040/unable-to-boot-into-windows-10-with-refind-solved/1133052
Ctrl R for safe boot into OS X
https://kb.wisc.edu/helpdesk/page.php?id=7197



Saturday, March 17, 2018

Unified Threat Management - UTM devices, proxies etc

In the context of an outage of our Cyberoam device, and the general decrepitness of the college proxies, I took a look at some available options, tuning etc.

https://www.quora.com/Which-is-the-best-Open-Source-Unified-Threat-Management-System-UTM-in-the-market

mentions ClearOS

http://jonmoore.duckdns.org/index.php/network-security/32-open-source-utm

reviews pfsense , untangle and sophos. He has an additional VPN requirement.

Comodo offers a free download.

https://www.google.co.in/search?q=set+up+a+unified+threat+management+appliance+with+open+source+software

For squid tuning, cache size etc,
https://forum.pfsense.org/index.php?topic=24429.0

where a user suggests, for an admin who has trouble with 70 users,

 I recommend use 10KB to 16KB(thumbnail picture size) for object size.
On restart COSS contents will be lost(developent still on progress for this issue)

for your memory issues:
squid/lusca would use 10MB per GB of total cache(when full).
http://wiki.squid-cache.org/SquidFaq/SquidMemory#How_much_memory_do_I_need_in_my_Squid_server.3F

If your system starts to use SWAP file(due to lack of RAM) then it will definitely slows your internet.
Squid/lusca starts to grow Page faults it also affects performance.

You might need to consider changing your cache_mem and give them to your OS.
This FAQ would help you.
http://wiki.squid-cache.org/SquidFaq


Tuesday, March 13, 2018

temporary router

PB sent me his configuration changes when he put in a temporary router -

1. Editing /etc/network/interfaces to give our mail server a public id (earlier it was in the DMZ)
2. Physically connecting the server with LAN cable to one of the ports of the router.
3. Going to NAT Access Control under Network Options on the router's config page, to disable NAT for the mail server. 

Sunday, March 11, 2018

lines seen on camera capture with new SDK

With QHYCCD's new SDK, lines were seen on captures. But on further study, found that the lines were seen when phone LED or LCD screen of computer is used as illumination, not otherwise.

So this is probably due to the effect of the rolling shutter + the repetition rate of the illumination.

We checked with sunlight - no lines - and with SLED illumination - no lines. So we are probably all good.

Tuesday, March 06, 2018

Windows executable slower

Found that an opencv cross-platform executable was running slower on Windows - compiling in Release mode instead of Debug mode did not improve this. Most probably due to the DFT algorithm, which might not be optimized on Windows. There were multiple DFTs called within the image refresh loop. The linux binary ran at 100 fps for 16 bit 320x240 images and 200 fps for 8 bit 320x240, but the windows exe was limited to 64 fps for both 16 bit as well as 8 bit. Linux was running on an i7 Macbook running Mint 18.1, Windows 8.1 was running on an i5 I believe.

Edit - my analysis above seems to be wrong - the code only had the Hilbert transform (and hence the DFT) on press of s key - and the fps was low even when no keys were being pressed. Some other bottleneck. Display driver?  

QHY SDK - Windows and Linux

Found the answer to my query to the QHYCCD helpdesk in November - the difference between the behaviour of Windows software which uses the Windows QHY SDK, and software built using the Linux SDK (and between different versions of the SDK!) are due to different implementations of the SDK.

My query was:

....my question is about frame to frame variations.

For example, I closed the lens cap and took two snapshots. Gain=5, Exposure time = 20 ms. I find that the pixel values are like:

Frame1: 3168   3216   3184   3184 etc
Frame2: 3232   3152   3248   3184  etc

So when i subtract Frame 2 - Frame 1, I get
64  -64  64 0 etc. with a max value of 256.

And this difference increases when there is light falling on the camera.

Is there any way to reduce this frame to frame difference? Any way to reach the 6e performance?

Also, when reducing gain, I find that the image gets saturated at a value below the full 16-bit max value of 65535. For example, with a gain of 5, the saturation happens at an intensity of 27776.

The reply was that the 6e error is the readout noise. The rest of the noise is probably shot noise

 The gain values are the numbers entered in Sharpcap (latest version). I have checked with two different QHY5Lii-M cameras. On both, if gain is reduced below 30, saturation occurs below 65535 (in 16bit mode - in 8bit mode, below 255).

For example, as mentioned before, with a gain of 5, whether the exposure is 5 millisec or 5 sec, the max value is only 27776.

But when I code my own capture, using the SDK at
https://github.com/qhyccd-lzr/QHYCCD_Linux
there is a difference - if I change the parameter CONTOL_GAIN
with SetQHYCCDParam(camhandle, CONTROL_GAIN, camgain);
even for value of camgain=1, I am able to see saturation at 255 for 8 bit mode. So, I could use this for my work. Maybe Sharpcap uses a different set of numbers? or a different parameter? as gain. 


The QHY team did not reply, but I found that the Windows and Linux SDKs have a different range for the Gain parameter, and probably for other parameters as well!  The Linux SDK (Software Development Kit) and the Windows SDK are developed by different teams. So, the same functions have different implementations! For example, gain goes from 1-100 in the Linux SDK we tested. But gain goes 1-480 in the latest Windows SDK.

Sunday, March 04, 2018

cross platform issues

In order to get the OpenCV code using the QHY camera SDK - originally written on Linux - running on Windows by compiling it with Visual Studio, the following items had to be done.

  1. Install the latest Visual Studio Community edition (v. 15, Visual Studio 2017). OpenCV's latest binaries only work with v14 and v15, and if we use some other version of VS, we would have to recompile opencv, which would be a pain.
  2. Install the latest QHY SDK from http://www.qhyccd.com/SWHIST_SDK.html - the latest version of the SDK has the lib files, h files and so on in addition to the dll binaries. Currently the latest version is at the bottom of the page!
  3. Install the latest version of OpenCV for Windows from sourceforge, following the instructions at https://docs.opencv.org/2.4/doc/tutorials/introduction/windows_install/windows_install.html
  4. The instructions on how to build an opencv application, https://docs.opencv.org/2.4/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
    is reasonably similar to what we need to do, except for the fact that it would be better if we create a new property sheet called common and save it for future use as mentioned in the next point below - VS15 does not recommend .user property sheets.
  5. In a newly created property sheet (called common, for reuse), add the additional include directories, linker files etc as mentioned in the documentation on point 4 above. Here, we need to add the QHY SDK includes and dlls also. The opencv libraries are now distributed as a single file, opencv_world.lib and not the multiple lib files as in the documentation above. So, in short,
    VC++ directories -> Include
    Linker General -> Additional Library directories
    Linker Input -> names of the lib files in Additional Dependencies 
  6. The .cpp files need to have ifdefs for linux and windows standard headers separately. Code can be seen at https://github.com/hn-88/ASKlive/blob/master/ASKlive.cpp
  7. For the C function sprintf to work, the following pre-processor directive has to be added - C++ -> Preprocessor - > Preprocessor definitions -> add _CRT_SECURE_NO_WARNINGS
  8. In order to copy over the required DLLs, the following post build event has to be added -
    xcopy /y /d "D:\qhy\*.dll" "$(OutDir)"
    xcopy /y /d "$(OPENCV_DIR)\bin\*.dll" "$(OutDir)"

    It is safer to copy to the executable's directory, since there is quite a bit of confusion about copying to system folders - http://www.forceflow.be/2012/04/04/the-3264-bit-dll-confusion-on-windows-64-bit/
  9. Arrays have to be pre-assigned sizes - can't be assigned sizes at runtime as with GNU C compiler. 
Edit 3 June 2018 - 10. Added this line of code to prevent the "exe has stopped working" Windows dialog box on exit - 
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
via stackoverflow, with additional documentation at msdn

Raspberry PI configuration link dump

  1. Impressive - The Raspberry Pi 3 boots up in 25 seconds to Desktop. 10 seconds to open Chromium browser. 25 seconds to load a google spreadsheet. Overall, faster than my AMD64 Windows XP laptop from 2009. :)

  2. Older version of RPi (Pi2?) - good for playing local videos - was pleasantly surprised to find that I could just put in the same micro-SD card which was running Raspbian 9 into a SD-card adapter and put it into the older Pi, and it booted and ran fine - did not need any reinstall.

    It is good for playing local videos. It could play 2 windows with 2 instances of VLC running local copies of 360p videos without any problems - 35% CPU for each instance, MP4 and DIVX respectively. But it could not play videos reliably over the network. Also, web browser Chromium takes a very very long time to open, web pages crawl to load. Probably because of the low RAM.

    But I can use it as a video player, with a status message at the bottom or something like that.

  3. lspci -vvnn | grep 802

    lsusb does not show it when driver is not installed.

  4. Cloning RPi with dd - https://www.raspberrypi.org/forums/viewtopic.php?t=46911
    sudo fdisk -l
    sudo dd bs=4M if=/dev/sdc | gzip > /home/your_username/image`date +%d%m%y`.gz
    sudo gzip -dc /home/your_username/image.gz | dd bs=4M of=/dev/sdc


  5. Enabling monitoring on RPi wifi - https://raspberrypi.stackexchange.com/questions/36747/enable-monitoring-mode-for-rtl8188cus-via-usb-on-raspbian

  6. How to loop in VLC - https://forum.videolan.org/viewtopic.php?t=78723 - and subtitles in vlc playlist maker.

  7. Adjusting Overscan on the RPi - https://retropie.org.uk/forum/topic/2371/using-composite-video-can-t-see-everything-on-the-screen/16

  8. Raspberry PI model comparison - http://socialcompare.com/en/comparison/raspberrypi-models-comparison

  9. Shortcut to edit text file -  Exec=leafpad %U /home/pi/file.txt

Saturday, March 03, 2018

securing lighttpd

Brief notes on securing lighttpd, the light-weight web-server - 

https://www.packtpub.com/mapt/book/networking_and_servers/9781847192103/7

# deny access to all files below a certain path
$HTTP["url"] =~ "/certain-path/" { url.access-deny = ("") }
# deny access on all jpeg images to the Google bot
$HTTP["useragent"] =~ "Google" { url.access-deny = (".jpg") }
# deny access by referrer
$HTTP["referrer"] !~ "^($|www.ourhost.com)" {
url.access-deny = ("")
}

under mod_access

and also passwd auth.

Friday, March 02, 2018

QHY camera glitch

After removing the new SDK files from Linux Macbook in order to test the camera again with the old SDK, the QHY5L-ii camera was not being recognized on the Linux machine at all. Both cameras, on both USB ports, LED does not light up, no dmesg messages either.

Tried on another Linux machine - Acer running Ubuntu 16 - without any drivers installed - again, no dmesg messages.

Tried changing the USB cable - then a dmesg message was seen, detecting on a 'slow port'. Tried on the Macbook again after reinstalling the new SDK, now it was showing dmesg messages as well as LED lighting up - detected OK. Changed back to the original USB cable - everything still OK.

So, probably a combination of hardware and firmware issues. 

Wednesday, February 28, 2018

excess CPU usage from Windows Update Agent

Noticed that an SVCHost process was taking up 50% CPU on my 2-core Windows XP machine. This behaviour started around a week back. Killed the process, ran Trend Micro's House call online anti-virus, did not detect anything. If I directly kill the SVCHost process itself, sometimes it disables audio - that thread is also on that process. Googling for solutions, got one way to do it using process explorer. 




Right-clicking the process and going to properties, in the threads tab, we see that Windows Update Agent is the culprit - killing or suspending it stops the high CPU usage.

There are some posts about solutions, like

but apparently this particular problem was fixed already,


"The problem that the "Symptoms" section describes was corrected in Windows Update Agent 3.0 and in update 927891. These updates were distributed through Microsoft Update in June and July, 2007. If you are still experiencing a problem that resembles the one that this article describes, it may be a different problem. To troubleshoot similar problems, please see the "Similar problems and resolutions" section later in this article."

So, currently I will just live with suspending the thread. 

Tuesday, February 27, 2018

Saturday, February 24, 2018

removing a recent audio file

Got a request to remove a recently played program from our downloadable content. So, deleted from local server ~/audio folder, also deleted from dl.radiosai.org so that old saved download links will not work, and have edited the remote database so that it shows - as description and does not show a download option. That seemed to be the easy way to delete the entry which is linked to a recently played file, without having to go into all the other linked tables. Similarly have edited local database, and have put "cannot play" flag on. 

Thursday, February 22, 2018

MAT types in OpenCV

From http://ninghang.blogspot.in/2012/11/list-of-mat-type-in-opencv.html

A Mapping of Type to Numbers in OpenCV

C1C2C3C4
CV_8U081624
CV_8S191725
CV_16U2101826
CV_16S3111927
CV_32S4122028
CV_32F5132129
CV_64F6142230

Wednesday, February 21, 2018

pause and exist

Matlab, Octave etc have these commands, which could be useful to do some action if a file exists - pause and exist. For example, to open a file in real time, use
exist
to check for file, and
pause
to wait for desired time.

Friday, February 09, 2018

using an old 1st generation iPad

Some tips on using an old 1st generation iPad.

How to install apps - from
https://apple.stackexchange.com/questions/135060/how-to-install-apps-which-require-a-newer-version-of-ios-on-a-1st-gen-ipad

1.    On your old iPhone/iPad, go to Settings -> Store -> set Apps to Off.

2.    Go onto your computer (it doesn't matter if it's a PC or a Mac) and open the iTunes app. Then go to the iTunes store and download all the apps you want to be on your iPad/iPhone.

3.     If the iTunes on the computer and your iPad are both signed into the same Apple ID, and the iPad is connected to the internet, then go on your iPad/iPhone to App Store -> Purchased -> tap on an individual app you want to install.

4.     You'll get a message that says "The current version requires iOS 6.1 or later, but you can download the last compatible version," just hit Download.

This method should at least allow you to have most apps on your outdated device. Most of them will work, but sometimes even once you have the app installed on your it still won't run correctly. That's just tough luck. But in my experience that's not too common; apps usually work just fine.

How to get ebooks on the ipad:

1. Using Amazon Kindle Store and Kindle App
2. Using direct links to pdfs, or email attachments - when opened in safari, they show a "Open in" button on the top. You can open pdf and epub in Freading, mobi in Kindle.
3. Using gutenberg.org
4. https://www.thebalance.com/places-to-get-free-kindle-books-1357954
5. https://www.mobileread.com/forums/ebooks.php?forumid=128


Thursday, February 08, 2018

converting csv files in google drive to google sheets

This stackoverflow answer seems to be good. Either download and re-upload after enabling "convert uploads" in Drive settings, or use an Apps script. 

Wednesday, February 07, 2018

prevent emails from going to spam

Adapted from https://www.booklending.com/faq.htm

For Windows Live and MSN Hotmail users:

1. Go to the "Options" page.
2. Under the "Junk E-mail" section, click on "Safe and blocked senders".
3. Click on "Safe senders".
4. In the "Sender or domain to mark as safe:" field, type "@radiosai.org", and click on the "Add to list" button.

For Google Gmail users:

1. Click Contacts along the left side of any page.
2. Click the New Contact button in the top-left corner of the Contact Manager.
3. Type "noreply@radiosai.org" in the "Email" field.
4. Click "Save" to add your contact.


For Yahoo! mail users:

1. Click on "Contacts".
2. Click on "Add Contact".
3. Type "noreply@radiosai.org" in the "Email" field.
4. Scroll to the bottom of the page and click on "Save".


For AOL mail users:

1. Click on the drop down arrow to the right of 'Mail Options', then click on 'Address Book'.
2. Click on "Add Contact".
3. Type "noreply@radiosai.org" in the "Screen Name" block.
4. Click the "Save" button.


For Microsoft Outlook users:

1. Go to "Tools" and click on "Address Book".
2. Go to "File" and click on "New Entry".
3. Select "New Contact" and click on "OK".
4. Type "noreply@radiosai.org" in the "Email" field.
5. Click "Save and close".


For Verizon Users:
1. Go to your Verizon Inbox.
2. Click Options.
3. Select the Block Senders tab (near the top of the screen).
4. On the Block Senders screen, you'll see both a "Block Sender List" and a "Safe List". In the space where it says, "Enter e-mail address or sub domain to always accept even if the domain is blocked", enter noreply@radiosai.org 


For Comcast Users
1. Sign in to Comcast Webmail, and select ‘Preferences’ from the left menu
2. Select ‘Restrict Incoming Email’ from the ‘Preferences’ list
3. Select ‘Yes’ to Enable Email Controls
4. Select ‘Allow email from addresses listed below’
5. Enter "noreply@radiosai.org" and click “Add”
 

Tuesday, February 06, 2018

signing out of google account on Android

This link has the details for Android 5.0+  

On Android 5.0+, Settings -> Accounts -> Google -> Choose the account you wish to sign out of -> Menu with 3 dots on top right -> Remove account

On the LG Q6 running Android 8.1, there is a search field in settings where I can enter Accounts, and directly get listings of the Google accounts. Clicking on an account brings up a page with Remove account also listed.

creating a dashboard

One way of creating a dashboard for an organisation spread over different campuses, who have disparate IT setups - creating a google site with google docs or charts embedded from each campus - each campus can modify their charts separately, and the modified charts are reflected in the main site.

An example is at

Friday, January 19, 2018

2G reception issue for refurbished mobile

I bought a refurbished Xiaomi Redmi Mi 4i Duos phone on ebay. Unfortunately, when I tried it out, I found that I was not getting coverage indoors. Checking signal levels, found that 3G and 4G signal levels were OK, but the new phone was having a 20dB loss in signal for 2G signals. Ebay made the seller accept the item back, and refunded me (though I would have preferred a replacement.)




Edit - added the screenshot of an Mi3 at the same location, with better signal, below. -81 dBm as against -101 dBm for the refurbished phone above. 20 dB greater. 



Saturday, January 13, 2018

accessing archived emails from old CPanel server

A server with WHM and CPanel was being migrated, and I got the query  
Can you tell me how to copy the old emails from the old server before they shut it down?

Inside the cpbackups folder, there are the backups of each site. So, if you want the emails from sitename site for example, you can open the folder

/backup/cpbackup/weekly/sitename/homedir/mail

The archived emails will be in the archive subfolder. They are likely to be in the maildir format - 

Wikipedia has a list of e-mail readers that can directly read e-mail in that format - 
http://en.wikipedia.org/wiki/Maildir#Mail_readers

Friday, January 12, 2018

wavelab loudness normalization - recommended settings

I had earlier given the recommended settings for SoundForge. A request from A, if I could send him recommended settings for wavelab -



I would recommend the following (this is for radio broadcast):

1. Save each section which has a specific loudness as a separate file - for example announcements with music as a separate file, parts with only talking as a separate file, song as a separate file.

2. Normalize each file with the settings below, and then stitch them together to make the final file.

3. Settings - 

Loudness to achieve = -12 LUFS
Reference: Loudness of entire file
Remove DC offset (checked)
Max peak level = -0.1 dB
Softness 0
Other values no change from the screenshot. 

Saturday, December 23, 2017

Friday, December 22, 2017

some notes on rkhunter

A security tool to prevent rootkits, rkhunter - some notes, made for a server I help to administer -

1. I will now change the rkhunter configuration file so that the emails will come to me instead of coming to you. vim /etc/sysconfig/rkhunter

2. the hidden file warning message is about  /etc/.brand which just says hostgator - it is just a branding file from hostgator. Totally harmless.

3. I will prevent ssh login without keys. That is, password-based ssh login using terminal will be disabled. This is a good security feature, since the ssh is routinely hit with brute force attacks. 

4. It looks like rkhunter does not play nice with user-compiled or modified files. I will set up rkhunter to ignore all the currently available files, and only give warnings for new files. Basically by editing the whitelist, and running
sudo rkhunter --update
sudo rkhunter --propupd

https://www.linuxquestions.org/questions/linux-security-4/rkhunter-package-manager-fail-warnings-on-centos-5-running-whm-11-a-871791/

https://www.digitalocean.com/community/tutorials/how-to-use-rkhunter-to-guard-against-rootkits-on-an-ubuntu-vps

Sunday, December 17, 2017

AutoSSL feature of WHM

Found that WHM has an AutoSSL feature, which will automatically configure SSL for selected (or all) users. The AutoSSL feature can be used with LetsEncrypt.org also, by running the shell script  /scripts/install_lets_encrypt_autossl_provider
as root, as mentioned in the documentation.

So, no need of going through the painful process of WHM SSL certificate installation.

And if we want to redirect all users using http to https, we can use the htaccess file, as given here