Search Results: "mt"

27 June 2006

Michael Janssen: The Continuing Saga of the ML-2010

I upgraded my CUPS to 1.2 today, and had a bit of trouble with getting the ML-2010 to work with it. Given my other issues with this printer, I thought I would expound on how I fixed yet another problem with this semi-supported printer.
The Samsung printing uses the linuxprint system, which uses a configuration file in an XML format which isn't specified. In the default install for the Samsung linux tool, it is installed in /usr/local/linuxprinter/linuxprint.cfg with a link from /etc/linuxprint.cfg to it. My file, after being setup, looks like this:

<?xml version="1.0"?>
<linux root="/usr/local/linuxprinter" system="cups">
  <option name="ghostscript" value="/usr/bin/gs-esp"/>
  <option name="address" value="localhost"/>
  <option name="port" value="631"/>
  <option name="lpr" value="/usr/bin/lp"/>
  <option name="llpr-default-printer" value="lp"/>
  <printer ppd="ppd/C/ML-2010spl2.ppd" queue="lp">
    <option name="Resolution" value="600"/>
    <option name="PageSize" value="Letter"/>
    <option name="InputSlot" value="AUTO"/>
    <option name="MediaType" value="PRINTER"/>
    <option name="JCLJamrecovery" value="RWJOff"/>
    <option name="JCLEconomode" value="PRINTERDEFAULT"/>
  </printer>
</linux>
 
I discovered the hard way that if this file isn't there, the filter which is installed (ppmtospl2) doesn't work that well. In this case, the printer queue is lp. If this file is setup correctly, you can setup CUPS yourself, using the ppd file which is referenced in the linuxprint.cfg file. If you have lost your linuxprint.cfg, I suspect you can just modify the above with the correct ppd - the Samsung package has many of them for different printers. If you don't want to go that way, you can rerun the /usr/local/linuxprinter/bin/linux-config as before, but you will have to open your CUPS 1.2 server wide open while you are configuring it so that it can add the printer. Also, I had to have a printer existing in the CUPS 1.2 server in order to have the linux-config program work at all. I solved this by just adding a virtual pdf printer (using the package cups-pdf). Even when you get linux-config to add the printer, it will not add it correctly for CUPS 1.2 - the device is incorrect - so you will have to reconfigure it via the web interface and give it the ppd which is in the directory anyway.
At least I have my printer back again.

Enrico Zini: MyODBC, one row at a time

In case you were wondering how to get the query result one row at a time with the MySQL driver of UnixODBC, it's very easy. You just need to:
SQLSetStmtAttr(stm, SQL_ATTR_CURSOR_SCROLLABLE, (SQLPOINTER)SQL_NONSCROLLABLE, SQL_IS_INTEGER);
But not, of course, before having set the DSN Options field to 1048576 (with the ODBCConfig tool or something similar). It wasn't too hard to find out after reading most of the MySQL driver source code. And qalculate has a nice useful built-in shift operation.

25 June 2006

Mike Hommey: Wordpress and daylight saving

Wordpress has a wonderful feature: instead of providing a timezone where you live, you tell it how much hours your local time differs from GMT. Which just fails when dealing with daylight saving. And I just noticed that my setting was still 1 hour, instead of 2. I remembered to change time on my wallclocks, mobile phone, but I forgot my blog… But changing that will change it only for future posts and comments. So, for people who forgot like me, here are two SQL queries to fix the database:

update wp_posts set post_date = convert_tz(post_date_gmt, 'GMT', 'Europe/Paris'), post_modified = convert_tz(post_modified_gmt, 'GMT', 'Europe/Paris');
update wp_comments set comment_date = convert_tz(comment_date_gmt, 'GMT', 'Europe/Paris');

Don’t forget to replace Europe/Paris with whatever your timezone is ;) . Note that this will require you to run, if you’ve never done it before, something like
mysql_tzinfo_to_sql /usr/share/zoneinfo mysql -p -u root mysql

24 June 2006

Jose Carlos Garcia Sogo: AverTV Volar chipset

While looking for a driver for my new DVB-T device I decided to open it, as I was suspecting this was a very different device from other AverMedia products. What I have found is that it uses this three chips: I took some photos. So it seems that this device is using quite different (and new) technology than older AverTV DVB-T USB 2.0 device, and it is not supported for now in v4l-dvb drivers (mt2060 tuner is, but DibCom 7700P is not). So I think that a new implementation for this DibCom chip will be needed, as it will be different from DibCom 3000 brancd. Basically we should request info to AverMedia about this chip so a new driver can be developed.

Andrew Pollock: [life/mtb] Biggest. Ride. Ever.

