24 May 2006

Xen ... success!

Well, Ive managed to install Xen successfully, and Im actually quite pleased with the results. The new kernel boots up without a problem, and using the xmguest-install.py script which I complained about earlier (unjustly so), I managed to install a FC5 guest nicely. I tried both the GUI-based anaconda and text-based versions and they both work wonderfully. I was pleasantly surprised to see the GUI anaconda via vnc. Cheap thrills.

The purpose was to set up a virtual machine (VM) for dspam.
  1. So that it didnt interfere with the current sendmail configuration. I have been testing dspam for quite some time now, and found it works well with postfix. Also postfix seems alot nicer to administer compared to sendmail.
  2. I didnt want to commission yet another server just to filter emails. The load on the email server is relatively low, so it should be able to handle this task easily too.
  3. to R&D Xen's abilities. Heard so much about it, but never had a real reason to try it out.
  4. A means to easily maintain a server which can be replicated / brought up or down on any available server
So with dspam set-up as a relay (setting up dspam of course is a story on its own), the 'appliance' consists of:
  1. postfix for the smtp transport
  2. the dspam daemon
  3. mysql server running in the VM
  4. apache for its webui for training
  5. webmin for easy admin
  6. no X to conserve memory
i can now 'copy' this machine to any production server (whenever I get 'round to doing it).
Also one of these days, put in ClamAV which I hear is easy to integrate with postfix.

So the R&D server had to be upgraded from 512MB to 1GB RAM because after all GUI and stuff running I only had 100MB left. And this wasn't enough for a guest install of 256MB minimum. With the new 1GB limit, I could run 2 VMs easily, 3 if Im lucky.

Good thing memory is cheap. Bad thing is the R&D server is using the old SDRAM which is getting abit of a rarity nowadays and commands a 50% premium over DDR sticks.

Xen rocks. Its wonderful. Try it. No more uptime 0.06 for my physical servers from now on. They'll now have to work for their keep. Opportunities are endless in terms of consolidating the servers as well as keeping the VM images for safekeeping.

Well, the next Windows Server will be a hypervisor with the ability to run Win2003 and even RedHat.
Microsoft chose WinHEC to talk up its virtualisation software because Longhorn will not be available until next year. At that time the company will be playing catch-up with VMware's ESX Server and XenSource's Linux-based Xen Hypervisor which are both available now.
This for me is good news. At least now we can really think about consolidation and guaranteed uptime for IT services and thats very important.

yk.

18 May 2006

Xen

Ive been testing out Xen. Or rather Im TRYING to test out Xen on a R&D server.
Since I have a preference for the Fedora Core project, I assumed that using the FC5 distro would be a great way to test out the new stuff. So I installed it on the server without much problem. I then updated everything using yum and installed the latest xen kernels.

Changed the grub entry to bootup xen, and rebooted.

Everything was fine, and seemed ok until I ran "xm list" which should show the status of the xen server.
But all I got was a silly error message stating:
Error connecting to xend: No such file or directory. Is xend running?


Checked the logs, checked the setup files, checked everything, with no success in getting xen up and running.

Then I found this via google (after about 50 searches):

http://lists.xensource.com/archives/html/xen-users/2006-05/msg00209.html

this is a well know bug, see

https://bugzill.redhat.com/bugzilla/show_bug.cgi?id=191037

Matthias


Great. So the bug entry states that "kernel 2.6.16-1.2111_FC5xen0 breaks xend"
Either download a new 2111 from davej
... using a newer kernel from davej helped. For details, add http://people.redhat.com/davej/kernels/Fedora/FC5/kernels.repo to /etc/yum.repos.d/ and update.

or downgrading to xen-2096. I did the latter using rpmseek.com.

[Of course when you rpm it to install, it will complain that there is a newer version installed blah blah blah, so I had to --force it.)

Updated the grub file and rebooted, and voila, xm list works.

Then I found that the xenguest-install.py script wouldnt install CentOS4.3 even though I provided NFS, and FTP to the base tree. It just gave an infuriating error of: Invalid NFS location give.

Again after the 51st google search, I found out that the darn script was only for FC5 guest installs! Why didnt they say so in the first place?

So I was not impressed, and it looks like id have to create the guest by hand.
To the fedora team:
1) fix the builds of xen so it doesnt break
2) Make it clear that the script is only for FC

