Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre qmail

Nothing Ever Really Goes Away On The Internet: ra-plugins

I us­ed to ma­na­ge a lar­ge num­ber of QMail ins­ta­lla­tion­s. And be­cau­se Qmail was ... weird­ly li­cen­s­e­d, I wro­te a set of plu­gins that ran on top of a pa­tch ca­lled Qmai­l-S­PP. I pre­tty mu­ch sto­pped doing that years ago be­cau­se li­fe took me in other di­rec­tion­s, and for­got all about it.

That co­llec­tion is ca­lled ra-­plu­gins and I had not tou­ched it sin­ce la­te 2008.

And to­da­y... I got a pa­tch wi­th two who­le plu­gins to add to it so that it makes Qmail hand­le email addres­ses mo­re like Gmail does (a­lia­ses using use­r+­foo and making use­r.­foo the sa­me as user­foo).

So, I got the­m, added the­m, fixed a few sim­ple buil­ding is­sues, up­dated the libs­m­tp it uses in­ter­na­lly for one of the plu­gins to a la­ter ver­sio­n, and the­re it sta­ys, perhaps not to be tou­ched un­til 2018.

Feliz cumpleblog para mí!

To­do em­pe­zó en ad­vo­ga­to don­de se lo pue­de leer aún hoy! (Por fa­vor léan­lo acá ;-)

Des­pués cam­bió a Py­D­S, una pla­ta­for­ma de blog py­thon de es­cri­to­rio con in­ter­fa­ce we­b, y hos­tea­do en Py­CS, un ser­vi­cio gra­tui­to.

En­ton­ces Py­CS se mu­rió, y em­pe­cé a ge­ne­rar un blog es­tá­ti­co hos­tea­do en el hos­ting gra­tis de mi IS­P. Eso era una ba­zo­fia.

Des­pués fun­dé mi pro­pia com­pa­ñía, tu­ve mis pro­pios ser­ver­s, y em­pe­cé a hos­tear­lo allí (¡Aún hoy es­te blog es HT­ML com­ple­ta­men­te es­tá­ti­co! ¿No se no­ta, no­?)

En­ton­ces Py­DS em­pe­zó a fun­cio­nar ma­l, y es­cri­bí mi pro­pio so­ftwa­re, que es una por­que­ría, tal vez 25% ter­mi­na­do pe­ro ha­ce las co­sas exac­ta­men­te co­mo yo quie­ro.

Ho­y, es­te blog es­tá agre­ga­do en Pla­ne­ta PyA­r, Pla­net Py­tho­n, Pla­net Qt, Pla­ne­ta LU­GLI, Y al­gún otro lu­ga­r.

Es­te año de­ci­dí ha­cer que sea bi­lin­güe (in­glés y es­pa­ño­l) pe­ro odio tra­du­cir­lo (lo es­cri­bo pri­me­ro en in­glé­s).

De acuer­do a las es­ta­dís­ti­cas dis­po­ni­ble­s, es, en pro­me­dio, más po­pu­lar que nun­ca (pe­ro mis pos­ts mas po­pu­la­res son vie­jo­s).

stats

És­tas son las pá­gi­nas más po­pu­la­res del úl­ti­mo año:

Lec­cio­nes:

  1. Ne­­ce­­si­­to es­­cri­­bir más so­­­bre Qt y/o em­­pe­­zar fla­­mes con gen­­te que es­­cri­­be so­­­bre IT.

  2. Ne­­ce­­si­­to bus­­car el ma­­te­­rial ob­­so­­­le­­to y po­­­ner no­­­ta­s.

  3. Te­­ner tu pro­­­pio ho­s­­ting y so­­­ft es me­­jo­­­r.

  4. 10 años es mu­­cho tie­m­­po: 860 po­s­­ts (o 913, de­­pen­­de co­­­mo los cuen­­te)

New qmail plugin idea: overload

But then you start seeing how your "not pre­pro­ce­ss­e­d" queue star­ts gro­win­g, and gro­win­g...

This can al­so mean things like cla­mav or spa­ma­ssas­si­n, whi­ch need to che­ck the mail be­fo­re it ge­ts queued are not kee­ping up wi­th the mail flo­w, or ma­y­be so­me IO per­for­ma­ce is­sue.

But what can you do ri­gh now to fix it?

We­ll, you can di­sa­ble spa­ma­ssas­si­n, or, in ex­tre­me ca­ses, shu­tdo­wn SM­TP so the sys­tem has a chan­ce to ca­tch its brea­th so to speak.

Of cour­se, clo­sing SM­TP means your own users can't send email ei­the­r, whi­ch su­cks.

Now the­re is a li­gh­ter al­ter­na­ti­ve: shu­tdo­wn SM­TP for tho­se who are not your user­s.

He­re's the tri­vial co­de, im­ple­men­ted as a SPP plu­gi­n:

#!/bin/dash

if [ -f /var/qmail/control/overloaded ]
then
      if [ -z "$SMTPAUTHUSER" ]
      then
              echo R451 Temporary Failure: Server overload
              echo overload: $PPID Temporary Failure: Server overload >&2
      fi
fi

And if you are da­ring and want to make your sys­tem se­l­f-­co­rrec­tin­g, ma­y­be you should cron so­me­thing like this:

* * * * * if [ `qmail-qstat  | tail -1 | cut -d: -f2` -gt 100 ];\
then touch /var/qmail/control/overloaded ;\
else rm -f /var/qmail/control/overloaded; fi

I wi­ll pro­ba­bly co­de it again in C and make it part of ra/­plu­gin­s.

¡Qmail en el dominio público! ¡¡¡Genial!!!

Eso sig­ni­fi­ca que pue­de ha­ber un ver­da­de­ro pro­yec­to de co­mu­ni­dad pa­ra in­te­grar to­dos los par­ches que an­dan flo­tan­do!

Eso sig­ni­fi­ca que qmail no va a ser una por­que­ría sin ne­ce­si­dad de tra­ba­jo ma­nua­l!

Es­toy cho­cho con es­to :-)

Si usas qmail: lee esto

  • Mi plu­­gin más útil es pro­­­ba­­ble­­men­­te ip­­th­­ro­­­ttle, que pue­­des usar pa­­ra ha­­cer que IPs an­­sio­­­sos no se co­­­ne­c­­ten tan se­­gui­­do.

  • La ve­r­­sión ac­­tual en SVN pue­­de au­­to­­­blo­­­quear es­­tos IPs por un pe­­río­­­do co­n­­fi­­gu­­ra­­ble si usas ip­s­vd, que es co­­­mo tcp­­se­r­­ve­­r, pe­­ro mu­­cho me­­jo­­­r.

  • Rea­l­­men­­te ne­­ce­­si­­to ayu­­da pa­­ra pro­­­bar la ve­r­­sión en SVN, que de­­be­­­ría ser mui­­cho, mu­­cho, mu­­cho me­­jor que los re­­lea­­ses ac­­tua­­le­s.

  • El re­­po­­­si­­to­­­rio SVN es­­tá en google­­co­­­de


Contents © 2000-2023 Roberto Alsina