Search Results: "ron"

22 July 2006

Ross Burton: DBus Performance

Ah, the classic DBus performance issue has reared it's head on Planet Gnome again. I'll chip in my thoughts on this, as I've done a fair bit of profiling on a large user of DBus. When I first ported of EDS to DBus, it didn't perform as fast as the original ORBit implementation. However when I dug out OProfile I discovered that the main bottle necks were deep in EDS itself, and DBus although in the profiles, wasn't anywhere near the top. We spent a few months optimising EDS-DBus (there was some serious low-hanging fruit) and by the time we'd done the obvious optimisations, EDS-DBus was faster than upstream EDS for the typical usage (running a book view, which happens every time you search in Evolution). For some methods EDS-DBus was still slower than EDS, and getContacts() is a perfect example. This method takes a query, builds the set of contacts that match, and sends it back to the client in a single list (compared to book views that do the same thing incrementally, and provide future updates). When profiled you discover that libdbus and libc are the top offenders, taking almost 70% of the runtime. The benchmark was asking for all contacts, so EDS-DBus was sending a 150 contacts as vCards over the bus in a single list, which amounts to about 100Kb of data. Now, this gets copied when it enters the library, copied again as it enters the sockets to the bus, which then sends it into another socket to the client, which then makes a copy. These copies really hurt, and are one of the things that ORBit does better than DBus: it copies less frequently and has generally had more optimisation time. There are several ways of making it better. In conclusion, the DBus vs ORBit performance issue isn't a real one generally. It's a rare case where the cost of the transport is the bottleneck (generally only in fake benchmarks), and when the transport is the bottleneck, there are generally other ways of optimising the code: as Havoc says DBus makes doing true asynchronous method calls trivial, and if you are sending huge amounts of data down the bus a private connection should be used (which will also make you a nicer citizen on the bus, as sending huge messages will clog up the tubes). NP: Kind Of Blue, Miles Davis

Steve Kemp: I almost believe that the pictures are all I can feel

Thanks to Faidon Liambotis for his nice patch, and Javier Fernandez-Sanguino Pen~a for accepting it we now have a cron which will no longer execute core files. Another small step towards improving security in Debian GNU/Linux!

20 July 2006

Biella Coleman: Debian History

I have made it to South Africa and the official part of the Law and Society conference has come, sadly, to an end. It has been an amazing experience for reasons that deserve a lot more attention than I have right now so I will wait to write some about it when I have more time. But before I forget, Lars has been thoughtful enough to put the Debian History Roundtable Discussion on the Debian Wiki. I organized this roundtable at Debconf4 and while there is a good chunk of information from the discussion, there is a lot missing and perhaps even wrong, so please make changes and additions.

Evan Prodromou: 2 Thermidor CCXIV

I talked with Raymond King and Mark Dilley at RecentChangesCamp in February (uh... I mean Pluvi se) about their plans to develop Mark's excellent SwitchWiki wiki directory into something... more. I'm glad to see that WikiIndex is really picking up steam. It's becoming my first-stop for getting information on what's wiki, what's not, and who's doing what. The site uses MediaWiki, but the principles and community are very much rooted in the traditions of Ward's Wiki, MeatballWiki and CommunityWiki. I really hope this site keeps up it's momentum and growth. tags:

CC Salon in Montreal Tonight is the first Creative Commons Salon in Montreal. The get-together is at Caf l tranger, 680 Sainte-Catherine Ouest (at Alymer) at 19h30. More details on the Creative Commons Canada blog: http://creativecommons.ca/blog/?p=185 . Maj and I are trying to get a sitter for the event -- Amita June is starting to get grumpier and grumpier about going to sleep after 8PM. But I'll be there regardless. tags:

Great camping Website So, maybe I just haven't been camping a lot in other places outside Quebec in a while, but I'm extremely impressed with the quality of the S paq Web site. You can search the entire network for available campsites based on various criteria (size of tent vs. RV, for example), and then use a map-based interface to browse possible sites. The maps go down to the individual site level, and have popup descriptions of each and every site -- how much sun, how close to water, how private, etc. It's really nice. I have my quibbles -- we tend to do road-trip camping, where we'll stay in a different campground each night for a few days. It'd be nice to do all those reservations at once, but the site doesn't support that. And there are some search criteria I'd like to be able to specify (number of neighbors, access by car) that aren't possible. But as far as it goes, this is a real good site. tags:

Wikispam lockdown I've been having a real problem with Wikispam on my site lately -- several of my pages have nothing-to-sniff-at wp:PageRank values of 6 or 7, and I think that attracts a certain spammity crowd. I think that dealing with Wikispam is something most wiki sites do very well-- an active community is the best counter-measure against spam. And there are lots of good tools, like regexp filters, per-page locking, email and IM notification, and ip blocking that make it easier to maintain a site. But I don't have an active community working on this site -- it's pretty much just me. And WiLiKi, as beautiful and Scheme-y as it is, doesn't have many of the anti-spam tools that users of other wiki engines take for granted. I plan on building more anti-spam tools into the site, but for now I've just been locking the site up when I'm not writing something. It's not as wiki-ish, but it does keep my writing up more often. I'd feel pretty bad about it, but it looks like Alex locks up CommunityWiki for days at a time. tags:

Amazon man at the door Just got an order from Amazon in... full of CDs and books. When I used to live in my car (long story, there), I had my 100 favorite CDs in a box in the back. It was safe there in tons of cities -- wt:Chicago, wt:Saint Louis, wt:New York City, even wt:Monterrey and wt:Guanajuato. But I parked it about a block from It's Tops in San Francisco one night while visiting home, and one of my windows was smashed and the discs were taken. Devastating. Slowly but surely I've been re-stocking my music collection, but it's painful to buy the same album twice (and, yes, I know... I shoulda made backups! I do that now). Today's shipment contained a lot of stuff I re-bought: ''wp:The Last Waltz'', a bunch of wp:Neil Young (including the DVD of wp:Greendale), and one of my favorite albums ever, the eponymous first album from Lamb. Also in the box were a bunch of Lost paperbacks ("inspired by the hit series") and the hardback copy of Bad Twin, the mystery novel supposedly written by one of the people who died in the crash of Flight 815. Yeah, I know -- but I like the show, dangit. tags:

Best thing ever Vaguely reminiscent of the very fine Good or Bad? feature from Brunching Shuttlecocks, bestthing.info, by the enigmatic but talented xkcd, is a good way to waste a few minutes. tags:

Ross Burton: Crap Speakers Of Doom

I just discovered a use for the Treble Booster EQ on my iPod... Now that I'm working in the spare room study pretty much all the time I really miss not sitting in the sweet spot for the hifi downstairs. Hanging around I had some cheap Logitech computer speakers, so I've dug those out and plugged my iPod in. This morning I fancied a bit of Sigur Rós so I slapped on Ágætis Bryjun and after two minutes was enjoying the bass (the speakers are sub/sat) but was left wondering what happened to the drums. If I listened very carefully I could just make out a snare, but the cymbals... totally inaudible. Thus Treble Booster, which has at made this album listenable too at least. It's a pain that these speakers are so bass-heavy as my laptop doesn't have bass/treble controls. The irony is that the sub doesn't even go that low, on Flugufrelsarinn the bass drum is totally drowned out by the organ. The mid-bass is just very, very loud. Oh well, I'm planning to get a pair of small speakers (MS Avant 902i are looking good) and one of those super-cheap Super-T amps for this room at some point. NP: Ágætis Bryjun, Sigur Rós

John Goerzen: Am I being scammed?

So today my auction for the tc1100 tablet PC ended. The winning bidder:



I replied to the buyer's e-mail giving shipping prices to Nigeria and Malaysia, and restating my policy of shipping to only PayPal Verified Addresses.

So what do you all think? Is this a scam?

I was shocked at the amount of scams that sellers on eBay are exposed to these days. I've never seen this before, even just a few months ago when I sold my last item on eBay. But with this one, spammers and scammers are using the "ask seller a question" interface. One person tried to get me to use an eBay phishing clone site. Quite a few tried to get me to sell to them off eBay, to people in China, using a non-reputable billpay service. And there was just some generic spam.

So all that, plus the fact that they want me to ship to Nigeria, plus the fact that the person just registered on eBay today, is making me nervous.

So it seems odd, but I can't quite work out how somebody would actually defraud me here. Also, I'm interested in what I should do if it is a scam.

Evan Prodromou: 1 Thermidor CCXIV

Happy 1 Thermidor to everyone -- I'm sure you're all busy meditating on the virtues of epeautre (wp:einkorn wheat), the wild grain to which this day is dedicated on the French Revolutionary Calendar. Thermidor is best known for wp:Lobster Thermidor, but also for the so-called wp:Thermidorian Reaction, a revolt by moderate revolutionaries during the French Revolution against the bloody excesses of the Committee for Public Safety. I think about this because I've just been reading Bob Sutton's blog today based on the reference in Ross Mayfield's blog. Sutton is the author of an upcoming book called the No Asshole Rule (pardon my French, but that's just the name of the book). It's about how poisonous, unhealthy personalities can ruin a workplace, and how beneficial it is to support your reasonable, human employees by kicking out the jerks. They're happier, more productive, and more loyal if you show some compassion and get rid of the a-holes. Coincidentally, I also saw the Top 5 reasons why The Customer Is Always Right is wrong on reddit. It also recommends against allowing unpleasant people to ruin your workplace environment -- but here, the culprits are the customer, not other employees. I especially liked the stories from Southwest Airlines. I think I'm going to have to pick up this Nuts! book about SWA business theories. Why all the thoughtifying about jerks and meanies in business? Because I think the same principles might be applicable to Open Source and Open Content projects. Specifically, with Debian, we've had a few personalities who generate a lot of discussion and attract a lot of attention, causing some real Excedrin headaches. The project as a whole has tended to bend over backwards to respect these individual's rights and personal values and blah blah blah, but maybe it's best to just say, "You're causing more conflict that you are providing value and no matter whose fault it is, we as a group will do our job better if you leave." In another realm -- that of wikis -- I know that I personally lean on longtime Wikitravel administrators, experienced users, etc. to be "the bigger person" and treat obnoxious personalities with respect and decorum. The theory is that every user counts, and any contribution is worthwhile. But maybe it's better sometimes to show some loyalty to the established contributors with a proven track record, and let the occasional mouth-foaming weirdo go wander off and bother someone else. We've got a real conflict-averse culture at WT, but sometimes it might be good to say, "We welcome everyone's input -- except yours." tags:

Uwe Hermann: OS Install Experiences - Part 5: Mandriva


Note: This article is part of my OS Install Experiences series.
Long time no install, so here goes. Install
  1. First, I downloaded a Mandriva One CD image, burned it on a CD, and booted from that.
  2. The (graphical) installer allows you to choose language and country, but there's no German(y). WTF? Maybe I just overlooked it, but I did look twice! When choosing the keyboard layout there is a German layout...
  3. After choosing the timezone, a KDE 3.4 live system is started. If you want to install Mandriva, you click the "Install from live system" icon on the desktop. The installation is done in a wizard after that.
  4. The partitioning tool is quite nice and has an "expert mode" you can enable to see more info and get more control. It performs all actions immediately, though, (AFAICS) which can lead to trouble.
  5. You can choose between LILO or GRUB, and even edit the list of GRUB entries manually (which is nice; many other distributions don't allow that).
  6. After a while there were no more windows or messages, so I thought the install was done and rebooted. Obviously I was wrong. GRUB wasn't installed (the old one was still there), so I had to manually boot into the Mandriva installation. From there, the installation continued...
  7. After net config (even asked me for a zeroconf hostname), root password, user creation and all the usual stuff, you're dropped in a KDE session and the install is done.
Security Continue reading here...

19 July 2006

Ian Murdock

More Cote’: “What most desktop applications lack now-a-days are features that are fully web-enabled, in a bi-directional sense.” Exactly. And “fully web-enabled, in a bi-directional sense” needs to extend to the mobile device as well. Software above the level of a single device may be a key tenet of Web 2.0, but current Web 2.0 applications are doing an absolutely miserable job of fulfilling it. We need to get synchronization right (with full support for disconnected operation!) before this new platform can truly replace the fat client, though as I’ve said before, I see the new platform as more of an extension to the fat client than as a replacement for it. Trust me. I was just in Moscow for nearly a week without reliable Internet access. I don’t care how nice Gmail is, it was utterly useless to me sitting there in my hotel room trying to get the finicky WiFi to work. Guess what? I’m back on Thunderbird now, even though I like Gmail better. (No, POP doesn’t count as “web-enabled, in a bi-directional sense.”)

Steve Kemp: So hot, so cold, so far so out of control

The cron patch I posted previously attempted to discard any crontab file which contained non-ASCII characters was a flawed approach. Lots of people told me that this would break scripts with foreign character sets, and that was something I’d not considered. A real solution would be to read each line and test for : Looking at the code for cron is hard because it is written in a “strange” style, so I’m not even going to attempt it this level of validation. However I have produced an updated patch which should work on ASCII + foreign character sets equally well. Instead of testing for the presense of non-ASCII characts it looks for NULL characters (’\0′). Binary files should contain at least one NULL character - as a string terminator, for example - and text-files should never contain them. So I think this simple test will work for 99% of cases.
Regardless of whether this patch, or another like it, is accepted and applied I do believe strongly that whilst being liberal in what you accept is a good thing being too liberal is asking for trouble.

Ian Murdock

Cote’: “If only Google would charge for GMail and GCal, and thus be accountable when things go wrong, they’d be a viable option for enterprise messaging.” Why oh why does Google need to charge for GMail and GCal to be accountable when things go wrong?? I just don’t understand that. Am I not already a customer? There’s a new business model in town..

Andrew Pollock: [tech] Gadgets always seem to arrive in bulk

Whenever I get stuff, I always seem to get lots of stuff all at once. So tonight we went to the lovely Fry's, with a mission to acquire an Ethernet switch to plug in the new printer, which was due to arrive any day now. A co-worker had also recently bought a 160Gb hard drive that cost $40 after rebate, so I was on the lookout for one of them too. Instead, I came home with 1.6Tb of hard drive. Oh well. There were some Seagate 400Gb hard drives going for around 30 cents a gigabyte (that figure still blows me away, I remember when it was dollars per megabyte), so I couldn't pass that up. Hopefully it'll motivate me into getting a wriggle-on with building the MythTV box. I figure I'll try to get a USB-2 card and stick it in my 1RU server, attach the four disks to that, and export them via ATA over Ethernet, and I should be able to have an essentially diskless MythTV front-end (maybe boot it from a 1Gb USB key I've got lying around spare, or PXE boot). Should be fun, if I ever get around to it...

Daniel Stone: [travel/ols2006] oh ell ess

'The internet is wrong.' -- Dave Airlie

18 July 2006

Steve Kemp: I should be so lucky

Cron should not read and process core files, or anything else which contains non-ASCII contents. This would prevent exploits such as that used against CVE-2006-2451. Provisional patch here: Comments? Applies to cron version 3.0pl1-94. Could also test file size too I guess, but that might lead to more false-positives. If it looks reasonable I’ll file it as a wishlist bug. Updated: new patch to allow non-ASCII character sets/locales.

Jordi Mallach: Seventy years of the Spanish Civil War and the Spanish Revolution

A few months ago I wrote about the 75th anniversary of the proclamation of the Second Spanish Republic which was celebrated throughout the state. That weekend I visited a fantastic exposition of Republican and Revolutionary war propaganda posters, in Segorbe.

Today, Spain remembers the beginning of the end. During the evening of the 17th of July and morning of the 18th, a group of generals of the Spanish regular army raised against the democratically elected left-wing government of the Republic. History says that the murdering of Calvo-Sotelo, a right-wing leader, was what finally provoked the conflict. It was no secret that the same right-wing and some elements in the army had been conspiring for weeks about an uprise. The only question was when, but the government was fooled by general Mola and didn't take really effective measures to prevent it.


Warning from sanitary authorities against venereal diseases Mola and Sanjurjo planned to start taking over official buildings and army quarters and quickly seize control of the major cities. During the first hours of their rebelion, they managed to take over most of the southern regions in Andalusia, Extremadura and parts of the Northwest, plus most of the islands and the Moroccan protectorate area. Meanwhile, the Republic did not manage to react quickly due to the weakness of the government, and in the first days of the crisis, the government changed a few times. Finally, the Republican parties decided that to defend the state they should give arms to the unions, and soon after many militia groups were getting organised in the cities, and columns sent off to liberate other towns.


Solidarity of Catalunya to the Basque front The insurrection was suffocated in Barcelona after some heavy fighting against the military in the Montju c castle; the Anarchists of the CNT grew strong in Catalunya and Arag n, and offered good resistance in those fronts. After the first days of the coupe d'etat, it was clear neither the legitimate government or the rebels calculated how things would go after the first days. The government was confident in being able to end the rebelion as they did four years before; the fascists thought they would have quickly brought down the government with a successful coup. But after the first week, the country was divided in two halves, and both sides of the conflict were keen on fighting, due to the big social fracture during the last months of the government. The Republic asked for help to the League of Nations, but the United Kingdom and France decided not to intervene, scared about the conflict trespassing the Spanish borders and becoming another bloody war in European fields. The only official external aid came from the USSR and the International Brigades, formed by volunteers of more than 50 nations. Some well-known personalities like Ernest Hemingway or George Orwell came to aid as well. Orwell wrote about his life-changing experience in a Barcelona immerse in the social revolution, where he joined the anti-stalinist socialist party POUM. Badly wounded in the neck, he left the front and went back to Barcelona, and witnessed the assault of the Telef nica by the communists against the anarchists, during the fets de maig, after which the POUM was declared illegal. Orwell captured his experiences in the frontline and Barcelona in his book Homage to Catalonia.


To defend Madrid is to defend Catalunya Franco and Mola, aided by the Northafrican troops and soon after by their fascist allies of Italy and Germany, didn't have big problems seizing the Basque Country and Asturies in the North, but not before making the town of Gernika disappear below the nazi Condor Legion bombing, in what would be a test for the massive aereal bombings of Word War II. The battle for Madrid was fierce, and the city wasn't occupied until the very last days of the war. The long defence of the capital made was immortalised in the famous phrase No pasar n.


Madrid's No pasar n During the war, anarchist groups controlling fields and towns in Arag n and Catalunya managed to bring a Social Revolution to the area. The people collectivised the land and industries, administered by local assemblies. This experience is regarded as the time when Libertarian Communism has been successful. The experience ended dramatically when the anarchists were treasoned and blocked by the communists, and eventually defeated by Franco at the front.


Each bullet for a target After the first and a half years, the fronts had stabilised in Madrid and the East of Andalusia, until early in 1939, Barcelona fell in Franco's hands, after the bloody Batalla de l'Ebre, being followed by Girona and the rest of Catalunya. The fate of the democratic state was clear. Two months later, Madrid fell and Val ncia and the small area still under Republican control surrended.


Robert Capa's Muerte de un miliciano Franco declared a totalitarian regime to, according to the fascists, reconcile the two Spains. In the first five years of the regime, up to 100.000 were executed in the franquist repression, including the Catalan president, Llu s Companys and many intellectuals. The dictatorship continued executing people until two months before Franco's death, 36 years later. Hundreds of thousands also had to exile in M xico, France and other destinations, leaving Spain in ashes, road gutters full of scattered bodies and the population facing famine. The cultural elite left the country, making the state's clock go back at least a decade. Their reconciliation really meant humiliation and repression. Many people were also murdered during the war behind republican and rebel lines, but the genocide of the aftermath had was unmatchable.


The Republic promoted education among the troups It is a bit late to restore the dignity of the victims, but not too late. Some associations have been fighting since the end of Franco's regime to get some kind of public recognition for their suffering, for their priceless fight for the legal and democratically elected Republic, for the people who didn't make it.


Excellent anarchist poster rejecting the politisation
of children by any of the three loyal groups Other people reject these efforts banning them of "revisionism". Not too surprisingly, these are the sons or grandsons of the people who won the war. The current government is about to pass a Historic Memory law which aims to give recognition to all these people who gave their lives for an ideal and freedom. Unfortunately, due to pressures from the right, it is probable that the text will be ammended to make it more acceptable by them. I fear it will end up not pleasing the victims at all. I have a passion for Spanish Civil War related matters, and in the last years I tried to use any opportunity to listen to my Catalan grandmother talk about war affairs in Barcelona, and my grandfather, from a town in the middle of the Republican side of the Teruel front, but born in a very catholic family, about how the war went on in Vall and the nearby mountains.


From the defensive No pasar n to the encouraging Pasaremos! I know my grandfather only told me the less compromising stories, like how he was sent to dig refuges until he was 16 and apt to fight in the Front, or how he was put in charge of hiding the church's valuable relics in a few barns. He never told me about how life was after the war in the small town. It is dramatic to see that all the people who were old enough to have a sense of what was going on at the time are so old that these unvaluable memories and stories will be mostly gone in ten years. (Most of the pictures are taken from the Sociedad Ben fica de Historiadores Aficionados y Creadores' website, which has a huge documented catalog)

Ben Armstrong: XPilot change of upstream growing pains

XPilot development has changed hands over the past several years. While the original website at www.xpilot.org continues to be run by the original developers, XPilot-NG (xpilot.sf.net) is where all of the new development has been happening. But xpilot.org still performs an important function for the user community: they run the meta servers1 that list all public xpilot servers around the world. Recently, we (the XPilot-NG developers on #xpilot at irc.freenode.net) noticed quite a number of uncontactable servers popping up on the meta servers. This is annoying, to say the least. Users don’t know they can’t connect until they’ve tried (unless they’ve bothered to try pinging the server first) and besides which, having all those “junk” servers in the list makes it harder to locate contactable servers. Now, naturally, we wanted to know where all of those servers were coming from, and why now, at this particular time? I knew my Debian package (and presumably any derivatives) do not report to the metaserver by default. Any admin starting an XPilot server would have to explicitly configure it to do so, so the incidence of uncontactable Debian XPilot-NG servers should remain relatively low and have a constant growth rate. Then I found the Fedora package, and started poking around inside. After a shallow review of the package, I concluded there was a good chance it was the culprit2, especially since it recently (FC5) had an init script added. Such a bug, coupled with the relatively recent release of FC5, would account for the sudden spike in number of permanently running non-contactable XPilot-NG servers. Bingo! I found some helpful folks at #fedora-games at irc.freenode.net, including the XPilot NG maintainer, which led to filing this bug. I subsequently invited the maintainer over to #xpilot and had a nice time introducing him to the other upstream devs and chatting about our current issues. Ultimately, we know we need to fix the problem at the metas, but in the meantime, I am pleased to have established contact with my counterpart in the Fedora project, expanding the diminishingly small XPilot developer community by one.

1 They deliberately never released any source code for those metas to try to keep the user community unified at the centralized servers. While I see the reasoning behind the decision, given the problems we’re facing now, it’s clear the XPilot community would be better off with meta server source that is actively being maintained.

2 Admittedly two problems with the +reportMeta option upstream set us up for this problem. First, counterintuitively, +reportMeta disables reporting to the metaserver (following the rule ”+” negates the meaning of an option starting with ”-”). Second, -reportMeta is a stupid default. Most people starting servers are behind firewalls these days, so unless they consciously decide to make their server public, making the corresponding adjustments to their firewall, the option should not be set (not to mention the security implications of making a server public by default).

Martin-Éric Racine: Messidor doing Lanaudi re?!

Evan, when you said "Saint-Michel-des-Anges" in this blog entry, surely you meant Saint-Michel-des-Saints? PS: Maciej is wrong. What people speak in Qu bec is French, they just speak it with a heavy accent and curiously outdated vocabulary reminescent of their coastal France ancestry. Tabarnak!

Enrico Zini: Fifth day in Addis

Setting up a mail server
Background Some terminology:
MTA
Mail Transport Agent
MUA
Mail User Agent
MDA
Mail Delivery Agent
SMTP
Simple Mail Transfer Protocol
MX
Mail eXchange
POP
Post Office Protocol
IMAP
Internet Message Access Protocol
With SMTP you connect to a server and send two things: envelope and message. The envelope looks like this:
MAIL FROM: <enrico@enricozini.org>
RCPT TO: <rms@fsf.org>
RCPT TO: <linus@linux.org>
The message looks like this:
From: <enrico@enricozini.org>
To: <rms@fsf.org>
Cc: <linus@linux.org>
Message-ID: <1234567@enricozini.org>
Subject: Test mail
Hi Richard,
this is a test mail.  I'm also writing
Linus to show how to send to more people.
Cheers,
Enrico
There is no authentication. There is no encryption. Two usual types of access control:
  1. Outbound e-mail is normally only accepted from an internal network
  2. Inbound e-mail is normally accepted from anywhere
The DNS is used to find the SMTP server to use to send a message:
$ host -t MX yahoo.com
yahoo.com MX 10 smtp1.yahoo.com
yahoo.com MX 20 smtp2.yahoo.com
yahoo.com MX 20 smtp3.yahoo.com
The process of sending an E-Mail:
  1. Enrico writes an E-Mail:

    From: Enrico Zini <enrico@enricozini.org>
    To: Richard Stallman <rms@fsf.org>
    Subject: Hello from Addis
    Hi Richard,
    Addis is a wonderful city, even if
    it rains a lot.
    Bye,  Enrico
    
  2. Enrico's MUA connects to the SMTP server (for example, port 25 of smtp.aau.edu.et):

    HELO enricozini.org
    200 OK Hello enricozini.org
    MAIL FROM: <enrico@enricozini.org>
    200 OK Mail from enrico@enricozini.org
    RCPT TO: <rms@fsf.org>
    
    Here, the SMTP server performs relay control: "do we relay mail to rms@fsf.org?":
    • Outbound e-mail is normally only accepted from an internal network
    • Inbound e-mail is normally accepted from anywhere
    A target address could be refused:
    413 ERR I don't relay for rms@fsf.org
    
    In this case, the destination is not local but the recipient is accepted because I'm inside the local network:
    200 OK Destination rms@fsf.org
    DATA
    200 OK Please send message body
    From: Enrico Zini <enrico@enricozini.org>
    To: Richard Stallman <rms@fsf.org>
    Subject: Hello from Addis
    Date: Mon, 17 Jul 2006 09:49:45 +0300
    Message-ID: <124372643@enricozini.org>
    Hi Richard,
    Addis is a wonderful city, even if
    it rains a lot.
    Bye,  Enrico
    .
    200 OK Message accepted
    QUIT
    200 OK Bye.
    
  3. The SMTP server needs to find out where to send the message, using the DNS:

    $ host -t MX fsf.org
    fsf.org MX 10 mail.fsf.org
    fsf.org MX 20 mail.gnu.org
    
  4. So the SMTP server tries the first one and connects to port 25 of mail.fsf.org:

    HELO smtp.aau.edu.et
    200 OK Hello smtp.aau.edu.et
    MAIL FROM: <enrico@enricozini.org>
    200 OK Mail from enrico@enricozini.org
    RCPT TO: <rms@fsf.org>
    
    The destination is accepted because it's for a local user:
    200 OK Destination rms@fsf.org
    DATA
    200 OK Please send message body
    From: Enrico Zini <enrico@enricozini.org>
    To: Richard Stallman <rms@fsf.org>
    Subject: Hello from Addis
    Date: Mon, 17 Jul 2006 09:49:45 +0300
    Message-ID: <124372643@enricozini.org>
    Received: by mail.aau.edu.et
      on Mon, 17 Jul 2006 09:55:53 +0300
      from 10.4.15.158
    Hi Richard,
    Addis is a wonderful city, even if
    it rains a lot.
    Bye,  Enrico
    .
    200 OK Message accepted
    QUIT
    200 OK Bye.
    
  5. Now, mail.fsf.org will invoke a MDA to write the mail in Richard Stallman's mailbox.

Example of problems with mail handling:
  • Accepting inbound connections:
    • Malicious input:
      • logic errors
      • buffer overflows
      • DoS (Denial Of Service) attacks
      • Connection floods
  • Performing outbound connections:
    • Programming errors:
      • Flooding of connections
  • Performing routing:
    • Unauthorised relays
    • Mail loops
  • Writing to the local hard drive:
    • Filling up the hard drive
    • Writing to the wrong files
  • Writing to the local hard drive as root:
    • In case of error or attack, any file in the system can potentially be compromised
RFC-822 is the original standard for E-mail. RFCs are standard Internet documents. Have a look at RFC documents released the 1st of April.
postfix Common setup: "Internet site with smarthost". More difficult to maintain: "Internet site". A smarthost is a machine that will relay e-mail for you. Questions asked with "Internet site with smarthost":
  • Mail name: aau.edu.et (name used to publicly identify the mail server)
  • Smarthost name: smtp.telecom.net.et (SMTP server that will relay our e-mail)
To test a mail server:
$ telnet localhost 25
HELO me
MAIL FROM: <a@b.c>
RCPT TO: <mail@of.a.local.user>
DATA
hi
.
QUIT
By default, you find locally delivered mail in /var/mail/username. Postfix configuration files:
/etc/postfix/master.cf
configures how all the postfix components run together (man 5 master)
/etc/postfix/main.cf
Main postfix configuration (man 5 postconf)
To rewrite addresses:
  1. In /etc/postfix/main.cf:

    canonical_maps = hash:/etc/postfix/canonical
    
  2. Then in /etc/postfix/canonical you can add the rewrite rules, like:

    enrico   enrico@enricozini.org
    
  3. When /etc/postfix/canonical is modified you need to regenerate the index:

    sudo postmap canonical
    
    (same is when you change the alias file: sudo postalias /etc/aliases)
(see file:///usr/share/doc/postfix/html/ADDRESS_REWRITING_README.html) Manipulating the message queue:
mailq - List the mail queue.
Example:
mailq
postqueue - Postfix queue control
Examples:
# Like mailq
postqueue -p
# Tries to send every message in the queue
postqueue -f
# Tries to send every message in the queue for that site
postqueue -s site
postsuper - Postfix superintendent
Examples:
# Deletes one message
sudo postsuper -d 7C4D2EC0F5D
# Deletes all messages held in the queue for later delivery
sudo postsuper -d ALL deferred
Different mail queues in postfix:
incoming
mail who just entered the system
active
mail to be delivered
deferred
mail to be delivered later because there were problems
hold
mail that should not be delivered until released from hold
Mail logs are in:
/var/log/mail.log
/var/log/mail.err
/var/log/mail.info
/var/log/mail.warn
Mail delivery Mailbox formats:
  • mbox: single file, mail separated by "From " lines
  • maildir: one directory per folder, one file per mail
  • mh: similar to maildir, but not really used
Alternate MDA: procmail: allows to filter mail automatically into different folders. Mail forwarding with ~/.forward: allows to redirect mail to a different address: just put the address you want to send to in the file ~/.forward.
POP or IMAP server Installation:
apt-get install dovecot
Configuration is in:
/etc/dovecot/dovecot.conf
The main thing that is needed is to enable the mail protocols you want:
protocols = imaps
Server monitoring To make all sorts of graphs:
apt-get install munin munin-node
Example: http://munin.ping.uio.no To compute more statistics:
  • anteater
  • isoqlog
  • mailgraph
Monitor system logs: logcheck:
  • sends you mail with abnormal log lines
  • It's important to customize what is normal and you do it with regular expressions
Filtering viruses and spam clamav - Virus scanner Virus scanning:
  • Postfix gives the mail to clamav that scans it and gives it back if it's clean.
  • Strategies for infected mail:
    • silently delete it
    • refuse the mail and send a notification to the sender
    • refuse the mail and send a notification to the receiver
    • quarantine the e-mail
    • refuse delivery with a SMTP error
    • deliver with an extra header that says that it's a virus
spamassassin - Spam filter Spam scanning:
  • Postfix gives the mail to spamd that scans it and gives it back with some spam information.
  • Strategies for spam mail:
    • silently delete it
    • refuse the mail and send a notification to the sender
    • refuse the mail and send a notification to the receiver
    • quarantine the e-mail
    • refuse delivery with a SMTP error
    • deliver with an extra header that says that it's spam
  • New techniques:
    • greylisting: when you receive a mail from a host you've never seen before, refuse it with a temporary error, and accept it the second time (after some time delay). Spammers normally don't retry, and implementing retry would increase their cost of sending e-mail.
    • crossassassin: if more than some amount of your users receive a mail with the same message ID, throw it away. Sending mails with different headers would increase the cost of sending e-mail.
Man pages and sections Man pages are divided in sections:
  • man man shows all the sections of the manpages
  • man 5 postconf shows the postconf manpage in the "configuration file" section
  • Normally manpages are referred as manpage(section) (e.g. postconf(5) )

Erich Schubert: Flow oriented programming?

I've been preparing on my exam on programming and modeling languages. The usual classification of imperative, functional, oop and logic programming is kind of inconsequent, since there are e.g. functional oop languages. To me, oop is more of a software engineering thing, usually applied to imperative programming with a load of syntactic sugar. The usual OOP examples suck. They're so basic that all the OOP and modeling stuff is just a complete waste of time. So I was considering more complex examples, and ended up at common design patterns. A couple of design patterns in OOP seem like workarounds to me; a new language (well, maybe C# has addressed some of these, I don't know) could probably add some more syntactic sugar to ease their use. I hate UML diagrams. To me they just emphasize all the obvious stuff, while they quickly get too complex to be of use for "seeing" the important things. Even UML activity diagrams in my opinion don't properly depict the flow of information/data in the program, which is what I really care about. Activity diagrams basically show you a sequence of methods are being called. But often you'll have a method being called thousands of times, with the actual relevant information being in the parameters passed. And some stuff might be done asynchronously, too. For certain problems (well, not for stuff like e.g. the train door used in OOP examples), it could be much more useful to abstract away from the involved classes - which are often just wrappers for data, "records", "datagrams", tcp packets - and instead model flows of data. Think of drawing conveyor belts transporting data, filtering it, duplicating it, ... The gstreamer framework seems to employ such a model for audio and video processing. You build pipelines by placing e.g. sources and sinks there. But you can interpret dozens of code examples with this model. SAX transform a stream of charaters into a stream of XML nodes. UI mainloops are basically a stream of UI events. Network data obviously is easy to model as a data flow; the "obvious" mapping into "packet objects" however often useless. Even when doing a select on a database, the result has an obvious representation as a data flow (a flow of records in this case). You probably only need a couple of "primitives". Sources and sinks, obviously. Filters, Y and Tee modules. Queues and Caches could be interesting, too. Note that data flows can work in two ways: push and pull. Maybe sometimes the same code could be used for pull and push operations, too. When push and pull driven flows meet you often need threads to connect. For example, a SAX parser usually will pull character data from a stream and push a stream of XML nodes as output. One way to get a pull-able output stream out of this (I'm ignoring e.g. the existing XMLpull API for this example) is to use a cache (which will eventuall contain the whole document as Nodes), another is to use two threads and just block the SAX thread until the other pulling thread has requested another node. Of course you can do all this in existing languages (you know, this doesn't give you anything new beyond turing completeness) - just like you could do OOP in assembler. You can, but it would be nice if the compilers offer you an easier syntax. Also it would be nice if I wouldn't have to write different code for pull-driven and push-driven operation. Also note that push type operation is rather typical for imperative programming languages - for i in range(0,10): print i - whereas pull type operations are typical for "lazy" functional languages - take 3 (repeat 'a').

17 July 2006

Evan Prodromou: 29 Messidor CCXIV

We had a great trip to wt:Mauricie this weekend. It was quite an adventure -- we took off from Montreal on Saturday in the middle of a downpour, with no idea if it was going to clear before we got to the R serve faunique de St.-Maurice. But the rain slowed as we passed through wt:Yamachiche and by the time we were in wt:Shawinigan it was clear. Driving up the beautiful St.-Maurice River is real pleasure, especially when it's freshly-rained-on. The river is wide and slow (I think because of the hydro plant at Shawinigan) and sailboats and houseboats run up and down it. We got to the welcome center for the park too late -- it was closed -- so we had to go across the $12 (!) toll bridge into the reserve on faith alone. Which took a lot, since it's all dirt roads on the other side. It was a beautiful ride, but about 30 bone-jarring kilometers to our final campsite. We entertained the baby by making long aaaaaaaaaah sounds over the grading bumps -- by the end of the ride she was doing it herself. We saw a huge black bear on the way up -- maybe twice my size, long and lanky, loping across the road like it owned the place. Maj's face dropped when she saw it -- she'd never seen a bear before. It was an impressive animal, and it looked like Amita straight-leg crawling. We had a little hassle at the front gate of the Lac Normand campground, but we got settled down OK, put the baby in an insect-proof playpen, and Maj made a great pasta dinner while I put up the tent. I finished up the dishes and Maj and Amita walked down to the beach ("one of the best in Quebec", gushes S paq, and I'm inclined to believe them), and I was just starting a campfire when another storm hit. So we played in the tent for a while and went to sleep. Sunday we had a quick breakfast and headed down to la plage. The lake was beautiful, with a 4-5km sand beach ringing it on the north side. All three of us went for a swim in the water; Amita held onto Maj's back and made motorboat noises. On the drive out we tried to cut across the Parc de la Mauricie and the R serve faunique de Mastigouche to get to wt:Saint-Michel-des-Saints, which is a town in wt:Lanaudi re that I've wanted to visit for a while. But we took a wrong turn at poorly-marked crossroads, and ended up at the safe and sane exit instead. How often does that happen? Drive home was nice, and we had sushi from the Sushi Shop on Mont Royal. The cats were mad, but they always are. tags:

Kerblog Norsola Johnson passed along a link to Mazen Kerbaj's difficult Kerblog. Kerbaj is a expatriate Lebanese musician and comics artist caught in Beirut by the blockade and the destruction of the airport there. Stuck in the city under bombardment, he took the opportunity to start a comics blog. tags:

S3 I wrote about Amazon's crazy S3 (Simple Storage Service), which provides a Web interface for data storage. I was interested to see that Om Malik had an entry about it: StartUps Embracing Amazon S3. I guess it's a cheap and easy way to get a lot of storage when you don't have a lot of time to work on things like getting storage. Does it mean I've gone bad if I read Om Malik? He was a speaker at the Mesh Conference a couple of months ago, and I didn't like his talk. Now, I read his blog daily. Gar. tags:

Oh No Robot I just caught up with the latest Spamusement comic, and saw a "Transcribe This Comic!" link at the bottom. It goes to the fine Oh No Robot comics search and transcription service. I guess the idea is that readers transcribe comics into searchable text. A great idea, and a nice example of user-generated metadata. tags:

MicroID So, when ClaimID asked me to embed a MicroID into my home page to verify it, I thought they were nuts. But I did it anyways. Now, I'm trying to wrap my head around MicroID, and I'm starting to think it's very clever. I dunno... maybe a MediaWiki extension is in order... tags:

A couple of hours later... I dicked around a bit more with MicroID, and made my own MicroID verifier in Python. You're welcome to use it; see Software/Python/MicroID. tags:

Moon language From sneakums on #tron: I cannot speak your crazy moon language from Maciej Ceglowski a nice story about language and life in Montreal. tags:

Next.

Previous.