[Because Im lazy, Im downloading the CentOS4.3 image from jailtime.org. Its just a 94MB download, but its so slow! another 3 hours to go....]

yk.

15 May 2006

Innovation and Open Collaboration In ICT - The Way Forward for Malaysia

On the 11th of May, I attended a presentation organised by the Malaysian Ministry of Science, Technology and Innovation (MOSTI) and IBM, entitled "Innovation and Open Collaboration In ICT - The Way Forward For Malaysia"


The talk was given by a Ms Roslyn Docktor, with a long designation of 'Worldwide Governmental Programs Executive for Open Standards' for IBM. It was held in Cyberview Lodge, which meant me driving a long long way down.

It started late, and when it did, the preamble was given by a MOSTI rep, En. Alihan. From the website he is the Deputy Secretary General for Policies. He spoke about MOSTI's role in "entrusted to lead in natioanl innovation", and he touched on current events like the Austin Texas 'coup' of having a security centre here in Malaysia. Unfortunately for us, his speech was weak and basically did not contain any information of any use. For example, regarding the Texas deal:
.... to form 'smart partnerships' in the basis of win-win principle (sic) ....

He did not garner any confidence from the audience.

Roslyn spoke well, very casual, very informative, obviously she has done this many times to newbie government bodies. Throughout the talk she highlighted (mid 1990s) IBM's realisation of Openness as the way future, where innovation is the challenging of the status quo and the use of the Open Source Community to spawn invention quickly, efficiently and effectively.

Her views on Open Standards were more profound than others; to encourage collaboration and innovation, and in times of emergencies (Avian flu, HIV/AIDS, natural disasters) it ensures that documents and data can be used immediately, with no agreements required (EULAs and $$$), no conversions, and no worries of problems in sending data to someone you never sent data to before.

Open Standards also allows markets to focus on Value Added Differentiation. Meaning that from now on, we dont have to re-invent the wheel whenever we need to create a application to export text or data. The focus is on the innovations and to add value instead of recreating the framework to base the work on.

OStds also allow Global Governence in Choice and Control. Not just saving money, but it also means that their citizens can access information via web, calls, emails, handphones without having to buy computers nor unnecessary licenses for software. Because information is now easily shareable without licensing issues, OStds eventually breaks down silos of information and this is critical in issues like tax and healthcare.

She then talked about how to measure Open vs Closed standards. You have on one end of the spectrum where no one company has veto rights over standards, and all features are based on merits, and specs fully documented for anyone to implement without royalties. The other end is closed where only 1 body controls it and the information is proprietary. Of course its not black and white, there are many in-betweens, like 'Reasonable and Non Discrimatory' (RAND) licenses which allows use for a small fee.

She then goes and talks about the Open Document Format (ODF) which is an option for governments to take up. It satisfies the Openness. It is based on other ISO standards which are just as free.

Unicode (The Characters)
XML (The Syntax)
ODF (The Document)

She highlighted many real world examples which will be beneficial to goverments. Citizens are not forced to purchase licenses, nor a particular type of PC. Historical documents are guaranteed to be readable centuries from today, in times of emergencies, people can share information... etc.

The standardisation of ODF was a first for ISO, in that all 23 nations which voted (including Malaysia) voted for it, which was very encouraging. She talked about the ODFAlliance, and how in just a few months the number of members have increased to 136 or so. She also said that these members are not necessary using ODF today, but they are looking into it and working it into their policies and eventually, given time they will be adopting ODF as a standard.

With that she ended her little talk. I found it very refreshing to hear this information from IBM, and was quite encouraged with their support. She also mentioned about IBMs decision to open up 500 of their patents to the OSS commons. The reason IBM did so was because they realised that they didnt want to extract profit from areas like Government, Education and Healthcare and their interoperabilities. Thus their altruistic motives.

