Search in a LDAP directory

This example connects to a LDAP server and makes a search for a name. The name was choosen by random (among those who returned an answer from the queried LDAP). The LDAP used in this example includes a binary certificate. To prevent this from trashing you terminal, it is not printed to the screen (binary field filtered in the attribute loop). #!/usr/bin/perl -w use strict; use Net::LDAP; my $ldap = Net::LDAP->new('directory.

Which IMAP-folders exist?

The following script will make a list of which folders exist in an IMAP account. The script requires you pass hostname, accountname and password on the commandline, but it should be quite easy to change as you like. #!/usr/bin/perl -w use strict; use Mail::IMAPClient::BodyStructure; use Mail::IMAPClient; my ($serv, $usr, $pwd) = (@ARGV); # server, username and password as comandline parameters... my $imap = Mail::IMAPClient->new(Server=>$serv,User=>$usr,Password=>$pwd); my @folders = $imap->folders; foreach my $f (@folders) { print "$f is a folder with ", $imap->message\_count($f), " messages.

No comments

The option to leave comments on this site has now been disabled. A new version of the website is coming and the pain comments – from time to time – causes with movable type (in terms of comment spam, server load and likewise issues) is really not worth the trouble. You will quite possible be able to leave a comment once the new version is launched, but until then sorry, no comments.

The legacy Pain

When your fresh young company, you can do everything right from the start – choose the right tools, use the best technology and make a lean mean profit machine. When your an elder company, you usually have a lot of legacy and history to carry on. While trying to move this website from Movable Type to a fresh Wordpress engine, I just realized, that a website almost 10 years old, also have a lot of legacy issues, which I need to handle :-)

Top 3 developer vanities (or oversights)

Sometimes web developers forget, that they are not typical net users and develop websites and applications for themselves rather than the intended mainstream users. Too often we let ourselves slip into a “geek to geek world”, and forget, that many of the sites we create are not for geeks, but for common users. Here are the top three mistakes made across a large number of mainstream websites, as I’ve seen them.