QmailAdmin

October 22, 2025 by Roberto Puzzanghera 161 comments

qmailAdmin is a free software package that provides a web interface for managing a qmail system with virtual domains. It provides admin for adding/deleting users, Aliases, Forwards, Mailing lists and Autoresponders.

As you can see, for convenience I moved the QmailAdmin sources to my github space. Nonetheless, all information about QmailAdmin will continue to be posted here, and this page remains the place to seek support if needed.

This qmailadmin contains the original Inter7's 1.2.16 version with the following features (updated to 2023.08.27 old patch version) and several modifications in order to compile with latest C compilers:

  • qmailadmin-skin, a patch that I created during covid-19 spare time, provides a new responsive skin to the control panel. It modifies everything under the html dir and many .c files in order to adjust the html embedded into the source files. Added a style sheet in the "images" folder and a couple of png files for the qmail logo. It will be much easier to modify the qmailadmin's skin from now on.
  • A patch to call cracklib in order to check for the password strenght. This should avoid unsafe accounts created by domain administrators such as "test 123456".
  • A nice patch (thanks to Tony, original author unknown) which gets qmailadmin to have authentication failures logged. This makes possible to ban malicious IPs via fail2ban. It is required to create the log file /var/log/qma-auth.log initially and assign write priviledges to apache.
  • ezmlm-idx 7 compatibility patch (author unknown), which restores the compatibility with ezmlm-idx-7 (thanks to J.D. Trolinger for the advice).
  • a fix to the catchall account (thanks to Luca Franceschini).
  • another fix to autorespond.c to correct the way the .qmail files are modified
  • qmail-autoresponder support (thanks Nathanaël Semhoun)

Installing ClamAV

October 18, 2025 by Roberto Puzzanghera 24 comments

Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail gateways.

Changelog

  • Oct 18, 2025
    - clamav upgraded to v 1.5.1
  • Oct 11, 2025
    - clamav upgraded to v 1.5.0. A recent version of rust is needed (successfully using 1.88 here). Just reinstall as explained below. No particular change is needed in the config files.

Realtime Block List (RBL) - qmail-dnsbl

October 4, 2025 by Roberto Puzzanghera 32 comments

A Realtime Block List (RBL) is a list of addresses that an RBL list supplier believes are a source of Spam.

  • Download qmail-dnsbl patch
  • Code and logic from rblsmtpd and qmail-dnsbl patch by Fabio Busatto
  • Added support for welcomelists, TXT and A queries, configurable return codes 451 or 553 with custom messages (by Luca Franceschini)

This patch replaces the djb's rblsmtpd program. It incorporates into qmail-smtpd the RBL stuff with the advantage that you can see the envelope in the logs. Registering the envelope as well as the sender ip is important to always know what happened to not received messages.

daemontools

September 30, 2025 by Roberto Puzzanghera 40 comments

daemontools is a collection of tools for managing UNIX services. It monitors qmail services and saves error messages to one or more logs.

Changelog

  • 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 (v. 0.80)
    - 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
  • Dec 9, 2023
    - moved my patched daemontools to github and named 0.77 the new version
    - clear service moved to qmail/supervise/clear

Installing and configuring SpamAssassin

September 10, 2025 by Roberto Puzzanghera 65 comments

SpamAssassin is a mature, widely-deployed open source project that serves as a mail filter to identify Spam. SpamAssassin uses a variety of mechanisms including header and text analysis, Bayesian filtering, DNS blocklists, and collaborative filtering databases. SpamAssassin runs on a server, and filters spam before it reaches your mailbox.

Changelog

  • Oct 4, 2025
    - added a section in the RBL page, which addresses the spamhaus ban issue for queries from open resolvers.
  • Sep 11, 2025
    - txrep is working badly in a server where data were not completely deleted. Read the updates below
  • Sep 10, 2025
    - spamassassin upgraded to v 4.0.2
    - added a new page "Preparing the SQL database in SpamAssassin" where the old issue about the MySQL/MariaDB driver is addressed.
  • May 31, 2025
    - We are know denying validity, as it is imposing low limits and drastically blocking the queries (tx Shailendra Shukla).