Next up was Q&A, and the first one up was none other than Dzaharudin Mansor who introduced himself as representing PIKOM and Microsoft. He was obviously prepared for this talk: he had 6 questions for the speaker. Which actually just sounded like 6 points he wanted to make: (I paraphrase)

1) "Collaboration is Good. However it is hard to collaborate without a good Framework. ODF does not provide a framework to interoperate..."

I think this is the same meme as the one picked by up by Andrew Updegrove here: On the Art (?) of Disinformation: telling the Big Lie. In this article Andrew finds it strange that a lie (ODF does not interoperate but OpenXML does) is propagated by the big names. We see its repeated here in Asia too!

2) "Standards is good to be defined. 'Reasonable charges' should be allowed too. We need to give back something to IP owners. Standard bodies (like ISO) should be free to adopt competing standards. Business should define the standards" He goes on to higlight the 802.11 (117 patents), PDF, Java ,etc...

This was an amazing comment by him. Here Roslyn proposes a FREE (in all sense of the word) standard, which does not have any charges. And now he suggests to prefer a standard which MAY cost money, or be restrictive to certain licenses? Why should we need to give back to IP owners if the IP owners themselve doesnt want anything?

3) "There are lock-ins even with Open Standards. Proprietary solutions on open standards e.g. in Telecommunications, GSM Base Station: GSM is Open, but the controller is proprietary and to make full use of it, customers prefer the proprietary solutions."

Here he tries to say that Open Standards are no big deal, people will get trapped and locked in anyway for convenience. The examples he talked about re-inforces how bad proprietary-ness can be for customers. The difference between a GSM solution and a ODF one is that the ODF document creating applications (OOo, Abiword, or IBM Workplace) already exist which rival any other proprietary applications. i.e. The customer can now chose Open solutions to read/write the Open standard documents.

4) "Open Standards breeds innovation? The Standard for Smart Cards x years ago was primitive, did not contain info like biometrics and bank details. To propose modifications and specifications to the standards would cost a development company money and time, also the opportunity costs will not make sense, therefore they would roll out the solution as a closed/proprietary card"

This again was very difficult to understand. But he is arguing a case where a small developer would not have the resources to push for a standard. This is where the difference is. It is not up to the developer to define the standards. The CUSTOMER defines it. So if a goverment had a need for a Smart Card solution, they would define the standard for the solution provider to implement. In the case of the ODF, the standard is already defined, we as customers can benefit from the hard work of Sun and the ODF guys. So the argument basically falls apart when you look at it from the customers' angle.

5) "We should NOT have a Preference for Open Standards. Danger to Manipulation! We should be given a CHOICE. We need to be pragmatic as we live in the REAL WORLD. We roll out products which has market ADVANTAGE"

Here again is the same arguments we heard when MAMPU suggested for the preference for OSS solutions in government procurements. The given the Choice suggestion is the most ironic. A standard is a method of making sure that people speak the same language. If everyone was given a choice to choose whatever language they wanted, won't that make it that much harder to communicate? The pragmatism argument is what I like to call the 'lazy way out': don't do nothing, status quo, lets just dig in deeper: changing now doesnt make business sense in the short term!

6) "There is Good News!" (He really said that!) "OpenXML will be standardised soon and it offers all features as a Open Standard, no royalties! It is also compatible with the billions of documents in the world!"

Im not sure how OpenXML can be compatible with other docs, because the application (MSOffice) is the app which should be compatible. Not the New file format. So its just a clever spin to the tale. Ah yes, 'SOON' in Microsoft terms means 'sometime next year... maybe.' Good News indeed!

After the preaching from the MS rep, En. Alihan tried to answer some questions, but all that came out was some mumbo jumbo which I could not understand. Ms Roslyn didnt know where to start, because it is hard to politely respond to these ludricous statements ...

Then En Zamani Zakariah from the Malaysian Communications and Multimedia Commission (MCMC) stood up to speak. He asked Of the countries who have not joined the ODF Alliance, what were their concerns, and what are the checklist for a good standard?
He also added that after his 30+ years in the industry, there will never be ONE standard, and correctly so as others should not be stifled, however there should always be a MINIMUM of standards.

