Modalità di lettura

daemontools

daemontools è una collezione di strumenti per gestire servizi UNIX. Monitora i servizi di qmail e salva i messaggi di errore in uno o più logs.

Changelog

  • Jan 5, 2026 (v0.83)
    This release doesn't add any new feature nor fixes any bug or issue. It just simplifies the installation by leaving the sources where the user wants them, installing the commands in the /command directory and creating a symbolic link in /usr/local/bin. From now on there's no daemontools directory in /var/qmail anymore.
  • Sep 30, 2025 (v0.82)
    - Fixed crash in multilog caused by invalid buffer access when read() returned -1 ea3abe9
  • Sep 8, 2025 (v. 0.81)
    - compiles with latest gcc 15.2
  • Aug 3, 2025
    - multilog prints a readable datetime in milliseconds if used with "m" flag (thanks squidvisa)
  • Mar 19, 2025 (v. 0.79)
    This version does not add new features nor corrects bugs. It's just a reorganizations of the files in the source dir
    - daemontools will be installed in /var/qmail/daemontools
    - Moved 'package' and 'src' to the top dir
    - Version grabbed from 'VERSION' in package/upgrade
  • Feb 9, 2025 (v0.78.4)
    - several adjustments to get clang version 18.1.6 compatibility
    - restored !/bin/sh in all scripts
  • Oct 14, 2024 (version 0.78.3)
    - all package/ scripts now run the bash shell
    - package/run script will recognize if we are in an lxc container to skip inittab configuration
    - package/run.rclocal will find both /etc/rc.local /etc/rc.d/rc.local
    - daemontools-0.78.2 directory renamed to daemontools
  • Oct 9, 2024
    - added -ltr to conf-ld to restore compatibility with systems with glibc prior to v. 2.17 like RHEL6/CentOS6, where the librt.so library is not linked
  • Oct 10, 2024
    - version 0.78.1: added package/compile which was missing again! (tx Bai Borko)
  • Sep 6, 2024
    - fixed a .gitignore issue which was preventing the package/compile script upload (thanks Ivelin Topalov)
  • Jul 29, 2024 (version 0.78)
    - multilog prints a readable datetime if used with "d" flag, it prints timestamps if used in the usual way with the "t" flag (80f2133)
    - fixed several compilation warnings and/or breaks on gcc-14.1
  • Dec 9, 2023
    -moved my patched daemontools to github and called 0.77 the new version
    -clear service moved to qmail/supervise/clear

  •  

Spamassassin TxRep Reputation plugin e filtro Bayesiano (SQL)

TxRep was designed as an enhanced replacement of the AutoWhitelist plugin. TxRep, just like AWL, tracks scores of messages previously received, and adjusts the current message score, either by boosting messages from senders who send ham or penalizing senders who have sent spam previously. This not only treats some senders as if they were whitelisted but also treats spammers as if they were blacklisted. Each message from a particular sender adjusts the historical total score which can change them from a spammer if they send non-spam messages. Senders who are considered non-spammers can become treated as spammers if they send messages which appear to be spam. Simpler told TxRep is a score averaging system. It keeps track of the historical average of a sender, and pushes any subsequent mail towards that average.

The Bayesian classifier in Spamassassin tries to identify spam by looking at what are called tokens; words or short character sequences that are commonly found in spam or ham. If I've handed 100 messages to sa-learn that have the phrase penis enlargement and told it that those are all spam, when the 101st message comes in with the words penis and enlargment, the Bayesian classifier will be pretty sure that the new message is spam and will increase the spam score of that message.

In pratica Bayes è un classificatore statistico: guarda i token (parole, header, URL, ecc.) e calcola la probabilità che il messaggio sia spam senza interessarsi di chi manda, ma solo del contenuto.

Invece TxRep tiene traccia della reputazione del mittente (indirizzo email + IP).


Changelog

  • 18 agosto 2025: aggiunte parecchie informazioni alla sezione "Addestramento del sistema bayesiano"

  •  

Installazione di Dovecot e sieve su qmail + vpopmail

