LinuxForum.Fans
Тема

Настройка Sendmail

Автор: Filsh 3 сообщений 2447 просмотров
#172985

Всем доброго времени!
У меня не получается настроить sendmail на centos, но проблема не в ОС, а в моих руках ))
Облазил весь инет, что только не делал, но могу понять как сделать что бы сообщения отправлялось
проверял так

text
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 Mon, ESMTP 27 Jun 2011 10:07:13 -0400

работает, а что дальше не могу понять,
стоит на CentOS

Буду очень благодарен, спасибо

#172999

Письмо пытаюсь отправить таким письмом php

text

        $headers= "MIME-Version: 1.0\r\n";
        $headers .= "Content-type: text/html; charset=utf-8\r\n";
        $headers .= "From: Birthday Reminder <birthday@rapository.com>\r\n";
        $headers .= "Cc: birthdayarchive@rapository.com\r\n";
        $headers .= "Bcc: birthdaycheck@rapository.com\r\n";
        
        var_dump(mail('imaliy@i.ua', "test", $message, $headers));

в логах мне пишет такую штуку

text

Jun 27 11:25:45 ip-10-56-71-5 sendmail[2570]: p5RFPjAJ002570: from=apache, size=527, class=0, nrcpts=3, msgid=<201106271525.p5RFPjAJ002570@ip-10-56-71-5.eu-west-1.compute.internal>, relay=apache@localhost
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjkc002573: Milter (clmilter): local socket name /var/run/clamav/clamav-milter.sock unsafe
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjkc002573: Milter (clmilter): to error state
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjkc002573: Milter (greylist): error connecting to filter: Connection refused by /var/milter-greylist/milter-greylist.sock
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjkc002573: Milter (greylist): to error state
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjkc002573: <birthdaycheck@rapository.com>... User unknown
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjkc002573: <birthdayarchive@rapository.com>... User unknown
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2570]: p5RFPjAJ002570: to=birthdaycheck@rapository.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=90527, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2570]: p5RFPjAJ002570: to=birthdayarchive@rapository.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=90527, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjkc002573: from=<apache@ip-10-56-71-5.eu-west-1.compute.internal>, size=768, class=0, nrcpts=1, msgid=<201106271525.p5RFPjAJ002570@ip-10-56-71-5.eu-west-1.compute.internal>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2570]: p5RFPjAJ002570: to=imaliy@i.ua, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=90527, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p5RFPjkc002573 Message accepted for delivery)
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2570]: p5RFPjAJ002570: p5RFPjAK002570: DSN: User unknown
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2573]: p5RFPjke002573: from=<>, size=3235, class=0, nrcpts=1, msgid=<201106271525.p5RFPjAK002570@ip-10-56-71-5.eu-west-1.compute.internal>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2570]: p5RFPjAK002570: to=apache, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31551, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p5RFPjke002573 Message accepted for delivery)
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2576]: p5RFPjke002573: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33500, dsn=2.0.0, stat=Sent
Jun 27 11:25:45 ip-10-56-71-5 sendmail[2575]: p5RFPjkc002573: to=<imaliy@i.ua>, ctladdr=<apache@ip-10-56-71-5.eu-west-1.compute.internal> (48/48), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120768, relay=mx5.i.ua. [62.149.9.178], dsn=4.3.0, stat=Deferred: 451 Unauthorised request. Try again later
Jun 27 11:25:46 ip-10-56-71-5 sendmail[2575]: p5RFPjkc002573: to=<imaliy@i.ua>, ctladdr=<apache@ip-10-56-71-5.eu-west-1.compute.internal> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120768, relay=mx7.i.ua. [213.186.122.10], dsn=4.3.0, stat=Deferred: 451 Unauthorised request. Try again later
Jun 27 11:25:46 ip-10-56-71-5 sendmail[2575]: p5RFPjkc002573: to=<imaliy@i.ua>, ctladdr=<apache@ip-10-56-71-5.eu-west-1.compute.internal> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120768, relay=mx10.i.ua. [213.186.119.6], dsn=4.3.0, stat=Deferred: 451 Unauthorised request. Try again later

Я так понимаю что основная ошибка заключается в последних строках
451 Unauthorised request. Try again later

Как ее исправить?

#173028
Filsh написал:
Как ее исправить?

ну как минимум правильно настроить релей вестимо .. :lol: ..
HOWTO

Войдите или зарегистрируйтесь, чтобы ответить.