Ms Roslyn answered this one well, she said that the countries who haven't adopted ODF were waiting for the process of standardisation to complete, and now that it has, she expects many of them to follow suite. For example France (Tax), Singapore (Defence), USA (Mass.) etc... The checklist was to have a good supplier of applications, i.e. so that the departments can procure the products. People can start testing them by downloading OOo and start using them. She doesnt expect roll-outs immediately but a gradual process.

En. Mansor from Sun Microsystems added that Java is not 100% closed, and its up to JSchwartz to open it up. It took them 2 years to get Solaris open up. He believes that Computing is a utility model, etc... At least with ODF, it has forced Microsoft to open up their schema, and thats a pretty good advancement for us.

En. Alihan then closed the Q&A and added that Goverment procurement is under the Ministry of Finance. So it is up to MOSTI to communicate awareness programmes in the "ecosystem for knowledge based economy" WHATEVER THAT MEANS?!!?

So that was the meeting.

The reaction from the audience was not very encouraging: Very quiet. It was a pity that most of the people who asked questions kept harping on "Pragmatism" and "Dont adopt 1 Standard". It would have been fantastic if the same level of enthusiasm was demonstrated at the SIRIM meeting, but I guess us Malaysians are too shy...

yk.

USB wifi Dongle

Need to get one for a PC for home...
Requirements:
1) Stable (signal doesnt drop after 80ft)
2) Compact (not too bulky)
3) Affordable (value!)
4) Supports Linux (no ndiswrapper stuff)
5) Supports Windows (without the unnecessary 'wireless management software')

Here is a resource:
Linux wireless LAN support

Wireless Adapter Chipset Directory compiled by HJ Heins
Last updated on 14 May 2006


Any good recommendations?

yk.

21 April 2006

Standardisation of the Open Document Format 1.0 in Malaysia

I had a fantastic opportunity to attend the Standardisation process of the Open Document Format 1.0 in SIRIM's Technical Committee on E-Commerce today. This was the first time I was attending this committee, and I was thrilled of the outcome.

Basically it was just a formal process of going through the ODF spec and supporting it by the members of this Committee.

The formal process:
The standardization consortuim OASIS developed a specification, Open Document Format 1.0, and decided the specification's value would be improved if the specification were to become an international standard.

OASIS decided to employ a process in another organization, JTC 1, known as the Publicly Available Specification (PAS) process. OASIS has PAS Submitter status, which enabled them to submit specifications (such as ODF v1.0, and ebXML) to JTC 1 for approval as international standards.

In October 2005, OASIS submitted ODF 1.0. The six-month ballot period began November 1 2005 and ends May 1 2006.


It was explained that Malaysia was a Participative Member and is obliged to vote.

IBM played an important role in this, the rep from IBM, Hasannudin Saidin (Manager, Government Programs) outlined the importance and advantages of this format. The talk was very high level, i.e. the specs were not scrutinized, but the response from the committee members were very encouraging.

Simon Seow from the Malaysian National Computer Confederation (MNCC) supported it, saying that it would encourage local software development based on a common platform. The barriers of entry would be lower as people can now develop apps to generate documents which can be shared and re-used.

En Sidek Jamil from the Arkib Negara Malaysia (Malaysian Archives) was very supportive of this format as he is very interested in adopting a format which was open and would last a long time. I found it uplifting that the custodian of our heritage and 'intellectual property' supports this format too.

There were futher concurrs via email, from Telekom Malaysia, Institute of Engineers, Malaysia (IEM), Universiti Teknologi Malaysia (UTM) and The Association of Computers and Multimedia of Malaysia (PIKOM).

I added as a rep from FMM, that our members would be considered Users, and wholly support this format as it we are all for any reduction in costs, and increase in efficiency to be more competitive. But I also asked,
"With such strong support from our committee members who are represented from the entire IT industry, from Software Developers to Government Departments like the Archives and Customs, to Users like us, will there be a push or initiatives by the Government to educate the masses about the support of this standard so that it is known and recognised as a Malaysian Standard?"


I then cited the example of the Commonwealth of Massachusettes' directive and transition period from 2005 - 2007 before the cut-over to the ODF format.

