Vista elenco

Installare un certificato Let's Encrypt per i server qmail e dovecot

7 Agosto 2026 ore 05:00

Changelog

  • 25 luglio 2026 (v. 4.0) Script hook e documentazione sottostante completamente revisionati.
    - Aggiunto un nuovo script wrapper dehydrated-renew per eseguire il rinnovo del certificato e la sincronizzazione del servizio per SNI solo quando uno o più certificati sono effettivamente cambiati.
    - Introdotto un meccanismo di flag di modifica (dehydrated.changed) per evitare ricaricamenti e riavvii non necessari del servizio se un certificato è stato effettivamente distribuito.
    - Consolidate le operazioni post-rinnovo nella nuova funzione cert_sync(), fornendo un unico punto di ingresso per la sincronizzazione della configurazione dei certificati di qmail, Dovecot e Apache dopo i rinnovi riusciti. La stessa funzione cert_sync() può essere chiamata tramite uno script autonomo, che non coinvolge l'esecuzione di dehydrated. Ridotte le interruzioni non necessarie del servizio eseguendo la sincronizzazione una volta per ogni ciclo di rinnovo anziché una volta per ogni certificato rinnovato.
    - Il certificato qmail viene creato solo se è impostato MAKE_MAIL_CERTS=1. Se MAKE_MAIL_CERTS=0, lo script hook distribuisce solo i certificati (da utilizzare per il server web).
    - Le funzionalità Server Name Indication (SNI) per qmail e dovecot possono essere disabilitate impostando ENABLE_SNI=0 (impostazione predefinita).
    - Le voci ServerName e ServerAlias ​​per Apache e i domini SNI possono essere impostate facoltativamente con ENABLE_APACHE_SNI_CONF=1.

To enable HTTPS on your website, you need to get a certificate (a type of file) from a Certificate Authority (CA). Let’s Encrypt is a CA. In order to get a certificate for your website’s domain from Let’s Encrypt, you have to demonstrate control over the domain. With Let’s Encrypt, you do this using software that uses the ACME protocol which typically runs on your web host.

Abilitare Tex su Mediawiki (Slackware)

2 Giugno 2026 ore 18:30

Mediawiki offre la possibilità di inserire formule Tex nelle nostre pagine creando dinamicamente immagini PNG per noi..

Questa pagina vuole richiamare i pacchetti e i principali passi da seguire per far funzionare Tex con MediaWiki in una macchina Slackware. Alla fine presenterò alcune problematiche nell'installzione.

Ghostscript

Ghostscript è già incluso in Slackware (ap/ghostscript e ap/ghostscript-fonts-std)  ma se siamo in un server minimale potresti avere bisogno di installarlo.

libfontconfig

Questa libreria la troviamo all'interno del pacchetto x/fontconfig. E' richesta da ImageMagick.

ImageMagick

wget http://www.imagemagick.org/download/ImageMagick-6.7.6-5.tar.bz2
tar xvfj ImageMagick-6.7.6-5.tar.bz2
cd ImageMagick-6.7.6-5
chown -R root:root .

./configure \
        --without-x \
        --with-png \
        --with-freetype \
	--with-dps \
	--with-gslib
make
make install
ldconfig 

Test

Provare a digitare, dalla linea di comando

/usr/local/bin/convert logo: logo.gif

Se viene generato il file PNG tutto funziona come si deve.

Ocaml

wget http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.0.tar.bz2
tar xjf ocaml-3.12.0.tar.bz2
cd ocaml-3.12.0
chown -R root:root .
./configure
make
make install

dvipng

Download: http://sourceforge.net/projects/dvipng/

Prerequisiti:

  • libgd (l/gd pkg)
  • libXpm (x/libXpm pkg), libxcb (x/libxcb), libXau (x/libXau) and  libXdmcp (x/libXdmcp) che sono prerequisiti di libgd.
  • Kpathsea (incluso nel pacchetto Tex, installare tutto ciò che vi è nel gruppo t/)
  • FreeType (pkg in l/freetype)
  • T1lib (l/t1lib)
  • libpng (l/libpng) and libz (l/zlib)
  • texinfo (ap/tekinfo)
PATH=$PATH:/usr/share/texmf/bin/
export PATH

Ricordare di salvare ciò anche nel profile.

Per evitare problemi nel link di kpathsea configurare come segue

./configure LDFLAGS='-L/usr/share/texmf/lib/' CPPFLAGS='-I/usr/share/texmf/include/'
make
make install

AMS-LaTeX

Senza AMS* alcune formule saranno rese correttamente mentre altre no. Il pacchetto tetex di Slackware contiene già AMS, comunque, nel caso non ce l'avessi:

cd /usr/share/texmf
wget ftp://ftp.ams.org/pub/tex/amslatex.zip
wget ftp://ftp.ams.org/pub/tex/amsrefs/amsrefs.zip
unzip amslatex.zip
unzip amsrefs.zip

