Настройка сервера · 2 min read · Feb 12, 2026
Идеальная настройка - SUSE 9.2 - Страница 5
Postfix с SMTP-AUTH и 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’
Теперь перезапустите Postfix:
/etc/init.d/postfix restart
Чтобы проверить, работают ли SMTP-AUTH и TLS, выполните следующую команду:
telnet localhost 25
После того как вы установили соединение с вашим почтовым сервером postfix, введите
ehlo localhost
Если вы видите строки
250-STARTTLS
и
250-AUTH
всё в порядке.

Введите
quit
чтобы вернуться в оболочку системы.
Courier-IMAP/Courier-POP3
Я хочу использовать демон POP3/IMAP, который поддерживает Maildir. Поэтому я использую Courier-IMAP и 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
Затем настройте Postfix для доставки электронной почты в Maildir пользователя*:
postconf -e ‘home_mailbox = Maildir/‘
postconf -e ‘mailbox_command =’
/etc/init.d/postfix restart
Пожалуйста, обратите внимание: вам не нужно делать это, если вы собираетесь использовать ISPConfig на вашей системе, так как ISPConfig выполняет необходимую настройку с помощью рецептов procmail. Но, пожалуйста, убедитесь, что вы включили Maildir в Управление -> Настройки -> EMail* в веб-интерфейсе ISPConfig.
Apache
apt-get install apache2 apache2-devel apache2-mod_perl apache2-mod_php4 apache2-prefork libapr0 perl-HTML-Parser perl-HTML-Tagset perl-Tie-IxHash perl-URI perl-libwww-perl php4
apt-get install php4-bcmath php4-zlib php4-yp php4-xslt php4-wddx php4-unixODBC php4-sysvshm php4-sysvsem php4-swf php4-sockets php4-snmp php4-shmop php4-session php4-servlet php4-qtdom php4-pgsql php4-pear php4-mysql php4-mime_magic php4-mhash php4-mcrypt php4-mcal php4-mbstring php4-ldap php4-imap php4-iconv php4-gmp php4-gettext php4-gd php4-ftp php4-filepro php4-fastcgi php4-exif php4-domxml php4-devel php4-dbx php4-dbase php4-curl php4-ctype php4-calendar php4-bz2 ImageMagick curl (1 строка!)
chkconfig –add apache2
Отредактируйте /etc/mime.types. Закомментируйте следующие 2 строки:
| # application/x-httpd-php phtml pht php # application/x-perl pl pm |
Отредактируйте /etc/apache2/httpd.conf и измените
DirectoryIndex index.html index.html.var
на
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.html.var**
Отредактируйте /etc/sysconfig/apache2 и добавьте rewrite в строку APACHE_MODULES:
| APACHE_MODULES="access actions alias auth [...] setenvif ssl suexec userdir php4 php5 rewrite" |
Также добавьте SSL в строку APACHE_SERVER_FLAGS:
| APACHE_SERVER_FLAGS="SSL" |
Затем выполните
SuSEconfig
/etc/init.d/apache2 start
Get new posts in your inbox
No spam. Unsubscribe anytime.