The Chairman reiterated that this session was not for the rollout for ODF, but it was just a stamp of approval and support for the standard. However he directed the question to the representative from The Malaysian Administration and Modernisation Unit (MAMPU) as they are closest to the Government to drive such an initiative.

She however was very poor in her response. She just mumbled about something like MAMPU supports Open Standards and any standards are good for the government ... etc.

It was very dissapointing that unlike the rest of the committee members who 'get' the idea of how significant the ODF can benefit Malaysia, while she, arguably the most 'important' member, does not. :sigh:

Why do they always send such substandard representatives to important events? How will we ever get Governments' support if its these people we rely on to convince the Government to take up these as standards? I sure hope that there are more competent people in MAMPU driving this through or we mampus.

Also the representative from MDC (now MDeC) did not turn up, so there was no input from them.

Microsoft was also not represented, although there was an email comment from Dr Dzaharudin Mansor, stating:

"Consistent with our stand, Microsoft has no objections to the submission of the ODF standards despite being one that is not widely used and relatively new in the industry today."


Hmm... I wonder how widely used and new is the Microsoft OpenXML format?

More importantly, he adds:

"ISO has recognized the merits of competition and choise and has allowed for competing standards on the same subject ... Hence we would like to request assurance that this effort should not lead to the precluding [of] other competing document standards in the future. This includes the OpenXML standard that is being produced by ECMA and which will subsequently be submitted to ISO for acceptance"


So he wanted us to guarantee that we would also vote for OpenXML if he consented with this one. Unfortunately I dont think he has any leverage here...

So overall there was no objections to the submission of this as a standard, and it was interesting that it could be pushed as a Malaysian Standard (MS). The committee was also interested in joining the rapidly growing Open Document Format Alliance.

The meeting ended early, and the feeling and outcome certainly made my trip all the way to Shah Alam worthwhile.


yk.

20 April 2006

Ops Tulen 2006 - Marketing Overdrive

Oh wow.

What a response.

After the post, I received many emails from people who echoed my views (privately of course).
Here is a collection of threats which have since come my way, and I'd expect the volume to pick up as they are seriously going into overdrive now that 30th of April is only 11 days away!

The first is from Microsoft themselves (again)



Here, it says that the Government has added 700 more Enforcement Officers to drive the lynch mob. Thats quite amazing.

Lets say the squaddies get paid 1K per month, and this enforcement period runs 1-3 months: OK: 2 months. Thats an expenditure of at least 1.4m!

Imagine putting all that resources to informative roadshows to push Free Software. How much as a country will we actually save? I sincerely hope that its not my Tax Dollars which is going into this drive.

Next up, I received a promo pack from a very enthusiastic Reseller:



Same old stuff: Deadline by 30th April 2006, for the next year's 'protection'.

But interestingly, they have this new icons: Audit, Legalise and Crackdown. Must be a great marketing genius to come up with this. Like the same guys who live in Utah USA.

btw... how I wish I was just as hensem as the 'Head of IT' for the 'Local Conglomerate'. Any details on him?

Last and definitely the least:



A poorly poorly designed web-mailer from YAR (Yet Another Reseller). Notice how they cant even get those simple 3 icons right: Crackdown is symbolised by an inverted questionmark? Im confused.

Software piracy is not only a crime, but it can destroy computers And data, please protect yourself & your business to avoid penalty


Man there are so many things wrong with this sentence its not funny.

1) How does piracy destroy hardware? I guess when one of the 700 the enforcement agents come in to remove your hardware and manhandle them, its possible that hardware and software will get damaged.
2) "And data, please protect yourself..." You hear that Data? If you want to keep being a sentient LifeForm, you'd betta be careful!
3) You'd better pay up or you or your business or someone you love will die. Sounds as threatening as our friendly neighbourhood taiko. Whats with that explosion at the bottom? Is thats what will become of me?

Anyway, if any of you guys have more of this new form of government sponsored marketing materials, please send them over. Its fascinating.

yk.

18 April 2006

2006 Ops Tulen



