|
Настраиваем SMTPS # cd /usr/ports/sysutils/ucspi-ssl # make install clean # cd /var/qmail/supervise # mkdir -m 1755 qmail-smtp-ssl # cd qmail-smtp-ssl # fetch http://freebsdrocks.ru/files/run.smtp.sslserver # mv run.smtp.sslserver run # ee run IP=1.2.3.4 # IP адрес, который будем слушать. Не оставляйте раным 0 без веских причин. PORT=465 # Порт который будем слушать. SSL=1 # Запуск как SSL-only service. FORCE_TLS=0 # Не нужно, если ипользуем SSL services. DENY_TLS=0 # Не нужно, если ипользуем SLS services. AUTH=1 # Разрешить аутентификацию по комане AUTH. REQUIRE_AUTH=1 # Отлонять отправку почты не авторизованными пользователями (не прошедшими AUTH).
# chmod 700 run # mkdir -m 755 log # cd log # fetch http://freebsdrocks.ru/files/service-any-log-run # mv service-any-log-run run # chmod 700 run # cd /etc/tcp # ee smtpssl :allow # ee Makefile all: smtp.cdb smtpssl.cdb # gmake tcprules smtpssl.cdb smtpssl.tmp < smtpssl chmod 644 smtpssl.cdb smtpssl Creating an SSL key file # cd /var/qmail/control # openssl req -newkey rsa:1024 -x509 -nodes -days 3650 -out servercert.pem -keyout servercert.pem
Generating a 1024 bit RSA private key ............................++++++ .............................++++++ writing new private key to 'servercert.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]: Страна State or Province Name (full name) [Some-State]: Город Locality Name (eg, city) []: Город Organization Name (eg, company) [Internet Widgits Pty Ltd]: Имя компании (опцияl) Organizational Unit Name (eg, section) []: Имя подразделения (опция) Common Name (eg, YOUR name) []: Обязательно к заполнению, смотри ниже Это имя должно совпадать с именем которое будет видно клиентам их почтовыми программами, как имя SMTP-сервера.е Email Address []: Email (Обязательно к заполнению)
# chown root:qnofiles servercert.pem # chmod 640 servercert.pem # cp servercert.pem clientcert.pem # chown root:qmail clientcert.pem
# chmod 640 clientcert.pem # ln -s /var/qmail/supervise/qmail-smtp-ssl /service/ # svstat /service/qmail-smtp-ssl /service/qmail-smtp-ssl/log
/service/qmail-smtp-ssl: up (pid 6279) 4 seconds /service/qmail-smtp-ssl/log: up (pid 6280) 4 seconds
/service/qmail-smtp-ssl: up (pid 6279) 4 seconds /service/qmail-smtp-ssl/log: up (pid 6280) 4 seconds # tail -f /service/qmail-smtp-ssl/log/main/current Запустим qmail # rehash # qmailctl start Starting qmail... Starting qmail-send Starting qmail-smtpd Starting qmail-pop3d # qmailctl stat /service/qmail-send: up (pid 6997) 156 seconds /service/qmail-send/log: up (pid 7003) 156 seconds /service/qmail-smtpd: up (pid 7008) 156 seconds /service/qmail-smtpd/log: up (pid 7012) 155 seconds /service/qmail-pop3d: up (pid 7005) 156 seconds /service/qmail-pop3d/log: up (pid 7006) 156 seconds messages in queue: 0 messages in queue but not yet preprocessed: 0 Закончили с qmail.
|
Комментарии
sslserver: fatal: unable to load certificate
где грабли???? Ответить | Ответить с цитатой | Цитировать
Проверь пути к сертификатам.
Посмотри:
freebsdrocks.ru/.../...
не оно? Ответить | Ответить с цитатой | Цитировать
RSS лента комментариев этой записи.