You are not logged in. Log in now?
News
Dear RITLabs, Revolver Software
You Fail at the Internet
Why is it that your mail clients The Bat! 5 and Revolver Mail 8.3.1 ignore initial IMAP server capabilities and transmit login credentials in the plain without being asked?
By Shadowdancer, 2011-06-30, 17:04;
permalink;
Last updated at 2011-06-30, 17:04 by Shadowdancer
Postfix vs. SASL vs. PostgreSQL Unix Sockets
There is a certain… inelegance to be found when using Unix sockets to have Postfix and Courier communicate with a PostgreSQL database for authentication and other configuration needs. With "good" old TCP/IP sockets, things are rather straightforward since they come with a standardised syntax for host address and port.
Unix sockets are for all configuration purposes file system paths, and both Courier and Postfix make rather badly documented and most of all bad assumptions.
The basic tenor is that you put a base path as the hostname. On some systems, that will be /var/run/postgresql, on chrooted Postfix installations as configured by Debian you will need to make it /var/spool/postfix/var/run/postgresql. Postgres will create a file in there called something like .s.PGSQL.5432, where 5432 is the port. It is the port everyone assumes! If you have your DB cluster running somewhere else, things get creative.
For Courier's authpgsqlrc, things are relatively straightforward (and even correct), if hard to find:
PGSQL_HOST /var/spool/postfix/var/run/postgresql PGSQL_PORT 5433
In Postfix's little world however, things suddenly become completely undocumented, and even worse, potentially broken in the nicely spread out configuration files:
hosts = unix:/var/run/postgresql/:5433
Luckily Cyrus SASL can be completely avoided, because no matter what syntax I threw at it, there was no way to make it work with Unix sockets.
How It Really Works
The way to pass socket addresses to Postgres could actually be done all unified and simple. Looking at the relevant DB connection documentation shows that the library expects a connection string formatted like
… host=something port=5432 …
so it is just a number of key=value pairs. The library distinguishes hostnames from socket names by a leading slash (sockets have one). So, guess what, no magic is needed assuming a sane implementation allowing you to pass separate host and port parameters. All you need to do is pass an absolute path instead of a hostname, and the normal numeric port value. The library will correctly expand that to the full socket path.
This effectively means some documentation is just plain wrong, some is misleading, and some is sadly correct by omission.
Intermediate Conclusion?
What would be the take-away message here? "Don't use the efficient way because we couldn't be arsed to implement and document it in a sane way"?
Circular Confusion
Then came a migration from Courier to Dovecot (Sieve support is totally worth it!), which meant changing the transport mechanism from maildrop to Dovecot's "deliver" LDA. This was done with Spamassassin integration, so Postfix does not pipe mails through deliver, but instead passes them on to spamc, which in turn forwards them to the LDA (one way to do it is shown here, my configuration is a bit more intricate since I opted for the overkill of supporting per-virtual-user Spamassassin configuration and proper support of local address extensions).
Fun enough, after adding that to the Postfix configuration, suddenly mail.log showed complaints that "pipe" could not access the DB table containing the transports (why it needs them is beyond me, but there you go).
This happens because the pipe cannot be run chroot like the rest of postfix, but there's no Postgres socket in the OS root. The simple but ugly solution:
/var/spool/postfix/var/spool/postfix -> ../../
this means you can point Postfix's entire DB configuration at the chroot path (/var/spool/postfix/var/run/postgresql) whether parts run chroot or not.
By Shadowdancer, 2011-06-16, 15:32;
permalink;
Last updated at 2011-06-27, 12:43 by Shadowdancer
Just Think About It
eval | 65 76 61 6c ^ evil | 65 76 69 6c = ···· | 00 00 08 00
That's only a single bit. Coincidence? Maybe, but it's better not to take the risk.
By Shadowdancer, 2011-03-11, 16:46;
permalink;
Last updated at 2011-03-11, 16:47 by Shadowdancer
Liebe Öffentlich Rechtliche
Videospiele sind böse, wir wissen es langsam. Der folgende Text ging an die Redaktion von Planet Schule:
Sehr geehrte Damen und Herren,
Zu Ihrer Sendung "Gewalt spielen - Jugendliche und ihre Computerspiele" kann ich nur den Kopf schütteln, und das ist höflich ausgedrückt.
Muss ich mir wirklich zum Frühstück anhören, dass mein Hobby ein Randgruppen-Phänomen gewaltbereiter Jugendlicher ist, die durch die Fußgängerzonen maraudieren und wehrlose Mitbürger attackieren? Muss ich es mir wirklich bieten lassen, dass die "Berichterstattung" unter völliger Ignoranz der eigentlichen Inhalte stattfindet? (Max Payne ein Erlebnis wiederkehrender Gewaltfantasien? Wirklich? Meiner Meinung nach handelt es sich dabei um einen durchaus kompetent geschriebenen Psycho-Thriller, der nebenbei bemerkt mit der entsprechenden Altersfreigabe veröffentlicht wurde. Es würde helfen, wenn sich zumindest die direkt verantwortlichen Redakteure minimal mit der Materie beschäftigen würden, anstatt das Parteiprogramm der konservativen Elemente der CSU zu verlesen.)
Aus unerfindlichen Gründen hat es ein großer Teil meines Freundeskreises, die alle den ach so bösen Videospielen ausgesetzt waren, zum Akademiker gebracht. Keiner hat das Schicksal der von Ihnen beschrienen Verrohung erlitten, keiner ist straffällig geworden, und ich kenne keinen solchen Fall auch nur indirekt. Die Wahrheit ist doch, dass die absolute Mehrheit der "Spieler" (zumindest die ohne eine ohnehin vorliegende Persönlichkeitsstörung) ganz normale Menschen sind, die ihren Teil zur Gesellschaft beitragen.
Diese permanente Polemik-Berieselung in den Medien ist offen gesagt zum Kotzen. Sie tragen mit solchen Schund-Produktionen im besten Fall dazu bei, die Ignoranz Ihres Publikums zu fördern und eine Atmosphäre der Angst um "neue Medien" zu produzieren. Ich möchte Sie bitten, in Zukunft auf diese Art der Verhetzung zu verzichten, und zumindest im Grundsatz den Willen zur Recherche zu zeigen.
Die Freundlichkeit der Grüße erspare ich mir aus gegebenem Anlass.
Grüße, (Ich)
By Shadowdancer, 2011-02-08, 14:07;
permalink;
Last updated at 2011-02-08, 14:10 by Shadowdancer
Zur Transportsicherheit von Nuklearem Material
Gestern ist ein Castor-Behälter auf dem Weg von Frankreich nach Lubmin ca. einen halben Kilometer an meiner Arbeisstätte vorbeigerollt. Das ging natürlich schwer gesichert von sich, auf dem Weg zur Arbeit kamen mir mehrere Konvois von Innenfaschismus Grün-Blau e.V. entgegen, die dann gegen keinerlei nennenswerte Protestaktionen vorgegangen sind.
So weit, so anormal; es ist ja noch verständlich, dass wir Pfandstäbe aus Forschungsreaktoren und Schiffen zurücknehmen.
Heute Morgen bin ich dann auf der A6 im Autobahn-Kreuz Landstuhl an zwei Sattelschleppern mit langen Druckbehältern auf offener Ladefläche vorbeigekommen. Im Vorbeifahren habe ich drei Merkmale Festgestellt:
- Orange Gefahrguttafel ohne Angaben
- Gelbes GK-Kennzeichen "radioaktiv"
- UN-Nummer 2978
- Aufschrift "Uranium (irgendwas)ide".
Man möge mich paranoid nennen, aber wenn zur Anreicherung von Uran verwendetes, hochgradig giftiges und reaktives Material neben einem Castor herfährt, dann glaube ich nicht ganz an einen Zufall.
Wenn das komplett ungeschützt im morgendlichen Berufsverkehr geschieht, dann ist das ungerechtfertigter Leichtsinn.
By Shadowdancer, 2010-12-16, 14:05;
permalink;
Last updated at 2010-12-16, 14:06 by Shadowdancer
Filtermaßnahme wegen JMStV
Da die Neufassung des Jugendmedienschutz-Staatsvertrag (anscheinend ausgearbeitet vom Arbeitskreis "ahnungslose Vollidioten") vorsieht, dass Web-Angebote mit einer leicht auslesbaren Altersgrenze versehen sind, werde ich alle Angebote, die für Besucher unter 18 Jahren geeignet sind derart kennzeichnen, dass ein HTTP-Header X-Deutschland-Ist-Scheisse gesetzt wird. Entsprechend würde ein Header für einen "ab 16" geeigneten Inhalt so aussehen:
X-Deutschland-Ist-Scheisse: 16
Alle Inhalte ohne dieses Merkmal sind ausdrücklich nur für Personen geeignet, die das 18. Lebensjahr vollendet haben, was leider die Mehrheit der deutschen Legislative aufgrund zu geringer geistiger Reife ausschließen dürfte.
Das ist jedenfalls leicht auswertbar. Viel Spass beim Filtern.
By Shadowdancer, 2010-11-30, 16:21;
permalink;
Last updated at 2010-12-15, 15:08 by Shadowdancer
Slapdash Analysis of Postfix Mail Log
Here's a quick one-liner to generate statistics about how often hosts from certain countries tried to deposit mail without having proper (reverse) DNS entries:
sed -n -e 's/.*NOQUEUE:.*from unknown\[\([0-9.]\+\)\].*/\1/p' mail.*| \
xargs -l geoiplookup| \
awk -F, '{print $2.trim}'| \
sort | uniq -c | sort -rnk1
The output looks something like this snippet, based on logs from July 21 to August 5 on my mail server:
| Freq. | Country |
|---|---|
| 1374 | India |
| 1089 | Vietnam |
| 842 | Brazil |
| 733 | United States |
| 650 | Korea |
| 644 | China |
| 621 | Russian Federation |
| 537 | Indonesia |
| 374 | Romania |
| 333 | Colombia |
Germany comes in 33rd.
By Shadowdancer, 2010-08-05, 16:55;
permalink;
Last updated at 2010-08-05, 16:58 by Shadowdancer
Considering Harmful: Considered Stupid
I get it, "X considered harmful" is a nice meme. It has a big name behind it, every nerd worth its salt knows where it comes from, and for once it does not immediately reek of bad grammar.
That does not mean that just because you think something might be bad sometimes, you have to slap "considered harmful" at the end of it and write a blag post about it; most of the time, that just makes you look like a pompous ass. It will not get you published in the Communications of the ACM–that would require proper research–, and all you do is pollute the Web a little bit more, bringing up your inane ramblings when someone looks for real information on X.
So please, when you have to criticise something, stop thinking in headlines. Maybe "X may corrupt the heap", "X can make your source repository inconsistent", or "X may be trying to abduct your children in a white van with Ice Cream smeared on the sides" would make a better match for what you are trying to say.
By Shadowdancer, 2010-08-01, 16:55;
permalink;
Last updated at 2010-08-01, 16:56 by Shadowdancer
Bye Bye, ICQ!
Since ICQ by now seems to be only Russian spam, and the service will likely be sold to a criminal organisation, I will cease using ICQ on April 30, 2010. I will still be reachable via Jabber and MS Live Messenger. Please ask me for contact details via IM or mail.
Und jetzt auf Deutsch...
Da ICQ mittlerweile nur noch aus Russischen Spam zu bestehen scheint, und der Dienst demnächst an eine kriminelle Vereinigung verkauft wird, werde ich die Nutzung von ICQ zum 30. April 2010 einstellen. Ich bin weiterhin erreichbar per Jabber und MS Live Messenger. Die Kontaktdaten gebe ich gerne per IM oder Mail raus.
By Shadowdancer, 2010-04-10, 14:29;
permalink;
Last updated at 2010-04-10, 14:29 by Shadowdancer
Trick Question
Q: What do you get when arrogance, fraud, ignorance, and incompetence are having an orgy?
A: GOA
By Shadowdancer, 2010-03-05, 11:35;
permalink;
Last updated at 2010-03-05, 11:35 by Shadowdancer