I got this threatening email a few days ago. It reports that the Malaysian Government has just Launched the 2006 Ops Tulen Korporat. It then proceeds to headline that SME's are getting Raided and a General Manager was Arrested. However nothing in the email contained more information of the headline. No details of the arrest, which companies are affected nor the nature of Ops Tulen.

Instead the email continues on offers by Microsoft and its resellers on programmes to sell more software by Licensing Education and more workshops. I guess I wouldn't be upset if it was a plain ol' marketing email to me, but whats scary is that they are using the Governments efforts to reduce piracy and subverting it as a marketing programme for a means to blatantly sell more licenses.

Wouldn't it be more effective if Ops Tulen instead of just the strong arm for the BSA, with all these arrests, changed tacked by INFORMING the citizens of Malaysia about readily available quality Free and Open Source software?

I found this posting by Khairil about Ops Tulen 2004-2005, and I think its a Great Idea.

I really need also quotes and examples of FOSS/FLOSS use by Malaysian businesses.

eg.

Chris DeMarco from MyDirectory states that, "Like others concerned about recent actions by the BSA and the police, our company has moved most our software to using free and open source software". He further states that almost all their staff are now using Fedora on the desktop and using the OpenOffice productivity suite. "We have not only saved on costs, but are also now able to make better use of more software without licensing restrictions of proprietary software" ...


Of course these quotes need to somehow fall into the ministry's press releases, or quoted by proper journalists.

Here's a 2003 Ops Tulen Circular:

The Ministry of Domestic Trade and Consumer Affairs, in its Ops Tulen enforcement campaign, has noticed a significant percentage of software infringement in the corporate end-user sector occurring as a result of software retail piracy. As such, the Ministry is viewing the issue of software retail piracy very seriously.


In it, it tells us the evils of piracy, and what happens to the pirates. Nowhere does it mention the ability for people to find cost effective alternatives in the means of FOSS, to stay legit. The ministry should point to websites such as Open Source Windows.

That way,
1) Piracy in Malaysia will decrease
2) People are educated in their Copy Rights.
3) Trade deficit in software for Msia is reduced
4) Malaysians can find software affordable and legal
5) Malaysian tax dollars would be better spent on education and self development instead on henchmen for foreign companies.

Overall, Ops Tulen can be a great thing. If only it wasnt driven by wrong intentions ...

yk.

10 April 2006

UTF8 CSV files.

We're getting lists to be imported into MySQL in Excel (.xls) formats.
When we use MS Office to export it into CSV,
reading the data gives us gibberish, because
the default encoding is plain old ASCII.

There is not obvious setting available to change the ASCII to UTF8
for the csv file in Microsoft Office.

So I tried Open Office to see if it offers anything better.
In Save As, Change the Type to CSV, then the 'Edit Filter Settings'
checkbox will be enabled. Check this, and when you click save,
a dialog will appear requesting which Character Set to use.

And sure enough, it works like a charm.
The CSV loads up and saves into MySQL OK.

Hooray Open Office. Works better for multilingual requirements.

BTW, if anyone has the solution to export as UTF8 CSV from
MSOffice, please post it here.

yk

30 March 2006

bashrc : aliases I use.

Heres the file I always put in the
/etc/profile.d/ directory on systems I use.

===== yky.sh
# aliases i like to use
# 031110 yky Created from bashrc

alias h='history'
alias j='jobs -l'
alias l='ls -Fax'
alias ll='ls -laF'
alias d='ll'
alias c='cd ..'
alias md='mkdir'
alias rd='rmdir'
alias mr='more'
alias f='finger'


====

dont forget to chmod 755 it.

yk.

29 March 2006

MySQL: CHARSET from latin1 to utf8

A website im supporting needs to have multilingual characters. The default character set for MySQL is latin1. This unfortunately will not support Chinese nor other wierd multibyte characters.

It will quietly support them, but returns gibberish and will cause frustration all round.

After digging around, the best character set to use is UTF8.
To set the default charset for the server, the my.cfg/my.ini file has to be modified:

default-character-set=utf8


Unfortunately, once a database and their tables have been defined as latin1, they remain as latin1 unless you run this for each database:

alter database mydatabase charset=utf8;


and for each table:
alter table mytable charset=utf8;


