Postfix Guide · 1 min read · Oct 07, 2025
Utenti Virtuali E Domini Con Postfix, Courier E MySQL (Debian Etch) - Pagina 5
11 Notifiche di Superamento Quota
Se vuoi ricevere notifiche su tutti gli account email che sono oltre la quota, fai così:
cd /usr/local/sbin/
wget http://puuhis.net/vhcs/quota.txt
mv quota.txt quota_notify
chmod 755 quota_notifyApri /usr/local/sbin/quota_notify e modifica le variabili in cima. Più in basso nel file (verso la fine) ci sono due righe dove dovresti aggiungere un segno %:
vi /usr/local/sbin/quota_notify| [...] my $POSTFIX_CF = "/etc/postfix/main.cf"; my $MAILPROG = "/usr/sbin/sendmail -t"; my $WARNPERCENT = 80; my \\@POSTMASTERS = ('[email protected]'); my $CONAME = 'La Mia Azienda'; my $COADDR = '[email protected]'; my $SUADDR = '[email protected]'; my $MAIL_REPORT = 1; my $MAIL_WARNING = 1; [...] print "Subject: ATTENZIONE: La tua casella di posta è $lusers{ $luser}% piena.\n"; [...] print "La tua casella di posta: $luser è $lusers{ $luser}% piena.\n\n"; [...] |
Esegui
crontab -eper creare un lavoro cron per quello script:
| 0 0 * * * /usr/local/sbin/quota_notify &> /dev/null |
(Nota (un po’ fuori tema): su Debian crontab -e aprirà automaticamente l’editor nano. Se sei abituato a lavorare con l’editor vi (come me), esegui i seguenti comandi:
rm -f /etc/alternatives/editor
ln -s /usr/bin/vi /etc/alternatives/editorDopo, esegui crontab -e, e vi si aprirà.)
12 Test Postfix
Per vedere se Postfix è pronto per SMTP-AUTH e TLS, esegui
telnet localhost 25Dopo aver stabilito la connessione al tuo server di posta Postfix, digita
ehlo localhostSe vedi le righe
250-STARTTLSe
250-AUTH LOGIN PLAINtutto va bene:
server1:/usr/local/sbin# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 server1.example.com ESMTP Postfix (Debian/GNU)
ehlo localhost
250-server1.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
server1:/usr/local/sbin#Digita
quitper tornare alla shell di sistema.
Ricevi i nuovi post nella tua casella di posta.
Nessuno spam. Disiscriviti in qualsiasi momento.