1988 – 1998 – 2007

1988: Η Εθνική Ελπίδων παίζει στον τελικό του Πανευρωπαϊκού Πρωταθλήματος και χάνει από τη Γαλλία του Καντονά. Ομολογώ πως από εκείνη την ομάδα θυμόμουν τον Καρασαββίδη (ποιος μπορεί να ξεχάσει τα 5 γκολ του απέναντι στην Ολλανδία) και τους Σαββίδη, Σοφιανόπουλο και Μολακίδη επειδή τους πήρε ο Ολυμπιακός. Σωστά όμως θυμίζει η Καθημερινή πως το μεγαλύτερο όνομα που ανέδειξε εκείνη η ομάδα ήταν ο Αλεξανδρής.

1998: Η Εθνική Ελπίδων παίζει στον τελικό του Πανευρωπαϊκού Πρωταθλήματος και χάνει από την Ισπανία. Θυμάμαι καλά αυτή την Εθνική. Είχα ρωτήσει (αφελώς) τον Καραγκούνη σε ένα αεροδρόμιο:

Γ. Ποια Εθνική είστε παιδιά;
Κ. Ελπίδων ποδοσφαίρου.
Γ. Από φιλικό έρχεστε ή από επίσημο;
Κ. Από φιλικό.
Γ. Και;
Κ. Χάσαμε.
Γ. Ε δε πειράζει φιλικό ήταν.
Κ. Τι λε ρε φίλε! Χάσαμε!

2007: Αυτό το “Τι λε ρε φίλε! Χάσαμε!” -για φιλικό αγώνα- είναι τα EUR 0.02 μου για τα παιδιά που χάσανε από την Ισπανία.

re: Κάθε βοήθεια δεκτή

Το blog Ανακύκλωση_τώρα_ ζητά τη βοήθειά μας:

Αυτό το post είναι μια παράκληση για όσους ενδιαφέρονται να βοηθήσουν σε αυτό το blog, ας αφήσουν εδώ το σχόλιό τους ώστε να τους προσθέσω και να μπορούν να αναρτούν άρθρα.”

Όποιος νομίζει πως έχει να συνεισφέρει περιεχόμενο για αυτή την προσπάθεια, ας επικοινωνήσει με τον συντονιστή της.

My EUR 0.02.

(In-Reply-To:)

milter-dnsbl

Sendmail administrators using FEATURE(dnsbl) may have noticed that ruleset check_rcpt is executed after all connected milters have executed the corresponding xxfi_*() routines.

Wouldn’t it be better if a milter (in fact the first in order) could block a connection based on a list of DNSBLs?

That is why I wrote my first milter, milter-dnsbl (download). milter-dnsbl has no configuration file; on startup it takes a number of arguments that allow you to specify a number of DNSBLs, plus whitelists published via DNS, or based on the domain name of the connecting host. It requires a running lwresd(8) which it uses as a caching server. Read the manpage that comes with the source code distribution.

milter-dnsbl is distributed with an OpenBSD-style license and has been tested on an Ubuntu 6.06 i386 server.

graymilter with DNS based whitelists support – part 3

In part 2 we saw a simple way of whitelisting domain names in Jef Poskanzer’s graymilter. However, this is a solution that does not scale well enough for busy mail systems. Adding or removing a domain from the whitelist means recompiling graymilter which is not the most convenient thing, especially if one needs to do it (over and over) on multiple mail servers.

Wouldn’t it be easier if you could update only one file and have the information distributed to all mail servers? One way of doing this is by using rbldnsd:

“rbldnsd is a small and fast DNS daemon which is especially made to serve DNSBL zones. This daemon was inspired by Dan J. Bernstein’s rbldns program found in the djbdns package.”

Normally people use rbldnsd for publishing blacklists, but this should not stop you. After all you only need to publish a list. Whether it is a blacklist or a whitelist depends on how the program that consults it decides upon the information it gets. I start rbldnsd as follows:

/usr/sbin/rbldnsd -p /var/run/rbldnsd.pid -r/var/lib/rbldns -b1.2.3.4 \\
whitelist.tee.gr:combined:whitelist.tee.gr.txt

And assuming that I want to enlist the domains example.com, example.net and example.org, whitelist.tee.gr.txt looks like this:

; It is declared as a combined zonefile when rbldnsd statrs
$DATASET dnset: @
.example.com
.example.net
.example.org

The next step is to patch graymilter so that it consults a nameserver. While we are at it why not use lwresd?

“[lwresd] provides resolution services to local clients using a combination of a lightweight resolver library and a resolver daemon process running on the local host. These communicate using a simple UDP-based protocol, the “lightweight resolver protocol” that is distinct from and simpler than the full DNS protocol.