dovresti trovarlo in /usr/share/texmf/tex/latex/amsmath/amsmath.sty

Abilitare Tex in Mediawiki

Cambiare directory dove è installato mediawiki, editare LocalSettings.php e decommentare questo:

$wgUseTeX = true;

Compilazione di texvc

cd /path/to/htdocs/mediawiki/math

Prima di compilare, per evitare un parse error, usare il PATH assoluto ovunque all'interno di math/render.ml in questo modo:

let cmd_dvips tmpprefix = "/usr/share/texmf/bin/dvips -q -R -E " ^ tmpprefix ^ ".dvi -f >" ^ tmpprefix ^ ".ps"
let cmd_latex tmpprefix = "/usr/share/texmf/bin/latex " ^ tmpprefix ^ ".tex >/dev/null"
(* Putting -transparent white in converts arguments will sort-of give you transperancy *)
let cmd_convert tmpprefix finalpath = "/usr/local/bin/convert -quality 100 -density 120 " ^ tmpprefix ^ ".ps " ^ finalpath ^ " >/dev/null 2>/tmp/wiki_convert_error"
(* Putting -bg Transparent in dvipng's arguments will give full-alpha transparency *)
(* Note that IE have problems with such PNGs and need an additional javascript snippet *)
(* Putting -bg transparent in dvipng's arguments will give binary transparency *)
let cmd_dvipng tmpprefix finalpath backcolor = "/usr/local/bin/dvipng -bg \'" ^ backcolor ^ "\' -gamma 1.5 -D 120 -T tight --strict " ^ tmpprefix ^ ".dvi -o " ^ finalpath ^ " >/dev/null 2>/tmp/wiki_dvipng_error"

Ora compiliamo

make

Problematiche

Provare a mettere dentro una pagina wiki qualcosa come

0

e cerchiamo di vedere cosa succede. Questo è il messaggio di errore più frequente:

Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert)

Controlliamo se gli eseguibili sono nel path:

# ls -lH `which gs` `which latex` `which dvips` `which convert`
-rwxr-xr-x 1 root root 5977916 2008-12-05 23:36 /usr/bin/gs*
-rwxr-xr-x 1 root root   23410 2010-11-21 15:22 /usr/local/bin/convert*
-rwxr-xr-x 1 root root  209308 2007-06-28 04:51 /usr/share/texmf/bin/dvips*
-rwxr-xr-x 1 root root 1010984 2007-06-28 04:51 /usr/share/texmf/bin/latex*

Abilitiamo il log degli errori. Inserire una linea come questa in LocalSettings.php

$wgDebugLogFile = "/tmp/wiki.log";

Apriamo questo file e cerchiamo una riga come questa ;

TeX: ./math/texvc '/path/to/htdocs/mediawiki/images/tmp' '/path/to/htdocs/mediawiki/images/tmp' '0' 'UTF-8' 'transparent'
TeX output:
 Ccfcd208495d565ef66e7dff9f98764da0 0
---

Cerchiamo ora di eseguire il comando texvc dalla linea di comando come utente apache:

cd math
sudo -u apache ./texvc '../images/tmp' '../images/tmp' '0' 'UTF-8' 'transparent'

a controlliamo il PNG nella cartella images/tmp. Se si ottiene ancora un parse error, si ricontrolli il path assoluto in math/render.ml, e si ricompili. E si rileggano le referenze indicate.

L'interprete Sieve e il server Dovecot ManageSieve

2 Giugno 2026 ore 18:30

Il progetto Pigeonhole fornisce il supporto Sieve a livello di plugin per il Local Delivery Agent (LDA) di Dovecot e anche per suo servizio LMTP. Il plugin è un interprete Sieve che filtra i messaggi in arrivo usando uno script scritto in linguaggio Sieve. Lo script Sieve è fornito dall'utente e, con il suo utilizzo, l'utente può personalizzare come i messaggi in arrivo sono trattati. I messaggi possono essere spediti a una cartella specifica, reindirizzati, rispediti al mittente, scartati, etc.

Il Server Dovecot Managesieve è un servizio per gestire la collezione di script Sieve dell'utente.

Se vuoi supportare i filtri per le email, devi gestire le Sieve rules per mezzo del server dovecot-pigeonhole. Quando crei un filtro con la tua webmail o il tuo client di posta, stai scrivendo uno script in linguaggio Sieve per personalizzare il modo in cui i tuoi messaggi saranno recapitati, vale a dire se saranno inoltrati a qualcun altro, scartati o salvati in delle cartelle particolari. Ma per fare questo Dovecot deve agire anche come un Local Delivery Agent  al posto di vpopmail/vdelivermail, ovvero deve essere Dovecot a salvare i messaggi nella tua cartella Maildir. Questa guida cercherà di spiegare come raggiungere questo obiettivo.

Razor2, Pyzor, Spamcop e DCC

2 Giugno 2026 ore 18:30

Changelog

  • May 7, 2026
    Razor-Agent-Client upgraded to v. 2.88
  • Jun 3, 2025
    - disabled IPv6 on DCC as servers are not always responding (tx Shailendra Shukla)
  • Dec 26, 2023
    Pyzor installed from github, as version 1.0.0 is not pythone3 compliant (thanks Mike)

Questa pagina concerne il setup di alcuni filtri di rete che aiutano spamassassin a decidere cosa fare di un dato messaggio. Abilitando questi filtri, insieme al sistema di apprendimento bayesiano, migliorerà drasticamente le prestazioni di spamassassin nella lotta allo spamming.

Installazione di Dovecot e sieve su qmail + vpopmail

6 Giugno 2026 ore 13:31

Changelog

  • May 14, 2026
    - dovecot 2.4.3 released. Changed dovecot_config_version and dovecot_storage_version in dovecot.conf
    - the new version has lua as a dependency. Added --without-lua at configure command
  • Feb 25, 2026
    - Added Server Name Indication (SNI) settings in sni.conf.template, imported from local.conf commit
    - userdb iterate query nor orders by domain and username commit
    - 15-mailboxes.conf: fts_autoindex = no added to Trash and Junk folders commit
    - 10-auth.conf: + character added to auth_username_chars commit
  • 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)