and for each varchar/char type column:
alter table mytable alter column mycol charset=utf8;


and repeat ad infinitum....

This is rather tedious and boring, so there should be a better way. And that is to dump out the sql, change the charset and dump it back in. Here is the script.


===== latin1ToUTF8.sh

echo Script to convert MySQL latin1 charsets to utf8.
echo Usage: $0 dbname
echo 060329 yky Created.

echo Dumping out $1 database
mysqldump --add-drop-table $1 > db.sql

mydate=`date +%y%m%d`
echo Making a backup
mkdir bak &> /dev/null
cp db.sql bak/$1.$mydate.sql

echo String replacing latin1 with utf8
cat db.sql | replace CHARSET=latin1 CHARSET=utf8 > db2.sql

echo Pumping back $1 into database
mysql $1 < db2.sql

echo Changing db charset to utf8
mysql $1 -e "alter database $1 charset=utf8;"

echo $1 Done!


======

There must be a better way ?!

yk.

23 March 2006

Timestamp your Photos - Filename Dater

Ive been printing digital pictures for quite a while now, and have always wondered why they never made use of the important information available in the EXIF sections of the pictures.

Wouldnt it be great if they printed that information at the back of your photo, so that you know the date and time and all the intricate details of how that picture was taken?

Currently now, they just print the first 8-12 characters of the filename, plus a whole load of unreadable junk at the back. Since I dont like printing the date on the picture itself, I have always renamed my images with the first 6 characters as the date, so there is a means of finding out the dates taken.

e.g. 060101_NewYearParty1.jpg, etc...

Now this is tedious, especially when doing over 300 pictures to process (I usually wait 6 months before processing images, as I do alot of retouching and some fancy stuff)

So I wrote a little delphi program to do this for me.
It will scan through the files in a directory, and if applicable, prepend the date information on the filename. The Date is either extracted from the EXIF data, or if not available from the modified date. If there is a date already tagged to the image, it will skip yet another prepend.

The original files:


After processing:


Note that the digicam pic uses the 'Date Picture Taken' and the movie uses the Modified date.

The very simple UI:


And its rudimentary output:


It was written in Delphi, and Im in the process of getting the permission of the dEXIF author, Gerry McGuire (believe it or not), to release this as GPL if possible. (The website says its 'opensource', but Im not sure which license...)

In the meantime, here is the executable:

FilenameDater.exe : 570KB v1.0

Have fun.

yk.

22 March 2006

dspam: Sendmail + Quaranteen

I had this nagging problem with dspam + Web UI where I couldnt send the quaranteened emails to the recipient if dspam caught as a False Positive email.

maillog gives this error: ======

Feb 13 16:55:04 rslinux27 postfix/sendmail[14503]: fatal: usage:
sendmail [options]
Feb 13 16:55:05 rslinux27 dspam[14495]: Delivery agent returned exit
code 64: /usr/sbin/sendmail -d lo@user.com.my

The Web UI gives this error: =====

An Error Has Occured
The following error occured while trying to process your request:

sendmail: invalid option -- d
sendmail: fatal: usage: sendmail [options]
14269: [02/13/2006 16:46:08] Delivery agent returned exit code 64:
/usr/sbin/sendmail -d lo@user.com.my

This was described in my post to the newsgroup. Unfortunately for me no one answered this cry for help, until another user found the same problem. I emailed him, and he found a solution:

postfix sendmail implementation doesnt know the "-d" parameter. It is
defined in the configure.pl script of the cgi.

replace the -d with a -- and it should work :)


In detail:

In the directory where the cgi scripts for the WebUI for dspam are held:
e.g. /var/www/html/dspam/configure.pl

edit the line which has
$CONFIG{'DSPAM_ARGS'} = "--deliver=innocent --class=innocent " .
"--source=error --user %CURRENT_USER% -d %u";

to:

"--source=error --user %CURRENT_USER% -- %u";

The reason why its obscure is because there is no mention of 'sendmail' nor any indication that these params will flow to sendmail.

Anyway, now it works, so False Positive emails in Quaranteen can be released
and forwarded to individual users as per advertised.

yk.