Upgrading qmail

September 8, 2025 by Roberto Puzzanghera 587 comments

For my convenience I moved the qmail sources to my github space. Nonetheless, all information about qmail and related programs will continue to be posted in this web space, and this pages remain the place to  eventually seek support. From now on, instead of releasing a combined patch for qmail, I'll release a package which is the result of the ancient netqmail-1.06 plus my modifications. The original patches that I accomodated in my qmail package are listed below.

Changelog

  • Sep 8, 2025
    - Fixes in SPP handling and support for [pass] plugins after RCPT accept. Support for RBLRESULT environment variable and RBL ignore ('=') option. (tx Andreas Gerstlauer)
    - Added -std=gnu17 to conf-cc, fixed some other issues and now it compiles on gcc-15.2 in #28
    - scripts/qmail-pop3d and qmail/pop3sd: ports changed to 110 and 995
    - Received: email header now hides the sender's hostname when the sender is RELAYCLIENT or is authenticated. 785e84b
  • Jul 10, 2025
    - Authentication-Results: header support (Andreas Gerstlauer)
    - DKIM: 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)
    - improved qmail-dkim error reporting when signing outgoing messages (Andreas Gerstlauer)
    - helodnscheck.cpp: qmail dir determined dynamically
    - qmHandle: Add -x and -X parameter for remove email by To/Cc/Bcc (by Stetinac)
  • Jun 09, 2025
    - CRLF fix for fastremote-3 patch (thanks Andreas Gerstlauer)
    - Bug fix to the greetdelay program (thanks Andreas Gerstlauer): qmail-smtpd crashes if SMTPD_GREETDELAY is defined with no DROP_PRE_GREET defined.
    - turned off TLS and helo dns check on qmail-smtpsd/run script (tx Luis)
  • Apr 30, 2025
    qmailctl
    , qmHandle, queue_repair and all scripts installed in QMAIL/bin and not in /usr/local/bin by config-all.sh
  • Apr 25, 2025
    - added a configuration script config-all, which configure and installs the control files (as per the original config-fast script), aliases, SRS (uses control/me as the srs_domain), log dirs in /var/log/qmail, tcprules (basic, just to make initial tests), supervise scripts, qmailctl script, DKIM control/filterargs and control/domainkeys dir, SURBL, smtpplugins, helodnscheck spp plugin, svtools, qmHandle, queue-repair, SSL key file (optional).
    Consider this feature as "testing"
  • Feb 11, 2025
    - Several adjustments to get freeBSD and netBSD compatibility. More info in the commit history. Hints/comments are welcome.
    - freeBSD users have to leave the very 1st line of the file "conf-lib" blank, as libresolv.so is not needed on freeBSD.
    - Dropped files install-big.c, idedit.c and BIN.* files.
    - Dropped files byte_diff.c, str_cpy.c, str_diff.c, str_diffn.c and str_len.c, which break compilation on clang and can be replaced by the functions shipped by the compiler (tx notqmail).
    - Old documentation moved to the "doc" dir. install.c and hier.c modified accordingly
    - conf-cc and conf-ld now have -L/usr/local/lib and -I/usr/local/include to look for srs2 library
    - conf-cc and conf-ld now have -L/usr/pkg/lib and -I/usr/pkg/include to satisfy netBSD
    - vpopmail-dir.sh: minor correction to vpopmail dir existence check
    - srs.c: #include <srs2.h> now without path
  • Dec 01, 2024 (More info here and in the github release notes)
    - Added support for EAI (RFC 5336 SMTP Email Address Internationalization) (#13). Thanks to https://github.com/arnt/qmail-smtputf8/tree/smtputf8-tls. libidn2 package (libidn2-dev on debian) is a new dependence.
    - chkuser is now smtputf8 compliant. It accepts utf8 characters in sender and recipient addresses provided that the remote server advertises the SMTPUTF8 verb in MAIL FROM, otherwise it allows only ASCII characters plus additional chars from the CHKUSER_ALLOWED_CHARS set.
    * dropped variables CHKUSER_ALLOW_SENDER_CHAR_xx CHKUSER_ALLOW_RCPT_CHAR_xx (replaced by CHKUSER_ALLOWED_CHARS)
    * dropped variables CHKUSER_ALLOW_SENDER_SRS and CHKUSER_ALLOW_RCPT_SRS, as we are always accepting '+' and '#' characters
    * added variables CHKUSER_INVALID_UTF8_CHARS and CHKUSER_ALLOWED_CHARS

Installing and configuring VPopMail

September 1, 2025 by Roberto Puzzanghera 192 comments

Vpopmail provides an easy way to manage virtual email domains and non /etc/passwd email accounts on your mail servers.

Changelog

  • Sep 1, 2025 (v. 5.6.9)
    - added -std=gnu17 to gain compatibility with gcc-15 (PR #6)
    - pw_clear_passwd field enlarged to varchar(128) to create room for long passwords (tx Ricardo Brisighelli) c54688d
  • Mar 29, 2025 (v5.6.8)
    defaultdelivery
    feature (--enable-defaultdelivery) changes (more info here, commit):
    • vdelivermail is installed by default in .qmail-default of newly created domains with option 'delete' as in the previous version.
    • if no user's valiases and no .qmail are found, then the message is sent to the control/defaultdelivery file, so that dovecot-lda (or whatelse) can execute the sieve rules and finally store the message into inbox.
    • if vdelivermail is found in control/defaultdelivery, then it is ignored to avoid loops. The delivery is done by vdelivermail
    • v. 5.6.8 is backward compatible. The users having .qmail from previous versions of the defauldelivery feature are not affected by this change.
  • Mar 23, 2025 (v. 5.6.7)
    - bug fix in vpopmaild.c: Crypted[64] enlarged to Crypted[128] to make room for SHA-512 passwords. This restores the usability of the RoundCube's 'password' plugin (commit)
    - fixed quota calculation in sql procedures for dovecot (tx Hakan Cakiroglu) (commit)
    - minor changes to the usage function of vmakedotqmail.c (commit)
  • Feb 9, 2025 (v. 5.6.5)
    - added pwd strength check also for vadduser.c
    -
    removed -std=c99 -D_XOPEN_SOURCE=500 arguments from CFLAGS in configure.ac to make clang happy
    - several changes to compile on FreeBSD clang v. 18.1.6
  • Dec 20, 2024 (v 5.6.4)
    - Password strength enforcement (PR #5, grabbed from Matt Brookings' 5.5.0-dev version)
    - Dropped min pwd length feature.
    - vmysql.h: tables' layout changed in order to have VARCHAR instead of CHAR. Fields containing ip addresses enlarged to VARCHAR(39), to create room for ipv6. Unix timestamps definition changed from BIGINT(20) to INT(11). (commit 44bad58) Have a look to the upgrade notes below.
  • Oct 14, 2024 (v. 5.6.2)
    - fixed a configure break where a trivial C test program exits on error with gcc-14.1 due to missing headers
    - vusaged/domain.c: fixed -Wimplicit-function-declaration compilation warning
    - vmysql.h: dropped the multicolumn PRIMARY KEY in valias table to allow multiple forwards for a given alias.
       In case one already has the valias table defined, this is the sql query for the upgrade:
       ALTER TABLE `vpopmail`.`valias` DROP PRIMARY KEY, ADD INDEX (`alias`, `domain`, `valias_type`) USING BTREE;
       ALTER TABLE `vpopmail`.`valias` ADD `id` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`id`);

qmail - basic setup

August 19, 2025 by Roberto Puzzanghera 40 comments

Changelog

  • Aug 19, 2025
    - netqmail-1.07.1: now compiles with gcc 15.2
  • Feb 10, 2025
    - the original netqmail sources are now compatible with latest gcc and clang compilers
    - renamed as netqmail-1.07 the original netqmail sources after the update

Recent comments
Recent posts

RSS feeds