❌

Vista elenco

Configurazione di proftpd con mod_tls o mod_sftp

2 Giugno 2026 ore 18:30

Ecco come ho installato mod_tls (ftpes) e mod_sftp in proftpd. I miei tentativi di farli convivere in due demoni separati sono tutti falliti, giacchè ho registrato errori nel trasferimento che sono spariti solo quando ho provato a caricare mod_tls o mod_sftp a turno.

Questi i miei test sulla velocità (per la verità un po' frettolosi). ftpes sembra un pochino più veloce in modalità upload:

ftpes
upload: circa 22.4 K/s
download: più di 800 K/s

sftp
upload circa 18.2 K/s
download: più di 800 K/s

Le mie opzioni di configurazione:

./configure \
        --prefix=/usr/local \
        --without-pam --disable-auth-pam \
        --enable-openssl \
        --with-modules=mod_ratio:mod_readme:mod_sftp:mod_tls

file ftpes.conf

# common stuff goes here
Include /usr/local/etc/proftpd/proftpd.conf

<IfModule mod_tls.c>
TLSEngine on
PassivePorts 49152 65535
#MasqueradeAddress 012.345.678.901 # se il server e' dietro un firewall
TLSLog /var/log/proftpd/tls.log
TLSProtocol SSLv23
# Require protection on the control channel, but reject protection of the data channel
TLSRequired ctrl+!data
TLSRSACertificateFile /usr/local/etc/ssl/certs/proftpd.pem
TLSRSACertificateKeyFile /usr/local/etc/ssl/certs/proftpd.pem
TLSVerifyClient off
TLSRenegotiate none
</IfModule>

file sftp.conf

# common stuff
Include /usr/local/etc/proftpd/proftpd.conf

<IfModule mod_sftp.c>
SFTPEngine on
SFTPLog /var/log/proftpd/sftp.log
Port 22
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_dsa_key
SFTPCompression delayed
MaxLoginAttempts 6
</IfModule>

Infine avviare il demone richiamando il file di configurazione desiderato:

/usr/local/sbin/proftpd -c /usr/local/etc/proftpd/ftpes.conf # se si vuole ftpes
/usr/local/sbin/proftpd -c /usr/local/etc/proftpd/sftp.conf  # se si preferisce sftp

Non avviarli mai insieme.

file proftpd.conf

ServerType standalone
UseReverseDNS off
DeferWelcome off

Port 21
Umask 022
MaxInstances 30

User ftp
Group ftp

SystemLog /var/log/proftpd/proftpd.log
TransferLog /var/log/proftpd/xferlog

<Global>

<Directory /*>
AllowOverwrite on
</Directory>

</Global>

<VirtualHost 123.456.789.123>

ServerName "ProFTPD"
DefaultRoot ~/www
DefaultServer on

</VirtualHost>

Startup script

#!/bin/sh
#
# /etc/rc.d/rc.proftpd
#

start() {
        /usr/local/sbin/proftpd -c /usr/local/etc/proftpd/ftpes.conf
#-n -d 20 for backup
#        /usr/local/sbin/proftpd -c /usr/local/etc/proftpd/sftp.conf
        echo "Server started."
}

stop() {
        /bin/killall proftpd
        echo "Server stopped."
}

restart() {
        stop
sleep 3
        start
#/bin/killall -HUP proftpd
        echo "Server restarted."
}

case "$1" in
'start')
  start
  ;;
'stop')
  stop
  ;;
'restart')
  restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac

 

L'interprete Sieve e il server Dovecot ManageSieve

29 Agosto 2026 ore 04:31

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.

Installazione di Dovecot e sieve su qmail + vpopmail

29 Agosto 2026 ore 04:31

Changelog

  • Aug 28, 2026
    - dovecot upgraded to v2.4.5
    - 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.
  • 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
  • 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

❌