Friday, July 10, 2009
using sed
The Cygwin install on the server running colinux doesn't have vi, so sed is useful on occasion. This useful page has the basics. String replace has the syntax
The article mentions that sed can change any printable character with another printable character, but use tr instead for unprintable characters. It also discusses append and insert.
's/{old value}/{new value}/'like$ echo The tiger cubs will meet | sed 's/tiger/wolf/'which of course you can pipe to a new file.
The wolf cubs will meet
The article mentions that sed can change any printable character with another printable character, but use tr instead for unprintable characters. It also discusses append and insert.
Tally caveats
For TALLY users - if your installation license misbehaves, this info might help.
The following is an extract from a long post by one of my colleagues. The full version has lots of humour, I have just extracted the "lessons".
At one of our units, the Tally installation had a few little problems since the day we installed.... It might be useful to someone who faces a similar issue or someone can tell us what we might have done better.
First, the lessons: (for those who want to move on) :
1. Keep your system date and time current before activating Tally.
2. Register at the Tally site.
3. After you activate, there is such a thing called 'Update', which you should do within 45 days. Can do offline, but nobody will tell you.
4. Don't expect good English from Tally Customer Service.
The following is an extract from a long post by one of my colleagues. The full version has lots of humour, I have just extracted the "lessons".
At one of our units, the Tally installation had a few little problems since the day we installed.... It might be useful to someone who faces a similar issue or someone can tell us what we might have done better.
First, the lessons: (for those who want to move on) :
1. Keep your system date and time current before activating Tally.
2. Register at the Tally site.
3. After you activate, there is such a thing called 'Update', which you should do within 45 days. Can do offline, but nobody will tell you.
4. Don't expect good English from Tally Customer Service.
Tuesday, June 02, 2009
phone as bluetooth modem
Finally a lucid article in smartphonemag.com which also points to an article in smartphonethoughts.com for PC configuration gave the crucial info - the number to be entered in the dial-up networking is *99# - once this is done, everything works. Apparently this is a code which tells the mobile phone to connect to GPRS connection which has already been set up. There are other similar codes found on googling - *99***1# for example, and another is *99*1#. Maybe this means the first GPRS setting in memory or something like that. Anyway, this provides a way to dial up with the USB connection also without using the USBModem_Dialer.exe - use the *99# as the number and the USB modem as the device. But here, two caveats:
- The Modem Link software has to be running on the mobile before the USB is connected.
- The APN has to be entered, since Modem Link doesn't seem to remember it.
Sunday, May 31, 2009
using the phone as a modem
Followed the excellent article at pdagold to connect to use the phone as a modem. Basically it requires that I start the Modem Link software on the phone, "Activate" on the phone, and use the provided dialler with the appropriate APN. Bluetooth modem is proving to be more difficult, will try it later.
Speed tests - 48 kbps using McAfee's speed test, and also by manually counting the number of bytes.


Speed tests - 48 kbps using McAfee's speed test, and also by manually counting the number of bytes.