To use the lightweight resolver interface, the system must run the resolver daemon lwresd or a local name server configured with a lwres statement.

The lwresd daemon is essentially a caching-only name server that responds to requests using the lightweight resolver protocol rather than the DNS protocol. Because it needs to run on each host, it is designed to require no or minimal configuration. Unless configured otherwise, it uses the name servers listed on nameserver lines in /etc/resolv.conf as forwarders, but is also capable of doing the resolution autonomously if none are specified.”

Now using the lwres(3) interface we can write a query function that consults the domain name whitelist that we serve via rbldnsd:

#ifndef _TEE_CHECKS_C_
#define _TEE_CHECKS_C_ 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lwres/lwres.h>
#include <lwres/netdb.h>
static int
tee_check_domain(char *host, char *whitelist)
{
        char *name;
        int l, herr;
        struct hostent *he;
        l = strlen(host) + strlen(whitelist) + 1;
        name = (char *)malloc(l);
        if (name == NULL) {
                syslog(LOG_INFO, "tee_check_domain(): malloc() error: aborting");
                return(0);
        }
        memset(name, '\0', l);
        sprintf(name, "%s%s", host, whitelist);
        /* syslog(LOG_INFO, "tee_check_domain(): %s", name); */
        he = lwres_getipnodebyname(name, AF_INET, 0, &herr);
        if (he == NULL) {
                free(name);
                if (herr == HOST_NOT_FOUND) {
                        return(1);
                } else {
                        return(0);
                }
        }
        lwres_freehostent(he);
        free(name);
        return(0);
}
#endif /* _TEE_CHECKS_C_ */

and again after line 680 of graymilter.c (assuming graymilter-1.26):

if (tee_check_domain(connhost, ".whitelist.tee.gr") == 0) {
  syslog(LOG_INFO, "accepting host %s from whitelist", connhost);
  return SMFIS_ACCEPT;
}

After you run ./configure you have to add -llwres to the generated Makefile.

So there, now rbldnsd distributes your domain name whitelist and you have local caching at every mail server with the help of lwresd.

(part 2) (final)

Ζηλεύω

Διαβάζω στο “Weblocks – A Common Lisp web framework“:

“A few months ago I quit my job to do things I always wanted to do. One of them is writing a web application framework in Common Lisp.”

Ζηλεύω.

“I didn’t use UCW because of a serious attack of a Not Invented Here syndrome.”

Μερικές φορές σκέφτομαι πόσες εργατώρες έχουν χαθεί άραγε από την εγωιστική(;) αυτή συμπεριφορά που δείχνουμε σαν προγραμματιστές, το “εγώ μπορώ να το κάνω καλύτερα” (και σε λιγότερο χρόνο).

Από την άλλη αυτό το πράγμα (η τριβή με τον κώδικα) δεν είναι που μας κάνει καλύτερους; Το να ξεπεράσουμε το κατασκεύασμα κάποιου άλλου και να το αντικαταστήσουμε στην εφαρμογή μας με κάτι δικό μας; Έτσι τελικά δεν καταλήγουμε και στα εργαλεία και τις βιβλιοθήκες που χρησιμοποιούμε για software development; Αναγνωρίζοντας τη μαγκιά^Wικανότητα και το χρόνο που δαπάνησε κάποιος πριν από εμάς για να κάνει κάτι που χρειαζόμαστε και δεν έχουμε το χρόνο (ή ακόμα και τα skills) να αναπτύξουμε μόνοι μας;

Και το ποιο σημαντικό:

“Why? I suppose the same reason why George Leigh Mallory wanted to climb Mount Everest – because it’s there.”

%$#!^$@

Ζηλεύω.

ΤΣΜΕΔΕ #2

Αριθμός #377. Μέσος χρόνος αναμονής 42 λεπτά.

Fast forward 1 ώρα και 10 λεπτά:

– Αχ, άδικα περιμένατε σε αυτή την ουρά. Πρέπει να πάτε στον ημιόροφο.
(κλαψ, λυγμ, σπαρακουάκ!)

40 λεπτά μετά είχα τελειώσει. Συνεχίζω να εκπλήσσομαι.

(previously on ΤΣΜΕΔΕ) (next episode)

comment bankruptcy

Ενώ άλλοι έχουν πρόβλημα email bankruptcy, εγώ έχω το αντίστοιχο πρόβλημα με τα comments*. Αν χάσεις το ρυθμό σου μια μέρα στο σβήσιμο των comments που μάρκαρε το Akismet, γίνεται πάρτυ. 150001500+ έσβησα με ένα click χωρίς να τα δω (comment spam ενός μήνα περίπου).


[*] – Και που να είχε αυτό το blog αναγνωσιμότητα σαν αυτή του Scoble.