Configurazione Server · 2 min read · Jan 04, 2026
La Configurazione Perfetta - SUSE 9.3 - Pagina 5
Postfix Con SMTP-AUTH E TLS
apt-get install cyrus-sasl cyrus-sasl-crammd5 cyrus-sasl-devel cyrus-sasl-digestmd5 cyrus-sasl-gssapi cyrus-sasl-otp cyrus-sasl-plain cyrus-sasl-saslauthd
chkconfig –add saslauthd
/etc/init.d/saslauthd start
mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
postconf -e ‘mydomain = example.com’
postconf -e ‘myhostname = server1.$mydomain’
postconf -e ‘smtpd_sasl_local_domain =’
postconf -e ‘smtpd_sasl_auth_enable = yes’
postconf -e ‘smtpd_sasl_security_options = noanonymous’
postconf -e ‘broken_sasl_auth_clients = yes’
postconf -e ‘smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains’
postconf -e ‘inet_interfaces = all’
postconf -e ‘alias_maps = hash:/etc/aliases’
postconf -e ‘smtpd_tls_auth_only = no’
postconf -e ‘smtp_use_tls = yes’
postconf -e ‘smtpd_use_tls = yes’
postconf -e ‘smtp_tls_note_starttls_offer = yes’
postconf -e ‘smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key’
postconf -e ‘smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt’
postconf -e ‘smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem’
postconf -e ‘smtpd_tls_loglevel = 1’
postconf -e ‘smtpd_tls_received_header = yes’
postconf -e ‘smtpd_tls_session_cache_timeout = 3600s’
postconf -e ‘tls_random_source = dev:/dev/urandom’
Ora riavvia Postfix:
/etc/init.d/postfix restart
Per vedere se SMTP-AUTH e TLS funzionano correttamente ora esegui il seguente comando:
telnet localhost 25
Dopo aver stabilito la connessione al tuo server di posta postfix digita
ehlo localhost
Se vedi le righe
250-STARTTLS
e
250-AUTH
tutto va bene.

Digita
quit
per tornare alla shell del sistema.
Courier-IMAP/Courier-POP3
Voglio usare un demone POP3/IMAP che ha il supporto per Maildir. Ecco perché uso Courier-IMAP e Courier-POP3.
apt-get install courier-imap fam-server
/etc/init.d/courier-authdaemon start
/etc/init.d/courier-imap start
/etc/init.d/courier-imap-ssl start
/etc/init.d/courier-pop3 start
/etc/init.d/courier-pop3-ssl start
chkconfig –add courier-authdaemon
chkconfig –add courier-imap
chkconfig –add courier-imap-ssl
chkconfig –add courier-pop3
chkconfig –add courier-pop3-ssl
Poi configura Postfix per consegnare le email alla Maildir di un utente*:
postconf -e ‘home_mailbox = Maildir/‘
postconf -e ‘mailbox_command =’
/etc/init.d/postfix restart
Si prega di notare: Non è necessario farlo se si intende utilizzare ISPConfig sul proprio sistema poiché ISPConfig esegue la configurazione necessaria utilizzando le ricette procmail. Ma assicurati di abilitare Maildir sotto Gestione -> Impostazioni -> EMail* nell’interfaccia web di ISPConfig.
Apache/PHP5
apt-get install apache2 apache2-devel apache2-mod_perl apache2-mod_php5 apache2-prefork libapr0 perl-HTML-Parser perl-HTML-Tagset perl-Tie-IxHash perl-URI perl-libwww-perl php5 php5-devel
apt-get install php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dba php5-dbase php5-dbx php5-debuginfo php5-dio php5-dom php5-fam php5-filepro php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-mhash php5-mysql php5-mysqli php5-ncurses php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-readline php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-yp php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm ImageMagick curl (1 riga!)
chkconfig –add apache2
Modifica /etc/mime.types. Commenta le seguenti 2 righe:
| # application/x-httpd-php phtml pht php # application/x-perl pl pm |
Modifica /etc/apache2/httpd.conf e cambia
DirectoryIndex index.html index.html.var
in
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php5 index.php4 index.php3 index.pl index.html.var**
Modifica /etc/sysconfig/apache2 e aggiungi rewrite alla riga APACHE_MODULES:
| APACHE_MODULES="access actions alias auth [...] setenvif ssl suexec userdir php4 php5 rewrite" |
Aggiungi anche SSL alla riga APACHE_SERVER_FLAGS:
| APACHE_SERVER_FLAGS="SSL" |
Poi esegui
SuSEconfig
/etc/init.d/apache2 start
Ricevi i nuovi post nella tua casella di posta.
Nessuno spam. Disiscriviti in qualsiasi momento.