Yesterday I cycled from Mountain View to Santa Cruz. 50 miles (80 kilometres). Why? Google had its annual Engineering off-site, and there were a bunch of people riding. One ride was a "no rider left behind" one, so I figured I'd give it a go. We left Mountain View at about 6:50am, and 5 and a half hours later we finally arrived at the Santa Cruz Boardwalk. Man it was tough. I now have a much greater appreciation for the ride to Kosciusko that Sarah did, that one time, at band camp. I was really grateful for the use of Sarah's 2 litre Camelbak, and even then I was amazed at how fast I ran out water. And steam. Did I mention it was a tough ride? One of the highlights of the ride was the fact that Alan Eustace came on it. Here you've got one of the Senior Vice Presidents of the company coming along with the mere mortals. Early on in the ride, one of the riders got a flat tyre, and he changed it for her. He changes a mean tyre. When we reached the summit of whatever mountain it was we were toiling to cross, we came upon a store, and had a breather. He shouted everyone whatever they needed from the store to keep going. That was really nice. I was also really grateful to Richard, who saw me struggling at one point, and gave me a Power Bar to help keep me going. I really appreciated that. Just goes to show that eating only a banana for breakfast before embarking on a ride like this isn't such a good idea. The other highlight was the downhill coast once we got over the mountain. That was pretty sweet. Made me glad I was taking the bus back again, and not having to cycle back up it. Other than a lack of water and a lack of breakfast, I pulled up pretty well. I think I sat around for about an hour after arriving at Santa Cruz feeling pretty stuffed, but I didn't get any cramps or anything, and I cycled to work as usual the next day. I've got some funky sunburn on the backs of my hands where there's a hole in my cycling gloves. Would I do it again next year? Dunno. Maybe if I've improved my fitness some more, and maybe if it's on a road bike rather than a mountain bike.

23 June 2006

Erich Schubert: GMail filing invalid spam complaints