Changelog

  • Nov 24, 2025
    - dropped 'enforce = no' from 90-quota.conf to enforce quota limits (commit)
  • Nov 22, 2025
    - quota driver switched to 'count' (commit). 'count' is the recommended way of calculating quota on recent Dovecot installations.
  • Oct 30, 2025
    - dovecot ugraded to v. 2.4.2
  • Mar 29, 2025
    - dovecot updated to v. 2.4.1-4
  • Mar 15, 2025 (config version 2.4.0.1 diff
    - Added quota warnings feature. Improved quota configuration in 90-quota.conf (more info here)
    - Configured auth-master.conf.ext and auth-deny.conf.ext. To be included from local.conf
  • Mar 9, 2025
    - fixed quota calculation in sql queries (tx Hakan Cakiroglu)
  • Feb 22, 2025
    - Bug fix in 90-sieve.conf: global script to move spam into Junk now working
    - Bug fix in move-spam.sieve: erroneously matches "YES" if "BAYES" is in the header
  • Feb 15, 2025
    - added support for vpopmail configured with --disable-many-domains
    - 90-sieve.conf: global script move-spam.sieve called correctly
  • Feb 8, 2025
    - dovecot_postlogin.sh: query changed in order to add new records as well (tx Bai Borko)
    - bug fix: pop3 service was executing imap instead of pop3 (tx Gabriel Torres)
  • Jan 29, 2025
    - dovecot upgraded to v 2.4.0. Old configuration files are not valid anymore and you have to install dovecot from scratch.
  • Nov 15, 2024
    - added a postlogin script to update the vpopmail.lastauth SQL table on login (see 10-master.conf, thanks kengheng)
  • Dec 29, 2023
    default_pass_scheme = SHA512-CRYPT (was MD5-CRYPT) in dovecot-sql.conf.ext, as vpopmail-5.6.x has now SHA512-CRYPT password by default
  • Feb 10, 2023
    - added a patch to restore the old vpopmail-auth driver (tx Ali Erturk TURKER)

  •  

Codice sorgente spostato su github

Per mia comodità di lavoro, ho spostato il codice sorgente di daemontools, qmail, vpopmail, qmailadmin e simscan su github. Da ora in avanti, invece dui rilasciare nuove patch di questi programmi pubblicherò un pacchetto sulla piattaforma github, che sarà linkato da qui. Ciononostante questo spazio web rimarrà il posto ove reperire le informazioni ed eventualmente chiedere supporto. Noterete che gli "issues" nel mio spazio github sono disabilitati, poichè vorrei centralizzare qui le discussioni.

vpopmail sarà scaricato da https://github.com/brunonymous/vpopmail. Questi ragazzi francesi hanno fatto un enorme lavoro rilasciando una nuova versione di vpopmail che include moltissime patche, tra cui le mie. Cosa più importante, hanno ripulito e corretto il codice, e aggiunto diverse funzionalità che potete vedere nel changelog.

GitHub logo

  •  

Configurare il Sender Rewriting Scheme (SRS) su qmail

SPF è in conflitto con il reindirizzamento delle email. SRS è un metodo che consente di risolvere questo problema mediante la riscrittura degli indirizzi email.

NB: Se si è effettuata 'configurazione rapida' basata sullo script config-all, il sistema SRS è stato già configurato. E' solo necessario tener presente  che il dominio srs_domain coincide con il dominio in control/me domain, ovvero il nome della propria MTA.

Configurazione

Configurare srsfilter in modo tale che il programma sia lanciato ogni qual volta viene ricevuto un messaggio per l'utente srs:

echo "| /var/qmail/bin/srsfilter" > /var/qmail/alias/.qmail-srs-default

Quindi creare e configurare un dominio virtuale da usare esclusivamente per l'SRS. Si tenga presente questo dominio virtuale non deve essere creato, come siamo abituati a fare, dal programma vadddomain, poichè esso ha il solo scopo di lanciare srsfilter attraverso l'account fittizio alias/.qmail-srs-default che abbiamo creato prima. Notare la  differente sintassi di questa linea nel file virtualdomains rispetto ai domini virtuali regolari:

echo srs.mydomain.tld:srs >> /var/qmail/control/virtualdomains

Quell'srs dopo i due punti : sarà usato da qmail-local come un prefisso negli indirizzi locali associati a srs.mydomain.tld e sarà gestito da .qmail-srs-default, dal momento che nessun altro utente srs esiste. Per esempio:

2023-06-20 22:55:51.265166500 starting delivery 62: msg 32560286 to local srs-SRS0=jiQ3=CI=gmail.com=sender@srs.mydomain.tld

Fare riferimento alla "bibbia" Life With Qmail per comprendere meglio la logica sottostante, specialmente per quanto concerne i concetti relativi a virtual domains, aliases, .qmailextensions addresses.

Aggiungere srs.mydomain.tldrcpthosts di modo che qmail-smtpd sappia che deve spedire localmente i messaggi per quel dominio. Non aggiungerlo al file control/locals altrimenti il file virtualdomains sarà ignorato e srsfilter non verrà lanciato.

echo srs.mydomain.tld >> /var/qmail/control/rcpthosts

Porre srs.mydomain.tld nel file srs_domain, di modo che srsfilter lo utilizzi nella riscrittura degli indirizzi per tutti i domini virtuali. Creare anche il file srs_secret. E' una stringa casuale che serve a generare e controllare gli indirizzi SRS.

echo srs.mydomain.tld > /var/qmail/control/srs_domain
echo "xxxxxxxxxxxxxxxxxxxxxx" > /var/qmail/control/srs_secrets

Queste sono le uniche impostazioni obbligatorie; vedere i link in testa a questa pagina per avere informazioni riguardanti gli altri parametri che è possibile impostare.

Naturalmente è necessario dotare, nel proprio DNS, il dominio srs_domain appena creato di un record MX valido e anche di un record SPF come il seguente:

srs.mydomain.tld. IN TXT "v=spf1 a mx -all"

E' anche necessario configurare i record DKIM e DMARC per il dominio srs.mydomain.tld. Questo per soddisfare le politiche di google, che è uno dei provider più stringenti.

Inoltre, dovremmo aver già creato un analogo record SPF anche per il dominio che compare in control/me. Se non lo si è ancora fatto, sarà bene farlo ora.

Possiamo ora riavviare qmail e testare il nostro sistema SRS.

  •