Configurazione di DKIM per qmail

21 Maggio 2026 ore 04:31

Questa pagina riguarda la patch DKIM inclusa nella mia patch combinata (maggiori informazioni qui). Questo argomento è avanzato ed è consigliabile tornare qui alla fine del tutto.

DKIM fornisce un metodo per validare l'identità di un nome a dominio associato a un messaggio con una autenticazione crittografata. La tecnica di validazione è basata sulla crittografia di una chiave pubblica: Il server che invia l'email aggiunge il nome a dominio al messaggio e vi affigge una firma digitale. Questa chiave è posta nell'intestazione DKIM-Signature: del messaggio. Colui che riceve il messaggio può controllare la validità della chiave pubblica leggendo un record TXT del DNS del dominio associato al messaggio.

Sei invitato a dare un'occhiata alle pagine man a partire da qmail-dkim(8) e spawn-filter(8).

Changelog

  • Jan 29, 2026
    - Bug fix for verifying multiple DKIM signatures (second one always failed due to a DNS lookup bug). tx Andreas Gerstlauer
  • Jul 10, 2025
    added ERROR_FD=2 in control/filterargs to send error output of qmail-dkim in stderr when acting as a qmail-remote filter (Andreas Gerstlauer)
  • Feb 12, 2024
    - v. 1.48: fixed minor bug using filterargs for local deliveries (commit)
  • Feb 6, 2024
    -DKIM patch upgraded to v. 1.47
    * fixed a bug which was preventing filterargs' wildcards to work properly on sender domain
  • Jan 11, 2024
    - version 1.46
    * dk-filter.sh has been dropped. If signing at qmail-remote level, before upgrading, you have to review the configuration as explained below.
    * The variables USE_FROM, USE_SENDER and DKIMDOMAIN have been dropped
    * when signing at qmail-remote level qmail-dkim now has to be called directly by spawn-filter in the rc file. man spawn-filter for more info
    * In case of bounces the signature will be automatically based on the from: field. This will solve issues of DMARC reject by google in case of sieve/vacation bounces.
    * In case of ordinary bounces (mailbox not found, for instance) the bounce domain will be taken from control/bouncehost and, if doesn't exist, from control/me
  • Jan 4, 2024
    - patch upgraded to v. 1.44
    * fixed an issue with filterargs where spawn-filter is trying to execute remote:env xxxxx.... dk-filter. This issue happens when FILTERARGS environment variable is not defined in the qmail-send rc script.
    * dkim.c fix: https://notes.sagredo.eu/en/qmail-notes-185/configuring-dkim-for-qmail-92.html#comment3668 
    * adjustments fo dk-filter and dknewkey man pages
  • Nov 20, 2023
    * The patch now by default excludes X-Arc-Authentication-Results
    * dkim can additionally use the environment variable EXCLUDE_DKIMSIGN to include colon separated list of headers to be excluded from signing (just like qmail-dkim). If -X option is used with dk-filter, it overrides the value of EXCLUDE_DKIMSIGN.
  • Feb 19, 2023 (v. 1.37 upgrade)
    - ed25519 support​ (RFC 8463)
    - multiple signatures/selectors via the enhanced control/dkimkeys or DKIMSIGNDKIMSIGNEXTRADKIMSIGNOPTIONS  DKIMSIGNOPTIONSEXTRA variables
    - domainkey script replaced by dknewkey in order to create ed25519 keys and rsa keys with 1024/2048/4096 bit
    - dropped yahoo's domainkeys support (no longer need the libdomainkeys.a library)
    - man pages revised and enhanced
    - domainkeys directory moved to /var/qmail/control/domainkeys
    - the documentation in this page has been revised. You can find how to sign with the rsa key together with the ed25519 key below.

❌