As you can see, the testing involved around 2 MB of data transfer, lasting around a minute more for a total of around 7 minutes, and this cost approx Rs. 12.
Thursday, May 28, 2009
DNS requests not resolving
We faced a strange problem on fs3 of DNS requests not resolving - nslookup would complain that even the default dns server could not be contacted and would time out after 2 seconds.
nslookupGoogling gave many hits on configuring the dns service properly, and advice to run
DNS request timed out.
timeout was 2 seconds.
*** Can't find server name for address x.y.z.p: Timed out
Default Server: UnKnown
ipconfig /registerdnsAll these didn't work - finally the issue turned out to be a firewall problem after all: TCP/IP filtering was turned on, and ALL UDP packets were being blocked. TCP/IP Properties -> Advanced -> Options tab, TCP-IP filtering Properties, Changed radio-buttons to Permit All for UDP Ports and Protocols. That solved the problem.
SPF restored
No wonder the SPF was being shown as bad by the tools in my previous post - whoever shifted our domain to the new dns servers had also forgotten the spf records in addition to many cnames. Restored it today.
Wednesday, May 27, 2009
Signing emails with DKIM
Yahoo once again started rejecting mails from our mail server. I wanted to title this post "Yahoo mail admins need to grow up" but then thought better of it. After filling in their bulk sender form for the third time, decided to enter their Complaint Feedback Loop programme. Had to implement DKIM first, so headed over to howtoforge after googling. Test mechanisms were in the centos setup page and the DNS setup required a request to our ISP. Then signed up for the complaint feedback loop, and the next day got 3 'complaints' - these 3 guys marked our mail as spam to cause yahoo to block 3000 of our subscribers.
In case the howtoforge articles vanish, here's the gist:
Once the dns propagates, you can check by sending email to yahoo or gmail - gmail shows as "signed by radiosai.org" when you click show details. domainkeys.sourceforge.net lists some test tools - some of them are a bit flaky. I got dkim=pass from crynwr.com but sa-test@sendmail.net reported my SPF as bad - I thought it was working.
In case the howtoforge articles vanish, here's the gist:
sudo apt-get install dkim-filterHere, un-comment the following, with the appropriate domain name. The selector can be anything, only remember to set the same selector name in dns. Relevant dkim-filter.conf settings:
sudo mkdir /var/dkim-filter
cd /var/dkim-filter
sudo openssl genrsa -out private.key 1024
sudo openssl rsa -in private.key -out public.key -pubout -outform PEM
sudo vim /etc/dkim-filter.conf
# Log to syslogActually setting the X-header to yes is useful for initial debugging - then, checking the headers shows you right away if the milter is working. (Milter = Mail API Filter, from sendmail-speak). Then
Syslog yes
# Required to use local socket with MTAs that access the socket as a non-
# privileged user (e.g. Postfix)
#UMask 002
# Sign for example.com with key in /etc/mail/dkim.key using
# selector '2007' (e.g. 2007._domainkey.example.com)
Domain DOMAIN.TLD
KeyFile /var/dkim-filter/private.key
Selector mail
# Common settings. See dkim-filter.conf(5) for more information.
AutoRestart no
Background yes
Canonicalization simple
DNSTimeout 5
Mode sv
SignatureAlgorithm rsa-sha256
SubDomains no
UseSSPDeny no
X-Header no
sudo /etc/init.d/dkim-filter startto add the following lines to the end,
sudo vi /etc/postfix/main.cf
milter_default_action = acceptAnd then finally restart with
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
sudo /etc/init.d/postfix restartThe DNS record to be set is of the form
mail._domainkey.DOMAIN.TLD. IN TXT "k=rsa; t=y; p=MIGfKh1FC.....bfQIDAQAB"where mail is the selector, DOMAIN.TLD should be your domain name and the p=is the key from /var/dkim-filter/public.key
Once the dns propagates, you can check by sending email to yahoo or gmail - gmail shows as "signed by radiosai.org" when you click show details. domainkeys.sourceforge.net lists some test tools - some of them are a bit flaky. I got dkim=pass from crynwr.com but sa-test@sendmail.net reported my SPF as bad - I thought it was working.
Wednesday, May 13, 2009
add Google contacts to windows mobile without using Outlook
Googling got this link which pointed to this great solution.
1. Install PIM Backup
2. Change the extension of the Outlook formatted .csv file to .csc
3. Zip the file and change the extension of the .zip file to .pib, copy the pib file to the mobile.
4. Run the PIM backup app on the windows mobile, and choose the Restore option, browsing to the .pib file above. It gives the option to allow duplicates or update existing contacts and so on.

Here actually the third option is what I selected - add contacts and update old etc. BTW the screenshot was taken with MyMobileR using which you can control your mobile from your PC.
1. Install PIM Backup
2. Change the extension of the Outlook formatted .csv file to .csc
3. Zip the file and change the extension of the .zip file to .pib, copy the pib file to the mobile.
4. Run the PIM backup app on the windows mobile, and choose the Restore option, browsing to the .pib file above. It gives the option to allow duplicates or update existing contacts and so on.

Here actually the third option is what I selected - add contacts and update old etc. BTW the screenshot was taken with MyMobileR using which you can control your mobile from your PC.
Saturday, May 09, 2009
more with the QTEK mobile
Posting this with the QTEK mobile with wifi at home. Wifi at work working as of now only in "Open" mode and not WEP or WPA. But probably will have some workaround. Home wifi needed freebase to make the SSID broadcast - it couldn't connect with SSID hidden. Saw some google results about WM6 having that feature, but this one is WM5 and can't. Skype for WM was disappointing - 10 MB download, and the sound was stuttering on wifi. Fring looks much more promising, and feature packed too. Skyfire looks really good, and streams youtube videos without buffering over our 256 k connection.