Apparently, GMail has been filing invalid spam complaints with DFN (the germany-wide university and research network backbone). This is the second time we were forwarded this complaint all the way down to us. I know exactly which mail it is. The IP is the firewalls "private" IP, so no other service is on that IP (it's not the masquerading IP). The time matches exactly the time of an email delivered to GMail. Therefore I'm 100% sure which mail they are considering to be spam. However, it is not. It's not in the "spam" folder in GMail either. No SPF violation. Valid reverse lookup in the appropriate domain. Single-hop SMTP delivery. Firewall to gmail mailserver. It's our daily snort report, that is considered spam every few weeks. That totally sucks, that a perfectly valid and correctly sent email, that is also delivered correctly, is reported as spam amongst the big ISPs. Unfortunately I don't have any details on who is filing the complaint, but it certainly is somewhere among the big ISPs. And traceroute shows a direct peering of Google with the DFN at DeCIX.

Wouter Verhelst: Choir concert

I had been in a choir called "Cantilene" since the age of sixteen. Since this was a youth choir, however, I was kindly asked to leave when I hit 26, now two years ago. Unfortunately, that left me in the cold, as Cantilene was part of the c-koren family which did not really have a choir that appealed to me, with hours that would allow me to attend rehearsals. This has changed now; since a few months, the C-koren have a new member choir called "Caljent " (which is supposedly a spanish word meaning "warmth" or some such—I'm sure Spanish people will correct me if I'm wrong;-P ), and we will give our first small concert next week's friday, at 20:30, in the "Sint Lambertuskerk" (church of Saint Lambert) of Ekeren, my home town. Everyone who can make it is welcome to be there...

20 June 2006

Joey Hess: on forking debhelper

Forking debhelper is apparently so much fun that everyone is doing it. Of course, Ubuntu continues to make changes to debhelper with no regard to the possible consequences, no matter how often I point out that this is a dreadful idea. Today I noticed (it's not like they bother to tell me) that they have added a dh_iconcache command to it, so presumably various Ubuntu packages cannot build with Debian's version of debhelper, and if I decide to add a different dh_iconcache command to it, things might build but incorrectly. To add to the fun, the version of debhelper in Debian unstable is now forked from what I guess I have to consider the "upstream" debhelper, since it got NMUed. This fork modifies dh_python in ways that, if I decide I don't like, I will have to either painfully carry forward or break a lot of stuff to get rid of. The reason it was NMUed is because I'm not interested in debhelper being in the middle of the senseless conflict between python-central and python-support. (It's a good time to be a perl user BTW. TMTOWTDI?) All this is not very much motivation for me to continue to work on this stuff, but we'll see I guess.

18 June 2006

Andree Leidenfrost: New x.0.8 Mondo Rescue Debian Packages

mindi-1.08-2-1, mindi-busybox-1.00-7 and mondo-2.08-2-1 are now in incoming. The main changes apart from being new upstream versions are:
  • LVM support,
  • includes Debian-specific post-nuke script to update initrd images after restore,
  • fixed DHCP support, i.e. using something like 'nuke ipconf=dhcp:eth0' should work now (feature done by Bruno, I just ironed out some scripting buglets).
I have switched over to upload amd64 packages partially because I wanted to and partially as a workaround for the still unamended Packages-arch-specific file. If anyone can tell me how to get this changed, I'd be very grateful. Other than that, I have double-checked that i386 builds in pbuilder, so fingers crossed that i386 packages are going to get built automatically.

The packages were tested doing a full archive and restore run on sid i386 (NFS) using kernel 2.6.16-2-k7 (2.6.16-14) and on sid amd64 (ISO/DVD) using kernel 2.6.16-2-amd64-generic (2.6.16-14) (I've had intermittent problems with the OOM killer in -k8 kernels during restore.). The amd64 setup uses a combination of two RAID volumes and two physical LVM volumes one of them on top of RAID with multiple logical volumes. (/boot is a normal partition because I like grub.)

Hopefully, I can now focus somewhat more on the remaining bugs, some of which look like they might entice substantial upstream work. We'll see. Oh, and upgrading mindi-busybox to 1.1.3 would also be nice, there is a problem with mount/mtab support that I have to get to the bottom of first.

All in all, with both RAID and LVM support pretty much there (knock on wood), Mondo Rescue in etch should be much improved over the version in sarge.

14 June 2006

Gunnar Wolf: On Daylight Savings Time

Joey Hess blogs about possible dangerous ways to exploit the daylight savings time. Well, for the tenth year in a row (if I am not mistaken), we central-Mexicans can proudly announce we are GMT-5. When I was a kid, we were always told that daylight savings are a very important way to save energy in non-tropical areas, such as the North-Western states, USA, Canada and Europe. We understood that, as tropical beings, we didn't have to worry about that, as it would have neglegible effects for us.
Ten years (eleven?) ago, this changed, and we became first-class world citizens, together with the emotion of shifting the clock's hands twice a year. Of course, we all did stupid things once or thrice - The first time we got back to GMT-6, I moved to GMT-4 instead. We were laughing at the fools who forgot to move the watch. I went to the movies with Nadezhda, and was confronted by a less-than-amused clerk that had to explain the same to too many people along the day. At least he smiled when he noticed we were stupider than most.
Well, today I am a big fan of daylight savings. I simply like having sunlight up to 20:00, sometimes even 21:00 - But I have reversed the old logic I was taught at school. We Mexicans have very little variation in our clocks - We go from maybe 11 to maybe 13 hours of daylight comparing Summer and Winter. Ok, make it 10 and 14, to make it sound more dramatic. Having the sun raise at 6AM makes sense, no matter what time of year it is. Most electricity is spent in the early night (8-10PM)... So it makes a lot of sense. Even for the people in the USA, maybe even Canada, and most of Europe. But...
Why do Nordic countries adhere to daylight savings? I mean... You vary from 4 to 20 hours of sunlight a day - What difference does one hour make anyway? Why follow the hassle we all regular humans have to go through? I can't imagine people in Narvik and Rovaniemi trying to squeeze that little glimpse of sun they have during the winter, and trying to align their sleeping time to the exact the sun is only half-visible in Summer.

12 June 2006

Robert Pickel: some updates

What I did this week:

I wrote code that contains many "bashisms" but runs, this is the code that detects boot paramaters from the user for a few boot options. I would like to combine the boot params into on parser that sorts through all the user entered boot options instead of looping through them xxxxx times during the execution of casper-bottom scripts.

I had a rough time testing the changes I made to casper-ng, so I started to work on a tool that will be used to easily unpack, pack, and modify images created by live-package.
This did divert my attention for a while, but not too long.
  • Its called live-helper and can be found in the subversion repo.

Worked on documentation, explaining the theory of operation behind casper-ng.

  • I am currently in the process of finishing up the casper-ng documentation, you should be able to grab this in a few hours using subversion.

Cleared things up Marco, he will work on the initramfs hooks and I work on the casper-bottom scripts. I finished up removing some code that modifies the root files system at boot time and moved it to postinstall. However, I did go a little nuts with this, and was asked by Marco to keep this to a min.

  • I will work on casper-bottom scripts, he will work on the mkinitramfs hook (image detection and so on)

My plans for this week:

  • Adjusting casper-ng documentation after a peer review by the debian-live group - this will be ongoing for the rest of SoC.
  • Experiment with some hardware detection, creating some images and testing on as many machines as possible (I am limited to mostly i386) - plan on using discover
  • I think it will be possible to use yaboot to boot debian-live on ppc & ppc64 unfortunatly the only box I can test on right now is an experimental blade server that IBM donated to a research project I work on at school (not ideal)... I have to find some people who are willing to test ISOs for me or a good emulator.
  • Start examining the scripts executed once casper hands everything over to init on the rootfs - I get some weird errors somtimes, prob because there are some saved setting from the box that created the iso. Modules that are installed at boot time etc.
*POST AS MUCH AS POSSIBLE: my mentor is starting to freak out because I did a poor job of keeping him posted on my work.

11 June 2006

Andrew Pollock: [tech] Adventures in supporting Outlook

One of my users was having some issues using Outlook to connect to my SMTP server to send mail, so I had a bit of a poke around during the week to try and improve the situation. I used to work in IT security, so I've got a healthy level of paranoia when it comes to network security. One of the things I don't allow is any clear-text authentication. I make users use an SSH/SCP client rather than an FTP client to upload files, web-mail is SSLed, IMAPS and POP3S only, etc. For various reasons, the occasional user wants to relay mail through my SMTP sever, rather than using their local ISP. Furthermore, a lot of the time, these users are on dynamic address space, so whitelisting IPs for relaying isn't feasible. So I use SMTP-AUTH. I also support STARTTLS. During this debugging session, I discovered that one can actually authenticate without using TLS, so I fixed up Sendmail's configuration to only offer AUTH after a STARTTLS (define( confAUTH_OPTIONS', p') in sendmail.mc). The problem that my user was having (and I reproduced myself) was that even with Outlook configured to "Require an encrypted connection" for SMTP, and authentication also specified, relaying was failing. Turns out that Outlook (and Outlook Express) only support the AUTH LOGIN SASL mechanism, which is obsolete, not the AUTH PLAIN mechanism, which was all I had Sendmail configured for (and works fine for Sarah and her Mail.app on the PowerBook). So the first thing was to enable LOGIN so that the applicable lines read as TRUST_AUTH_MECH( PLAIN LOGIN') and define( confAUTH_MECHANISMS', PLAIN LOGIN') in sendmail.mc Then it turns out that Outlook doesn't really handle TLS all that well anyway, it'd rather just talk raw SMTP over SSL (i.e. port 465/tcp), and what was happening was on the first couple of delivery attempts, it would connect to port 25, start spewing SSL negotiation crap, upset the greetpause feature I had enabled, and never succeed in getting anywhere. Then it fell back to using STARTTLS instead. So rather than having this hit and miss approach, I finally enabled SSMTP, by adding DAEMON_OPTIONS( Port=smtps, NAME=TLSMTA, M=s') to sendmail.mc So the following deficiencies in Outlook were highlighted from this exercise:
  1. Outlook does not notify the user if authentication is required, but not able to be performed
  2. Outlook only supports the obsolete AUTH LOGIN SASL mechanism
  3. Outlook doesn't do TLS on port 25 properly
After all this, the user is going to probably switch to Thunderbird, but at least Outlook is now supported as properly as possible.

9 June 2006

Lars Wirzenius: Travel report: Debconf6, plus rest and relaxation in Los Angeles

This May I spent four consecutive weeks abroad, visiting first Debconf6 (including the Debcamp that preceded it), and then Los Angeles afterwards. I won't write a detailed report of everything that happened; nobody likes to read pages after pages of descriptions of meals and such. Instead, I'll jot down a few memories of moments. It's still long, sorry about that. May 6, about 3 AM, at home. Waiting outside for a taxi. Pretty tired already: spent the night frantically weighing all my clothes to optimize my packing. It is warm enough to wait outside without a jacket. The night is calm and beautiful. Mankind is so much nicer when it sleeps. May 6, about 4 AM, the Helsinki airport. I bump into Tuukka and Tulitar, who are on the same plane. Kaol also joins us, but that I knew beforehand. I'm suddenly much less apprehensive about the long flight. May 6, Mexico City airport. We meet more Debian people. The first taxi driver we're assigned seems to be suspect somehow. The other taxi drivers rebel and our luggage is put into another car, with another driver. I have no idea what is actually going on, but that develops into a theme for the Mexican part of the trip. May 6, Oaxtepec. We're finally here, but it seems very difficult for us to get rooms. While we wait, we and some of the people who arrived earlier go to a restaurant. The Germans want to order the same thing for everyone, but fail to agree on what, so eventually we order all the steaks on the menu. The food is good, but the restaurant staff would probably have preferred to go home at closing time. We eventually get rooms and I collapse into bed. Debcamp week, Oaxtepec. We have network. We don't have network. We have network. We don't have network. We have network. We don't have network. We're frustrated all the time. I was supposed to do billable work (related to Debian, even), and can't. Should've prepared for this possiblity. I'm too dependent on a good Internet connection, need to figure out to reduce this dependency. To have something else to do, I start the Mugshots project: take a photo of everyone together with a paper with their name, or IRC nick, or anything else they want to say about themselves. Debconf, late one evening. Everyone is partying one way or another, drinking, dancing, discussing. Lots of people around already. Nice people. Still I withdraw into myself. I'm physically present, but not interacting. Never know what to say; exhausted by having to remember who everyone is. I'm introverted, and deal better with smaller gatherings. My life's ambition is to become a multi-millionaire recluse. Debconf, late another evening, Oaxtepec. Everyone else is getting drunk, and it affects me. I make the silly bet about Debian releasing on time: if we do, I'll get a Debian tattoo. Not to worry, I win either way. Debconf, some evening or another. I participate in a game of Mao. It is an unpleasant game, for me. I suspected this beforehand, but now I've verified it. It is best for everyone if I never play again, now that I know enough to at least try to reach my personal, alternative goals in the game, which make the game less fun for everyone else. (Better for me too, since I make fewer enemies.) Debconf, day after formal dinner. I learn that Jonathan (Ted) Walther is gone. Good riddance. I suprise myself with the amount of glee I feel when removing him from the Mugshots gallery. (That, incidentally, was something I decided all by myself. It's my gallery, after all.) Debconf. The sponsored food is quite acceptable, but eventually becomes boring and bland. Mass-kitchen food can't but help to be like that, I guess, unless it gets expensive. I don't want to see another chicken leg ever. Debconf, early in the week. Droidy (Leena) and Burger (Ville) arrive. Very nice. Helps massively with my withdrawnness to have real life friends around. I still go early to bed, though, instead of participating in the partying. Debconf, late in the week. I get Ville and Frans Pop to talk and Ville agrees to have look at the installation manual. He's an actual (former) professional tech writer, so hopefully will be able to improve it a lot. May 22, Oaxtepec. Last day. I spend all morning packing, checking out, and waiting for a taxi. Strangely relaxing. Debconf is finally over, and although I did enjoy parts of it, and don't regret coming, I'm not sad it's over. May 22, evening, Los Angeles. Julie and Kristian meet me at the airport. Hugging happens. Happiness happens. I get my first taste of LA traffic, which seems to mostly consist of people complaining about how slow it is while driving very fast. May 23, the Promenade, Los Angeles. A three block long walking street of shops, with three (count them: three) bookstores. The two I have time for even smelled nice. I am in hog heaven. Colossal credit card cringing. May 24, Getty Center. A very nice, very impressive place architecturally. The art is good too. As usual, the impressionists make the strongest impression on me, but there's lots of other good stuff, too. Not everything, though: Robert Adams's photographs leave me unimpressed, possibly I lack the cultural reference points necessary to appreciate them. He has many photos of shabby temporary shelter-like houses that in reality seem to be nice south-western US houses from the 60s and 70s. My intuition just screams that the houses and their inhabitants won't survive their first winter. But of course, they don't have a cold winter there. The rest of the exhibition (or what I have time to see) has way too many portraits for one session. Portraits get boring after the first dozen or so, I'm afraid, unless there's something extraordinary about them. They are several rooms rebuilt from 18th century French aristocratic houses. Very nice, very pretty, but I would not like to live that uncomfortably. I have a small epiphany about nudity in art in one of the rooms with statues. I've always known nudity could be portrayed erotically, such as having two lovers embrace passionately; or that it could be portrayed more or less abstractly, using the human body, or parts of it, just because it can be a very beautiful subject, just like a flower, but without giving it a greater significance. It's decoration, nothing more. There are two statues in the Getty collection that show me a third way. They are exquisitely sensual, evoking a sense of form and texture that make me think of human skin and flesh, a sense that if one were to touch the statue, it would feel like touching a live human. Yet none of this is erotic at all. I'm not sure I can explain this, one may have to experience it for oneself. Unfortunately, I was too overwhelmed to write down the names of the statues. May 23, Los Angeles. The food takes me by surprise. Julie has always told me that food in LA is good, much better than in Finland, but she hadn't prepared me for an all-out assault on my palate. Dine well in LA and die happy. (When I go back to Finland, I will have to learn again how to cook, dammit.) May 25, Los Angeles. Jesus reminds me via SMS about the Towel Day. I participate. My hosts think I'm a bit weird, but in a funny way. Many happy days in May, Los Angeles. I visit the Los Angeles County Museum of Art (exhibiting a weird Italian designer, some boring Klimt paintings, and a very nice general collection); the Natural history museum of LA (dinosaurs! real skeletons! big ones! T.Rex! for the first time in my life! they're huge!); the Museum of Jurassic Technology (weird); had dinner with some local Debian people, and visited the local Google office afterwards; the Hollywood Boulevard at night (funny, for a while). And other places I've forgotten already. LA is not small. I visit a political theater play that is brilliant. I also visit my first American BBQ, and have my first experience with the LA gay community at the same time. I'm later told that these two are separable. I enjoy them both a lot. I visit more bookstores. My hosts keep finding new ones they want to recommend to me. Parking would be a pain in LA, except that it means that people do actually walk a lot, since the nearest parking space is always three blocks away, or five levels up without an elevator. May 28, Los Angeles. I innocently mention that LA is such a nice place, with nice people and gorgeous food, that I wouldn't mind living there. Julie's brother hears this and immediately connects me with someone he knows whose company is looking for new people. During the next three days, we meet and talk and things seem favorable. Even if I decide not to go (it may be too huge a change for me now), it's nice to feel appreciated. June 1, Los Angeles. Leaving for home. Not a sad thing, but I'm definitely feeling wistful. I get hugged about fourteen thousand times. Parting is such sweet sorrow. I will definitely have to go back to LA, one day.

7 June 2006

Philipp Kern: Embedding Lua into qmail

So I spent most of yesterday's time on embedding a Ruby interpreter into qmail, and most of today's time on embedding a Lua interpreter into it instead. The latter worked well enough, the former did not and the resulting scripting environment was just weird. Not even the File object did work, I was not able to put some strings into a debugging file. Why I do that? Well, I needed greylisting, which seems to require a bit more policy than expected. There was a patch for qmail-smtpd which called a shell script to check if a certain file is present, representing the greylisting triplet. I first changed the script to sanitise its input variables and it looked to work well. But no, it broke sender verify. Another machine of mine, running exim, was not able to do a proper callout to this server, out of dubious reasons I have not yet fully explored. I wanted more control over the policies when to accept mail (considering that qmail does not implement anything like this by itself), so embedding looked like a good choice. I still hope that Lua provides me enough functions through its libraries, just like Ruby would. And why I use qmail... The commercial web hosting panel I got for free with the server, called Plesk, uses it, so I will stick to it until I find a drop-in replacement. I cannot be bothered to either write a free replacement for the panel which takes some work off me, or to take the challenge and replace qmail on the live server, having no other server equipped with the panel to try it on. Especially considering that I do this hosting for free in my spare time...

6 June 2006

Martin F. Krafft: Delaying mail

One thing I really miss about email as we know it is the feature to deliver a mail at a specified point in time, not necessarily now. Conceptually, this could be done quite easily: have an alias maildelay deliver to a script, which parses the envelope recipient of the form:
maildelay+2006.06.06.2000=madduck=debian.org@my.mail.relay
The script would drop the mail into a temporary file, removing the control information from the recipient headers:
s [^=]*=(.+)=(.+) \1@\2 
and set the file's modification date to the requested delivery date. Then have a daemon periodically scan the directory and pass expired files to /usr/sbin/sendmail. Michael Tokarev also offers an interesting approach: using Postfix header_checks, he suggests putting messages that contain a header such as X-Delay-Send on hold:
/^X-Delay-Send:/ FILTER hold:
Then, scan the hold queue and set the modification date of the appropriate files to the requested time to let Postfix's qmgr handle the delivery around that time. Of course, I am not supposed to roam about in /var/spool/postfix/deferred, less change any inodes, thus this method right now is not more than a nice idea (I did submit a feature request to Postfix; it doesn't look like it'll be accepted.). Regardless, both approaches are effectively open relays and I am not too inclined to do anything about that. So, moving on... Another method would be to write a policy daemon that returns a 4xx status message until the time specified in the email. Of course, this has the problem of unpredictability, so the mail could be delayed several hours longer than requested. But given the requirement that I'd like to turn my laptop (the submitting MTA) off and still have the mail delivered, the solution may be a second MTA on my SMTP relay (perhaps on port 587/tcp), which takes care of all TLS and SASL submissions and has a predictable retry period. If you have any thoughts (or existing solutions), please let me know!

4 June 2006

Andre Luis Lopes: First post and already tired

Well, I have just finished setting up my virtual machine in a hosting provider which offers a very nice virtual machine plan called VPS. It’s very nice because they give you full root access so you can install whatever you want to install. Also, it’s Debian based and even the control panel they provide is as I like things to be : minimalist and easy to use. Sure, it works like a charm also. I’m tired because I was fighting the blog system I installed for a long time trying to convince it to get installed in a proper VirtualHost but it kept giving me trouble everytime I tried to access its root page. I gave up and installed it in a directory under my default page and then it worked as expected. Someday I need to take a closer look at it and find out what really went wrong. Well, actually, I know what went wrong and I even knew how one could fix the issue as I already fixed issues like this one lots of time in the past, but this time my tricks didn’t helped. Anyway, mail setup is already working, complete with SSL-based IMAP/POP, SMTP-AUTH through SASL and all the basic services I wanted to have are already working. Now I think I can have some sleep a it’s past 4:00AM. Well, enough for a first post.

2 June 2006

Adam Rosi-Kessel: Family News

I’ve been blogging a bit about my family lately — this entry about my brother Jonah’s band and this entry about my wife’s blog, so I didn’t want to leave out my youngest brother, Andrew. He has gained some renown as a tennis star at Macalester College. Men’s tennis gets help from a ‘Trainwreck’ perhaps captures it best:
Picture this: nervous first-year, short shorts, longer t-shirt, brown dress shoes, newly broken glasses taped together with white sports tape. He begins his first varsity tennis practice, he is excited. So excited in fact that he tips over the ball hopper while doing warm-ups, spilling tennis balls all over the court. That’s when they started calling me ‘Trainwreck,’ coach wanted to call me ‘Shoes,’ but the team agreed on Trainwreck,. Andrew ‘Trainwreck’ Kessel ‘07 said.
See also Athlete of the Week (scroll down to “Week 29”) and Cobbers Beat Scots 7-2 in Moorhead . I never even played intramural sports in college, so I can only appreciate Andrew’s success vicariously. Also, I’m now hosting a website for Jonah’s nascent photography business, Kessel Imaging. (Kids these days, they want to do everything with Flash! In my day, we hand-coded HTML and CSS.)

Uwe Hermann: OS Install Experiences - Part 3: PC-BSD [Update]


Note: This article is part of my OS Install Experiences series.
I'll continue with the recently released operating system PC-BSD 1.1, which is based on FreeBSD 6.1. This is actually the first time I installed a BSD-like OS, so I thought it would be a bit of a hassle. But I was surprised to find that the install was really pretty easy (which is a major goal of PC-BSD, as I understand it). I didn't even read a manual or installation instructions or anything... Install
  1. First, I downloaded a PC-BSD 1.1 CD #1 image, burned it on a CD, and booted from that.
  2. The first installer screen is text-based (later it's graphical), and allows you to choose between a normal install ("boot FreeBSD"), install "with ACPI", "safe mode", "single user mode", and "with verbose logging". You can also "escape to loader prompt", or "reboot".
  3. While the installer runs, it merely shows a nice desktop background, pressing any key shows you the boot messages.
  4. After a while you can select a screen resolution for the graphical installer, run fdisk, escape into an "emergency shell", chroot into the root partition, or reboot. Default is to start the installation at a pre-selected screen resolution.
  5. You can choose the language and keyboard layout. Although you can click "back" to return to previous steps in the installer, you can not go back to the language/keyboard selection later!
  6. Partitioning. First, you can choose on which disk to install, then choose the partition to use. The list only shows the primary partitions and an "extended DOS" partition. Device names for disks are a bit different in BSD world. /dev/ad0 (counting starts at 0) is the first disk, /dev/ad0s1 (counting starts at 1) the first "partition" (called "slice" in BSD). It doesn't seem to be possible to install PC-BSD on an extended partition (please correct me if I'm wrong), so I installed it on /dev/hda2 (/dev/ad0s2 in BSD-speak), which is a primary partition. To make things more complex and confusing, a BSD slice can contain multiple "partitions" (not the same as Linux partitions!). I now have /dev/ad0s2a, which is the boot partition, and /dev/ad0s2b, the swap partition. Confused? Me too.
  7. Note that changes made to the partition table seem to be effective immediately, there's no way to go back without losing data! Debian's installer is better at this. The default PC-BSD file system is UFS, btw.
  8. The hardware will be automatically detected (worked quite well for me).
  9. You can now choose to either install the BSD bootloader in the MBR, or install no bootloader at all. Not sure what the best thing for me is here, but I decided to install the BSD bootloader (overwriting GRUB). I might have to re-install GRUB (and tell it about PC-BSD) if the BSD bootloader cannot boot the other (Linux) OSes.
  10. Now I must enter the root password, and I can also create another user. I noticed that passwords can only contain alpha-numeric characters (no %$ ,.#+!? and so on). WTF? They can't be serious... Also, you must enter a real name for the normal user, it won't let you continue until you type something... Pretty annoying. There's a checkbox called "Auto-Login User?" which is enabled by default, but I didn't find out what exactly that does...
  11. The network is successfully auto-configured via DHCP. I was not asked for a hostname, but typed hostname after the install and I got PCBSD.localhost.
  12. Reboot. The CD is not ejected automatically, you have to remove it manually before booting up.
  13. I'm asked to insert CD 2 (language packs), which I don't have (or want), as I only burned CD 1. Clicking "abort" does the trick, and I can continue with English as the default language.
  14. Finally, I'm dropped into a KDE session, and that's it.
Security That's it. Comments, suggestions, flames? Update 2006-06-02: Added IPv6 netstat/sockstat output.

25 May 2006

David Pashley: Pathological Date Parser in Java

I've recently had cause to parse some date values in Java. As a result I've produced a class which can manage to parse an awful lot of date formats. I thought I'd better document it in case someone found it useful. Certainly there doesn't appear to be anything elsewhere which shows you how to parse lots of formats. I have found the order of date_formats to be very brittle, so I don't recommend you change it without an awful lot of test cases. Anyway, without further to do, I present to you, the Pathological Date Parser for Java
// Copyright 2006 David Pashley <david@davidpashley.com>
// Licensed under the GPL version 2
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.TimeZone;
public class Date  
    private Calendar date;
    static String[] date_formats =  
            "yyyy-MM-dd'T'kk:mm:ss'Z'",        // ISO
            "yyyy-MM-dd'T'kk:mm:ssz",          // ISO
            "yyyy-MM-dd'T'kk:mm:ss",           // ISO
            "EEE, d MMM yy kk:mm:ss z",        // RFC822
            "EEE, d MMM yyyy kk:mm:ss z",      // RFC2882
            "EEE MMM  d kk:mm:ss zzz yyyy",    // ASC
            "EEE, dd MMMM yyyy kk:mm:ss",   //Disney Mon, 26 January 2004 16:31:00 ET
            "-yy-MM",
            "-yyMM",
            "yy-MM-dd",
            "yyyy-MM-dd",
            "yyyy-MM",
            "yyyy-D",
            "-yyMM",
            "yyyyMMdd",
            "yyMMdd",
            "yyyy", 
            "yyD"
    
     ;
    public Date(String d)  
        SimpleDateFormat formatter = new SimpleDateFormat();
        d = d.replaceAll("([-+]\\d\\d:\\d\\d)", "GMT$1"); // Correct W3C times
        d = d.replaceAll(" ([ACEMP])T$", " $1ST"); // Correct Disney timezones
        for (int i = 0; i < date_formats.length; i++)  
           try  
              formatter.applyPattern(date_formats[i]);
              formatter.parse(d);
              date = formatter.getCalendar();
              break;
             catch(Exception e)  
              // Oh well. We tried
            
         
        
     
 
The only date formats I can't get it to parse are <4-digit year>-<day of year> and <2digit year><day of year> (e.g. 2003-335 and 03335 for 2003-12-01). If you can add support for those and other date formats I'll gladly take patches.

Uwe Hermann: OS Install Experiences - Part 2: SUSE Linux


Note: This article is part of my OS Install Experiences series.
Next up: a SUSE 10.1 install. It's been a few years since I touched a SUSE distribution (it was something like SUSE Linux 5.3 or so), a lot has happened since then... Here's a rough sketch of the installation and a few superficial remarks and facts related to security. Install
  1. First, I downloaded a SUSE 10.1 CD image, burned it on a CD, and booted from that.
  2. The installer that showed up is graphical, and you can choose between a normal installation, booting a rescue system, or running a memory test (uses memtest86, I presume).
  3. While the installer runs it merely shows a rotating logo, but you can switch to other consoles (ALT+F1, ALT+F3, ALT+F4) for watching log messages passing by.
  4. You can choose the language used in the installer, later also your timezone and keyboard layout. You can also check the installation medium, which verifies the checksum of the CD, I guess.
  5. Next, you'll be asked to accept a license agreement (yeeaah, whatever).
  6. Your hardware will be automatically detected (worked quite well for me), and after that you can choose between a new install or a system upgrade.
  7. As for the desktop, you can use GNOME, KDE, text-mode (no desktop), or a "minimal graphical system" (it turns out that means fvwm, at least that's what I think).
  8. The graphical partitioning tool feels a bit awkward at first, I needed several tries until I figured out how to make it use the layout I wanted it to. The default file system suggested by the tool is ReiserFS.
  9. There's an explicit option which lets you choose the default run-level for the system (run-level 5 is pre-configured).
  10. The bootloader, GRUB, recognized the other partitions (Debian stable + unstable), added an entry for SUSE Linux, and created a working setup. Nice, although more control over the process (e.g. naming of the boot options) would be nice.
  11. Reboot.
  12. I'm asked to insert CDs 2 and 3, which I don't have (or want), as I only burned CD 1. Clicking "abort" a few times does the trick, and I can continue by choosing a hostname and domain name for the box (hydra + local.domain).
  13. Now I must enter the root password. Very nice: I have the choice between DES, MD5, or Blowfish (SUSE default) for the hashing/encryption of user passwords.
  14. Afterwards, the network is configured (automatically, via DHCP). You can enable a firewall at this point, and enable/disable access to the ssh port explicitly. It's also possible to enable "VNC remote administration" (default: off), or configure a proxy.
  15. Authentication methods for users, available from the installer: local (/etc/passwd), LDAP, NIS, Windows Domain.
  16. When adding a new user, there are some options. Per default, the user is in the groups "users" (no per-user groups, it seems), "dialout" and "video", but that can be configured. Password expiration is disabled. The default shell is bash.
  17. And now... another registration message (in the release notes, actually). May I quote (from my head): The registration procedure transfers zmd's unique device identifier to Novell's registration web service. The information sent may also include OS, version, architecture, and the output of uname and hwinfo, according to that text. More on that later, maybe...
  18. Of course, SUSE Linux comes with SUSE's/Novell's AppArmor enabled by default, but I haven't looked into it, yet.
  19. Now some problems appeared. More hardware discovery took place, it seems, then the screen turned black (with only a non-blinking cursor in the upper left), no reaction to any input -> I performed a hard reboot.
  20. After booting, I'm dropped into fvwm (although I chose GNOME in the installer), the reason probably being the forced reboot. After looking around a bit in the menus and stuff, I wanted to start sax2 (to find out what it does), but the screen turned black again -> another hard reboot. Could it be that I don't have enough RAM for this (256 MB)?
  21. Anyways, at this point I lost interest in playing with the system any further, and gathered the below information for comparison reasons...
Security That's it. Comments, suggestions, flames?

Next.

Previous.