Страница 1 из 1
postfix и smart relay с аутентификацией
Добавлено: 25 апр 2005, 17:49
Anonymous
Хелп, люди добрые!
Про настройки постфикса тут уже много говорилось, не взыщите за еще один (может глупый) вопрос.
Как сделать чтобы postfix при отправке почты на relayhost прохолил аутентификацию.
Добавлено: 26 апр 2005, 00:21
kae
1. postfix должен быть собран с поддержкой sasl.
2. создать файлик saslpass (например) в /etc/postfix с паролями
3. в main.cf добавить:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpass
В saslpass пишем:
domain.tld my-mail-login:super-puper-password
э... тут забыл маленько... возможно, надо писАть так:
smtpserver.domain.tld my-mail-login:super-puper-password
А лучше написать м так и этак. Не ошибешся...

Добавлено: 26 апр 2005, 11:07
Anonymous
Спасибо! Еще я догадался создать saslpass.db postmap'ом. Теперь постфикс уже пытается что-то делать в нужном направлении, но этого пока не достаточно:
Код: Выделить всё
Apr 26 10:57:55 local-server postfix/smtp[18923]: BF6C65681A: to=<qwerty@tut.by>, relay=mail.qwerty.by[166.248.188.117], delay=2, status=deferred (Authentication failed: cannot SASL authenticate to server mail.qwerty.by[166.248.188.117]: no mechanism available)
Добавлено: 26 апр 2005, 13:45
kae
Не нашел подходящего механизма аутентификации... А может relayhost его и не требует?
Вот что есть в файле sample-auth.cf , но в старом рабочем конфиге все это было закоментировано. Я пробовал через mail.tut.by, но это было давно...
# The smtp_sasl_security_options parameter controls what authentication
# mechanisms the local Postfix SMTP client is allowed to use. The
# list of available authentication mechanisms is system dependent.
#
# Specify zero or more of the following:
#
# noplaintext: disallow methods that use plaintext passwords
# noactive: disallow methods subject to active (non-dictionary) attack
# nodictionary: disallow methods subject to passive (dictionary) attack
# noanonymous: disallow methods that allow anonymous authentication
#
# By default, the Postfix SMTP client will not use plaintext passwords.
#
#smtp_sasl_security_options =
smtp_sasl_security_options = noplaintext
Добавлено: 26 апр 2005, 14:33
Anonymous
Ну я и долбешка - думать сначала надо. Доинсталлировал сасл-библиотеки с поддержкой вяких механизмов аутентификации и все пошло. Ура. Спасибо за помощь.