Dsn remote protocol error

Mail is looping error Привет всем.Вопрос. Есть sendmail, который работает в качестве relay. Иногда в логах появляется запись Feb 21 12:05:57 ns sm-mta[90245]: l1L95vCX090245: SYSERR(root): mail.2friend.com. config error: mail loops back to me (MX problem?) Name: lo.astaga.comAddress: 127.0.0.1 Почта с таких доменов долвольно-таки часто приходит.. И такое ощущение, что sendmail затыкается не надолго, когда […]

Mail is looping error

Привет всем.
Вопрос. Есть sendmail, который работает в качестве relay. Иногда в логах появляется запись

Feb 21 12:05:57 ns sm-mta[90245]: l1L95vCX090245: SYSERR(root): mail.2friend.com. config error: mail loops back to me (MX problem?)

Name: lo.astaga.com
Address: 127.0.0.1

Почта с таких доменов долвольно-таки часто приходит.. И такое ощущение, что sendmail затыкается не надолго, когда обрабатыает такую почту.. Не подскажете как избавиться от этого?
Поможет ли вот это? В файле access:
localhost.localdomain REJECT
localhost REJECT
127.0.0.1 REJECT
?
Спасибо!

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

  • sendmail — mail loops back to me, A Clockwork Orange, 13:28 , 21-Фев-07, ( 1 )
    • sendmail — mail loops back to me, frog, 14:06 , 21-Фев-07, ( 3 )
      • sendmail — mail loops back to me, A Clockwork Orange, 14:14 , 21-Фев-07, ( 4 )
        • sendmail — mail loops back to me, A Clockwork Orange, 14:22 , 21-Фев-07, ( 6 )
  • sendmail — mail loops back to me, ncp, 13:30 , 21-Фев-07, ( 2 )
  • sendmail — mail loops back to me, lavr, 14:22 , 21-Фев-07, ( 5 )
  • sendmail — mail loops back to me, Medlar, 17:46 , 21-Фев-07, ( 7 )
Сообщения по теме [Сортировка по времени, UBB]

>Привет всем.
>Вопрос. Есть sendmail, который работает в качестве relay. Иногда в логах появляется
>запись
>
>Feb 21 12:05:57 ns sm-mta[90245]: l1L95vCX090245: SYSERR(root): mail.2friend.com. config error: mail loops
>back to me (MX problem?)
>
>Name: lo.astaga.com
>Address: 127.0.0.1
>
>Почта с таких доменов долвольно-таки часто приходит.. И такое ощущение, что sendmail
>затыкается не надолго, когда обрабатыает такую почту.. Не подскажете как избавиться
>от этого?
>Поможет ли вот это? В файле access:
>localhost.localdomain REJECT
>
>localhost
>
>REJECT
>127.0.0.1
>
>REJECT
>?
>Спасибо!

cat /etc/mail/relay-domains
cat /etc/mail/local-host-names

1 . «sendmail — mail loops back to me»
Сообщение от A Clockwork Orange on 21-Фев-07, 13:28
Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

3 . «sendmail — mail loops back to me»
Сообщение от frog (??) on 21-Фев-07, 14:06

>>Привет всем.
>>Вопрос. Есть sendmail, который работает в качестве relay. Иногда в логах появляется
>>запись
>>
>>Feb 21 12:05:57 ns sm-mta[90245]: l1L95vCX090245: SYSERR(root): mail.2friend.com. config error: mail loops
>>back to me (MX problem?)
>>
>>Name: lo.astaga.com
>>Address: 127.0.0.1
>>
>>Почта с таких доменов долвольно-таки часто приходит.. И такое ощущение, что sendmail
>>затыкается не надолго, когда обрабатыает такую почту.. Не подскажете как избавиться
>>от этого?
>>Поможет ли вот это? В файле access:
>>localhost.localdomain REJECT
>>
>>localhost
>>
>>REJECT
>>127.0.0.1
>>
>>REJECT
>>?
>>Спасибо!
>
>cat /etc/mail/relay-domains
>cat /etc/mail/local-host-names

relay-domains не существует
cat /etc/mail/local-host-names:
ns.asd.ru
Но этот файл в конфиге не использую
VERSIONID(`$Id: generic-bsd4.4.mc,v 8.10 1999/02/07 07:26:02 gshapiro Exp $’)
OSTYPE(freebsd6)dnl
DOMAIN(generic)dnl
FEATURE(`access_db’, `hash -T /etc/mail/access_map’)
FEATURE(`mailertable’)dnl
FEATURE(`blacklist_recipients’)
FEATURE(nouucp, `reject’)
undefine(`UUCP_RELAY’)
undefine(`BITNET_RELAY’)
undefine(`DECNET_RELAY’)
define(`confPRIVACY_FLAGS’, `authwarnings, noexpn, novrfy, needmailhelo,restrictmailq,restrictqrun,nobodyreturn’)
define(`confMAX_HEADERS_LENGTH’, `16384′)
define(`confMAX_MIME_HEADER_LENGTH’, `256/128′)
define(`confMAX_RCPTS_PER_MESSAGE’, `10′)
define(`confMIN_FREE_BLOCKS’, `10240′)
define(`confMAX_DAEMON_CHILDREN’, `30′)dnl
MAILER(local)
MAILER(smtp)dnl
Cwns.asd.ru

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

4 . «sendmail — mail loops back to me»
Сообщение от A Clockwork Orange on 21-Фев-07, 14:14

суть ошибки в чем,
sendmail должен отправить сообщение адресату user@domain,
ищется запись mx в dns для domain.
dns указывает на твою машину, но на твоей машине sendmail не знает, что почта для domain является локальной.
и в результате типа петли получается.

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

6 . «sendmail — mail loops back to me»
Сообщение от A Clockwork Orange on 21-Фев-07, 14:22

; > DiG 8.3 > mx asd.ru
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER ;; ANSWER SECTION:
asd.ru. 26m14s IN MX 0 relay.asd.ru.

;; AUTHORITY SECTION:
asd.ru. 26m14s IN NS ns.asd.ru.
asd.ru. 26m14s IN NS ns.balakovo.san.ru.

;; ADDITIONAL SECTION:
relay.asd.ru. 26m14s IN A 88.147.160.50
ns.balakovo.san.ru. 2h56m38s IN A 88.147.158.1

;; Total query time: 13 msec
;; FROM: mail.strs.ru to SERVER: default — 127.0.0.1
;; WHEN: Wed Feb 21 14:18:24 2007
;; MSG SIZE sent: 24 rcvd: 125

приходит на relay.asd.ru почта user@asd.ru
согласно вышеуказанной записи mx почта для домена asd.ru должна прийти на relay.asd.ru
она пришла и дальше так по кругу.

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

2 . «sendmail — mail loops back to me»
Сообщение от ncp (??) on 21-Фев-07, 13:30

>Привет всем.
>Вопрос. Есть sendmail, который работает в качестве relay. Иногда в логах появляется
>запись
>
>Feb 21 12:05:57 ns sm-mta[90245]: l1L95vCX090245: SYSERR(root): mail.2friend.com. config error: mail loops
>back to me (MX problem?)
>
>Name: lo.astaga.com
>Address: 127.0.0.1
>
>Почта с таких доменов долвольно-таки часто приходит.. И такое ощущение, что sendmail
>затыкается не надолго, когда обрабатыает такую почту.. Не подскажете как избавиться
>от этого?
>Поможет ли вот это? В файле access:
>localhost.localdomain REJECT
>
>localhost
>
>REJECT
>127.0.0.1
>
>REJECT
>?
>Спасибо!

Не знаю как в сендмайле, но в постфиксе такая ботва у меня была, когда я не прописал постфиксу для каких доменов он должен принимать почту и класть в локальные почтовые ящики.
По-моему там параметр myorign за это отвечает.

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

5 . «sendmail — mail loops back to me»
Сообщение от lavr on 21-Фев-07, 14:22

>Привет всем.
>Вопрос. Есть sendmail, который работает в качестве relay. Иногда в логах появляется
>запись
>
>Feb 21 12:05:57 ns sm-mta[90245]: l1L95vCX090245: SYSERR(root): mail.2friend.com. config error: mail loops
>back to me (MX problem?)
>
>Name: lo.astaga.com
>Address: 127.0.0.1
>
>Почта с таких доменов долвольно-таки часто приходит.. И такое ощущение, что sendmail
>затыкается не надолго, когда обрабатыает такую почту.. Не подскажете как избавиться
>от этого?
>Поможет ли вот это? В файле access:
>localhost.localdomain REJECT
>
>localhost
>
>REJECT
>127.0.0.1
>
>REJECT
>?
>Спасибо!

FAQ по sendmail не пробовали посмотреть, там есть ответ.

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

7 . «sendmail — mail loops back to me»
Сообщение от Medlar on 21-Фев-07, 17:46

По моим наблюдениям проблема с «mail loops back to me (MX problem?)» имеет 2 причины.
Первая, как уже указывалось выше, связана с неправильно заполненным local-host-names
А вторая связана со спамом.

>. Иногда в логах появляется
Что-то мне подсказывает, что здесь ключевое слово «иногда».
То есть, видимо, обычно почта ходит нормально.
А то, что в логах появляется такая запись только иногда, указывает на спамерскую активность (у меня в логах на втором mx-е куча таких сообщений).
В противном случае почта бы вообще не ходила, и тогда действительно, нужно было бы редактировать local-host-names.
Здесь же некто отправил письмо, которое почтовик автора не смог доставить получателю, о чем он попытался известить отправителя. Но почтовый сервер отправителя mail.2friend.com определен в днс хитро, как 0.0.0.0 (обычно спамеры ставят 127.0.0.1), поэтому отлуп пытается доставиться на почтовик автора, а так как этот домен в local-host-names отсутствует, то пишется в лог эта ошибка.

>Feb 21 12:05:57 ns sm-mta[90245]: l1L95vCX090245: SYSERR(root): mail.2friend.com. config error: mail loops
>back to me (MX problem?)

Вот, например, почта для моего клиента перенаправляется с.п. aliases на mail.ru,
mail.ru отказывается принять письмо (скорее всего распознав как спам), я пытаюсь известить об этом mail1.eraa.com,
а у этого хоста адрес 127.0.0.1, ну и т.д.

Feb 21 17:05:08 mail sendmail[32463]: l1LC4dhP032463: from= , size=8142, nrcpts=1,
msgid= , proto=SMTP, daemon=MTA, relay=[89.20.116.102]
Feb 21 17:05:09 mail sendmail[32708]: l1LC4dhP032463: mxs.mail.ru.: SMTP DATA-2 protocol error: 503 valid RCPT command must precede DATA
Feb 21 17:05:09 mail sendmail[32708]: l1LC4dhP032463: to=myuser@mail.ru, delay=00:00:27, xdelay=00:00:00, mailer=esmtp,
pri=38437, relay=mxs.mail.ru. [194.67.23.20], dsn=5.5.0, stat=Remote protocol error
Feb 21 17:05:11 mail sendmail[32708]: l1LC4dhP032463: l1LC5BhO032708: DSN: Remote protocol error
Feb 21 17:05:11 mail sendmail[32708]: l1LC5BhO032708: SYSERR(root): mail1.eraa.com. config error: mail loops back to me (MX problem?)
Feb 21 17:05:11 mail sendmail[32708]: l1LC5BhO032708: to= , delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30000, relay=mail1.eraa.com. [127.0.0.1], dsn=5.3.5, stat=Local configuration error
Feb 21 17:05:11 mail sendmail[32708]: l1LC5BhO032708: l1LC5BhP032708: return to sender: Local configuration error
Feb 21 17:05:11 mail sendmail[32708]: l1LC5BhP032708: to=/dev/null, ctladdr=db (2/0), delay=00:00:00, xdelay=00:00:00, mailer=*file*, pri=30000, dsn=2.0.0, stat=Sent

Вот если бы автор показал egrep 090245 maillog, то было бы яснее,кто, что и кому отправлял, и какой случай с «mail loops» тут имеет место.

Хотя вопросы к представленному здесь local-host-names у меня тоже имеются.

Источник

Mail is looping error

Кто-нибудь может мне доходчиво объяснить как избежать ошибки
«553 5.3.5 mx.site.ru. config error: mail loops back to me (MX problem?)»
при отправке sendmailом письма на свой же домен?

Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх
  • freebsd config error: mail loops back to me (MX problem?), lavr, 18:49 , 25-Июл-05, ( 1 )
    • freebsd config error: mail loops back to me (MX problem?), alfabrake, 19:02 , 25-Июл-05, ( 2 )
      • freebsd config error: mail loops back to me (MX problem?), lavr, 19:59 , 25-Июл-05, ( 3 )
        • freebsd config error: mail loops back to me (MX problem?), alfabrake, 12:57 , 26-Июл-05, ( 4 )
          • freebsd config error: mail loops back to me (MX problem?), lavr, 12:59 , 26-Июл-05, ( 5 )
            • freebsd config error: mail loops back to me (MX problem?), alfabrake, 13:16 , 26-Июл-05, ( 6 )
              • freebsd config error: mail loops back to me (MX problem?), lavr, 14:06 , 26-Июл-05, ( 7 )

Индекс форумов | Темы | Пред. тема | След. тема

>Кто-нибудь может мне доходчиво объяснить как избежать ошибки
>»553 5.3.5 mx.site.ru. config error: mail loops back to me (MX problem?)»
>
>при отправке sendmailом письма на свой же домен?
>
>такое ощущение, что это http://www.opennet.ru/docs/RUS/sendmail_faq/section4.html#4.5
>перевели в программе-«переводчике». Ничего не понятно 🙁

читай на английском, там ну все прозрачно и понятно.

2 . «freebsd config error: mail loops back to me (MX problem?)»
Сообщение от alfabrake on 25-Июл-05, 19:02 (MSK)

>читай на английском, там ну все прозрачно и понятно.
почитал. внимательно:

There are a couple of additional cases where you don’t actually want local delivery, and thus adding domain.net to class w is not the right fix:

When relay.domain.net should just be acting as a forwarder, e.g. a firewall/gateway box. The proper fix could be to set up a mailertable entry for domain.net.

When relay.domain.net is a secondary (etc.) MX, and the MX mistakenly points to a CNAME or other «non-canonical» name [this gives «config error: mail loops back to me (MX problem?)»]. The proper fix is to point the MX at the actual name, a «work-around» to add the MX target to class w.

немного непонятна вот эта фраза «a «work-around» to add the MX target to class w.»

mailertable мне не помогает 🙁
пишу @domain.ru smtp:mx.domain.ru

появляется та же ошибка!

В днс все майлеры указано явно, без всяких CanonicalNAMEs

Думаю сделать следующее, попрбовать сделать это с двумя mail серверами:
C помощью mailertable переправлять все на второй MX, а второй будет переправлять на первый. Но это как то криво. С одним-то сервером можно сделать?

Удалить Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

3 . «freebsd config error: mail loops back to me (MX problem?)»
Сообщение от lavr on 25-Июл-05, 19:59 (MSK)

>>читай на английском, там ну все прозрачно и понятно.
>почитал. внимательно:

первый типа основной вариант — когда почта отправляется с машины
которая является почтовым релеем (MX на нее указывает) и отправляет
в итоге сама на себя с выдачей об ошибке — необходимо внести
в /etc/mail/local-host-names (в старых версиях sendmail.cw)
— домен, типа почта на zhopa.ru через mx=relay.zhopa.ru
вот zhopa.ru и нужно внести в local-host-names/sendmail.cw в дополнение
ко всем локальным именам машины на которые может прийти почта или есть
MX’ы

Еще два варианта связаны:
— один со вторым MX’ом (secondary)
— другой с CNAME (этот вопче жопа)

соответственно, если мы не хотим локальной доставки zhopa.ru в этих
случаях внесение в local-host-names (оно же class w) не является
удачным решением (даже наоборот)

>There are a couple of additional cases where you don’t actually want
>local delivery, and thus adding domain.net to class w is not
>the right fix:
>
>When relay.domain.net should just be acting as a forwarder, e.g. a firewall/gateway
>box. The proper fix could be to set up a mailertable
>entry for domain.net.

чтобы relay.zhopa.ru просто форвардил почту — выступал типа mail-hub’а
или mailgate’а — правильное решение воспользоваться mailertable для
zhopa.ru

>When relay.domain.net is a secondary (etc.) MX, and the MX mistakenly points
>to a CNAME or other «non-canonical» name [this gives «config error:
>mail loops back to me (MX problem?)»]. The proper fix is
>to point the MX at the actual name, a «work-around» to
>add the MX target to class w.

если relay.zhopa.ru — является secondary MX’ом и MX ошибочно указывает
на каноническое имя CNAME (нельзя MX’ы ставить на RR=CNAME, грозит зацикливанием) получем зацикливание mail loops back to me.
Правильно будет произвести правку в DNS чтобы MX указывал на FQDN
которое имеет RR=A, вместо обходного «маневра» добавлением в класс w
(local-host-name/sendmail.cw) соответствующей записи

>немного непонятна вот эта фраза «a «work-around» to add the MX target
>to class w.»
>
>mailertable мне не помогает 🙁
>пишу @domain.ru smtp:mx.domain.ru
>
>появляется та же ошибка!
>
>В днс все майлеры указано явно, без всяких CanonicalNAMEs
>
>Думаю сделать следующее, попрбовать сделать это с двумя mail серверами:
>C помощью mailertable переправлять все на второй MX, а второй будет переправлять
>на первый. Но это как то криво. С одним-то сервером можно сделать?
>

Удалить Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

4 . «freebsd config error: mail loops back to me (MX problem?)»
Сообщение от alfabrake on 26-Июл-05, 12:57 (MSK)

:))) Прикольный примерчик
>
>первый типа основной вариант — когда почта отправляется с машины
>которая является почтовым релеем (MX на нее указывает) и отправляет
>в итоге сама на себя с выдачей об ошибке

Вот это ОЧЕНЬ похоже на мой вариант.

>- необходимо внести
>в /etc/mail/local-host-names (в старых версиях sendmail.cw)
>- домен, типа почта на zhopa.ru через mx=relay.zhopa.ru
>вот zhopa.ru и нужно внести в local-host-names/sendmail.cw в дополнение
>ко всем локальным именам машины на которые может прийти почта или есть
>
>MX’ы
>

Только решение это мне не помогает. Если так прописать — sendmail ругается, что нет такого пользователя 🙁

>Еще два варианта связаны:
>- один со вторым MX’ом (secondary)
>- другой с CNAME (этот вопче жопа)
>
>соответственно, если мы не хотим локальной доставки zhopa.ru в этих
>случаях внесение в local-host-names (оно же class w) не является
>удачным решением (даже наоборот)
>

Мне как раз и надо, чтобы не было локальной доставки при отправлении самому себе!

>чтобы relay.zhopa.ru просто форвардил почту — выступал типа mail-hub’а
>или mailgate’а — правильное решение воспользоваться mailertable для
>zhopa.ru
>
>
>если relay.zhopa.ru — является secondary MX’ом и MX ошибочно указывает
>на каноническое имя CNAME (нельзя MX’ы ставить на RR=CNAME, грозит зацикливанием) получем
>зацикливание mail loops back to me.
> Правильно будет произвести правку в DNS чтобы MX указывал на FQDN
>
>которое имеет RR=A, вместо обходного «маневра» добавлением в класс w
>(local-host-name/sendmail.cw) соответствующей записи
>

вот конфиг DNS
.
@ IN A IPadress1
@ IN MX 10 mx

Удалить Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

5 . «freebsd config error: mail loops back to me (MX problem?)»
Сообщение от lavr on 26-Июл-05, 12:59 (MSK)

>:))) Прикольный примерчик
>>
>>первый типа основной вариант — когда почта отправляется с машины
>>которая является почтовым релеем (MX на нее указывает) и отправляет
>>в итоге сама на себя с выдачей об ошибке
>
>Вот это ОЧЕНЬ похоже на мой вариант.
>
>>- необходимо внести
>>в /etc/mail/local-host-names (в старых версиях sendmail.cw)
>>- домен, типа почта на zhopa.ru через mx=relay.zhopa.ru
>>вот zhopa.ru и нужно внести в local-host-names/sendmail.cw в дополнение
>>ко всем локальным именам машины на которые может прийти почта или есть
>>
>>MX’ы
>>
>
>Только решение это мне не помогает. Если так прописать — sendmail ругается,
>что нет такого пользователя 🙁
>
>>Еще два варианта связаны:
>>- один со вторым MX’ом (secondary)
>>- другой с CNAME (этот вопче жопа)
>>
>>соответственно, если мы не хотим локальной доставки zhopa.ru в этих
>>случаях внесение в local-host-names (оно же class w) не является
>>удачным решением (даже наоборот)
>>
>
>Мне как раз и надо, чтобы не было локальной доставки при отправлении
>самому себе!
>
>>чтобы relay.zhopa.ru просто форвардил почту — выступал типа mail-hub’а
>>или mailgate’а — правильное решение воспользоваться mailertable для
>>zhopa.ru
>>
>>
>>если relay.zhopa.ru — является secondary MX’ом и MX ошибочно указывает
>>на каноническое имя CNAME (нельзя MX’ы ставить на RR=CNAME, грозит зацикливанием) получем
>>зацикливание mail loops back to me.
>> Правильно будет произвести правку в DNS чтобы MX указывал на FQDN
>>
>>которое имеет RR=A, вместо обходного «маневра» добавлением в класс w
>>(local-host-name/sendmail.cw) соответствующей записи
>>
>
>вот конфиг DNS
>.
>@ IN
> A IPadress1
>@ IN
> MX 10 mx
>
>mx IN
>A IPadress1
>.

sorry, магией не занимаюсь и в мазохизме замечен не был

Удалить Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

6 . «freebsd config error: mail loops back to me (MX problem?)»
Сообщение от alfabrake on 26-Июл-05, 13:16 (MSK)

>sorry, магией не занимаюсь и в мазохизме замечен не был

ладно. буду экспериментировать
все равно спасибо, lavr 🙂

Удалить Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

7 . «freebsd config error: mail loops back to me (MX problem?)»
Сообщение от lavr on 26-Июл-05, 14:06 (MSK)

>>sorry, магией не занимаюсь и в мазохизме замечен не был
>
>
>ладно. буду экспериментировать
>все равно спасибо, lavr 🙂

не на чем, на будущее совет — хочется конкретного решения проблемы, не
бойся дать реальные данные, потому как на XXX никто отвечать и гадать
не будет.

Источник

Adblock
detector

Доброго времени суток,
Столкнулся с проблемой, решение которой найти самому пока не удается.

Имею выделенную виртуалку в корпоративной сети, на ней крутится LAMP. Появилась необходимость отправлять уведомления по почте (только исходящие, входящие не требуются), формируются письма средствами PHP через mail.

Для этих целей установил postfix. Настройки ниже.
Проблем с локальной доступностью сервера не наблюдаю, на телнет по 25му порту падаю с другой локальной машины без проблем

telnet localnetwork-ip 25
ehlo localhost
250-gnoc-ts
250-PIPELINING
250-ETRN
….

main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA’s job.
append_dot_mydomain = no

# Uncomment the next line to generate «delayed mail» warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = gnoc-ts
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = _ALL_, gnoc-ts, gnocts, localhost.localdomain, localhost
relayhost =
mynetworks_style = subnet
mynetworks = 10.40.171.0/24, 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

Для тестирования использую скрипт

<?php
$result = mail(‘my_email@list.ru’, ‘subject’, ‘message’);
if($result)
{
echo ‘все путем’;
}
else
{
echo ‘что-то не так’;
}
?>

По выполнению скрипта получаю «все путем», письма не доставляются. В логах имеем connection refused

Feb 15 03:45:23 gnocts postfix/qmgr[3862]: 3C192618DB: from=, size=312, nrcpt=1 (queue active)
Feb 15 03:45:23 gnocts postfix/qmgr[3862]: 5E48B619AC: from=, size=312, nrcpt=1 (queue active)
Feb 15 03:45:23 gnocts postfix/smtp[6387]: connect to mx2.mts.ru[213.87.44.5]:25: Connection refused
Feb 15 03:45:23 gnocts postfix/smtp[6387]: connect to mx4.mts.ru[213.87.44.6]:25: Connection refused
Feb 15 03:45:23 gnocts postfix/smtp[6388]: connect to mx2.mts.ru[213.87.44.5]:25: Connection refused
Feb 15 03:45:23 gnocts postfix/smtp[6388]: connect to mx4.mts.ru[213.87.44.6]:25: Connection refused
Feb 15 03:45:23 gnocts postfix/smtp[6387]: 3C192618DB: to=, relay=none, delay=8757, delays=8757/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to mx4.list.ru[213.87.44.6]:25: Connection refused)
Feb 15 03:45:23 gnocts postfix/smtp[6388]: 5E48B619AC: to=, relay=none, delay=8754, delays=8754/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to mx4.list.ru[213.87.44.6]:25: Connection refused)

Feb 15 03:15:23 gnocts postfix/smtp[6227]: connect to mxs.mail.ru[217.69.139.150]:25: Connection refused
Feb 15 03:15:23 gnocts postfix/smtp[6227]: connect to mxs.mail.ru[94.100.180.150]:25: Connection refused
Feb 15 03:15:23 gnocts postfix/smtp[6227]: D23C1619AF: to=, relay=none, delay=2102, delays=2102/0.01/0.04/0, dsn=4.4.1, status=deferred (connect to mxs.mail.ru[94.100.180.150]:25: Connection refused)
Feb 15 03:15:23 gnocts postfix/qmgr[3862]: message repeated 3 times: [ D23C1619AF: from=, size=343, nrcpt=1 (queue active)]

В чем может быть причина?

З.Ы. все работает на Ubuntu 12 на VPS в локальной сети. Мне необходим минимальный функционал отправки уведомлений внутри локальной сети.

Забыл добавить, что сервер не привязан ни к какому домену, в dns соответственно записей нет. Как организовать простую отправку оповещений?

I would like to get any advice for my issue to run script on /etc/aliases.
At first, here are my envirements/script.

  • OS : centos 6
  • script : python 2.6.6
  • mail : sendmail-8.14 / dovecot-2x
  • python script (it’s very simple for testing)

import sys

f = open(«aa.txt», ‘w’)

for i in range(1, 5):
data = «%d n» % i
f.write(data)

f.close()
sys.exit()

and then I did some congiguration to use smrsh like, make link on /etc/smrsh/, move script on /etc/smrsh/…

and then modified the /etc/aliases as below:

testuser:  "|/etc/smrsh/python /etc/smrsh/aa.py"

and then run newaliases.

When I send email to testuser user, maillog shows error as below:
(sorry for changing some info like IP, domain)

Mar 13 11:14:38 localhost sendmail[8153]: s2DBEcX7008153: from=<ttt@test.com>, size=4448, class=0, nrcpts=1, msgid=<B75C8C1216C9824DBF46410575577E294559AC17@test.com>, proto=ESMTP, daemon=MTA, relay=relay.test.com [xx.xxx.000.xx]
Mar 13 11:14:39 localhost sendmail[8154]: s2DBEcX7008153: to="|/etc/smrsh/python /etc/smrsh/aa.py", ctladdr=<testuser@[xx.xx.xx.xx]> (8/0), delay=00:00:01, xdelay=00:00:01, mailer=prog, pri=34652, dsn=5.3.0, stat=unknown mailer error 1
Mar 13 11:14:39 localhost sendmail[8154]: s2DBEcX7008153: s2DBEdX7008154: DSN: unknown mailer error 1

but, just forwarding email via /etc/aliases works very well like,
testuser : test@zzz.com

I tried to run with smrsh on the shell :

smrsh -c «|/etc/smrsh/python /etc/smrsh/aa.py»

it also works very well.

here are my sendmail.cf for Mprog,

Mlocal,         P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
                T=DNS/RFC822/X-Unix,
                A=procmail -t -Y -a $h -d $u
Mprog,          P=/usr/sbin/smrsh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/,
                T=X-Unix/X-Unix/X-Unix,
                A=smrsh -c $u

and, /etc/smrsh/

lrwxrwxrwx.  1 root root   17 Mar 13 09:01 procmail -> /usr/bin/procmail
lrwxrwxrwx.  1 root root   15 Mar 13 09:08 python -> /usr/bin/python
lrwxrwxrwx.  1 root root   15 Mar 13 09:42 smrsh -> /usr/sbin/smrsh
lrwxrwxrwx.  1 root root   17 Feb 13 09:17 vacation -> /usr/bin/vacation
-rwxr-xr-x.  1 root root  125 Mar 13 11:27 aa.py
-rw-r--r--.  1 root root   12 Mar 13 11:27 aa.txt

Could someone help to slove this problem?
Many Thanks!

Hello There,

Testing a new exchange 2003 box which is published through MS ISA.  The current old Post.Office server is removed temporarilly.  The same IP is on the outside interface of an MS ISA box which has a server published rule to a new MS Exchange Server 2003 on the inside of the ISA box network.  Sending email into the domain results in kick back message to sender with error 554 5.5.0 Remote protocol error.  However the email still gets delievered.  AOL was not generating kick back protocol error but other test ISPs were.

Telnetting to the SMTP port and manually entering an email results in delivered email with no kickback.  We have checked DNS (forward and reverse), default delivery policies, SMTP settings turned on SMTP logging etc.  Nothing provides any useful information on the problem.  If you put the old server back online then kick backs go away.  Only possible theories is something about DNS though we have tried both leaving IP the same and leaving Exchange active on new IP and altering the DNS records.  Or something about ISA is causing it or maybe something in Exchange 2003 itself but we have checked all MS technotes about inbound SMTP and find nothing wrong.  

Can anyone recommend anything else to check or try in trouble shooting.  Searching web and MS site for this has been pretty vague if anything at all.

Thanks
George

Skip to forum content

iRedMail

Works on CentOS, Rocky, Debian, Ubuntu, FreeBSD, OpenBSD

You are not logged in. Please login or register.

Sep 30, 2022: iRedMail-1.6.2 has been released.



  • Spider Email Archiver: Lightweight on-premises email archiving software, developed by iRedMail team.
  • Join our Telegram group (@iredmail_chat) to get help from other iRedMail users.

Pages 1

You must login or register to post a reply

1 2017-11-28 09:18:12

  • copenhaus
  • Member
  • Offline
  • Registered: 2017-11-28
  • Posts: 2

Topic: 550 5.5.1 Protocol error

==== Required information ====
— iRedMail version (check /etc/iredmail-release):
— Linux/BSD distribution name and version:
— Store mail accounts in which backend (LDAP/MySQL/PGSQL):
— Web server (Apache or Nginx):
— Manage mail accounts with iRedAdmin-Pro?
— [IMPORTANT] Related original log or error message is required if you’re experiencing an issue.
====

—-

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Stable release is out.

2 Reply by copenhaus 2017-11-28 09:27:26

  • copenhaus
  • Member
  • Offline
  • Registered: 2017-11-28
  • Posts: 2

Re: 550 5.5.1 Protocol error

==== Required information ====
— iRedMail version (check /etc/iredmail-release): 0.9.7
— Linux/BSD distribution name and version: Ubuntu 16.04.3 LTS
— Store mail accounts in which backend (LDAP/MySQL/PGSQL): 10.0.31 MariaDB
— Web server (Apache or Nginx):Nginx
— Manage mail accounts with iRedAdmin-Pro?
— [IMPORTANT] Related original log or error message is required if you’re experiencing an issue.
====

hi, newbie here, just followed instruction for installing iRedmail on a fresh Ubuntu found in LinuxBabe…

Immediately after reboot, I immediately telnet to port 25 and tried with «rcpt to» with the domain that I defined during installation, but I got «550 5.5.1 Protocol error»…

What am I doing wrong?

3 Reply by ZhangHuangbin 2017-11-29 19:14:02

  • ZhangHuangbin
  • ZhangHuangbin
  • iRedMail Developers
  • Offline
  • Registered: 2009-05-06
  • Posts: 30,080

Re: 550 5.5.1 Protocol error

Port 25 is running «postscreen» service instead of normal smtp service to catch more spams, so it’s expected.

if you need to send email, please follow our guide to setup your mail client application, or use webmail directly.
https://docs.iredmail.org/#mua

4 Reply by OzEdri 2018-05-15 21:03:00

  • OzEdri
  • OzEdri
  • Member
  • Offline
  • Registered: 2018-05-15
  • Posts: 5

Re: 550 5.5.1 Protocol error

Isn’t there a way to use the normal SMTP service or to configure «postscreen» to allow sending mails via telnet?

5 Reply by swejun 2018-05-15 23:05:22

  • swejun
  • Member
  • Offline
  • Registered: 2017-07-26
  • Posts: 84

Re: 550 5.5.1 Protocol error

OzEdri wrote:

Isn’t there a way to use the normal SMTP service or to configure «postscreen» to allow sending mails via telnet?

YES, you can of course use telnet port 25.
keep in mind that postscreen:
—  will monitor the time before the client issues «ehlo my.server.name», and if you are to quick, consider the conenction as spammer.
# man postscreen

# postconf |grep postsc
Check out the active settings, like postscreen_greet_wait and postscreen_greet_action

6 Reply by OzEdri 2018-05-15 23:29:21

  • OzEdri
  • OzEdri
  • Member
  • Offline
  • Registered: 2018-05-15
  • Posts: 5

Re: 550 5.5.1 Protocol error

Thank you.
So what the original poster (or me) needs to do in order for it to work properly?
We’re both getting the same behavior — after

we’re getting

521 5.5.1 Protocol error

Connection to host lost.

BTW, following what you wrote I tried waiting a little so I won’t be considered as a spammer, and this time the

error didn’t appear, but the

did…

7 Reply by swejun 2018-05-16 21:05:20

  • swejun
  • Member
  • Offline
  • Registered: 2017-07-26
  • Posts: 84

Re: 550 5.5.1 Protocol error

Did you get protocol error directly after giving the telnet < server> 25 command, or after giving the rcpt to command?
1) try the command local on your mail server first
2) check the /var/log/maillog 
3) this is how it looks when I run it from my workstation to the mail server

telnet 10.4.0.11 25
Trying 10.4.0.11…
Connected to 10.4.0.11.
Escape character is ‘^]’.
220 mail2.company.com ESMTP Postfix
<< Wait 5 s >>
ehlo myhost.int.company.com

250-mail2.company.com
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

mail from:someone@domain.com

250 2.1.0 Ok

rcpt to:internal.user@company.com

250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
hello
.

250 2.0.0 Ok: queued as 774D35D6E2
quit
221 2.0.0 Bye
Connection closed by foreign host.

8 Reply by OzEdri 2018-05-17 01:31:20

  • OzEdri
  • OzEdri
  • Member
  • Offline
  • Registered: 2018-05-15
  • Posts: 5

Re: 550 5.5.1 Protocol error

I got the 521 5.5.1 Protocol error right after I type E for EHLO.

  1. It’s working locally.

  2. Nothing too special other than the fact that postscreen is handeling the mail and not postfix/smtp

  3. It’s looking very good on your side.
    This is exactly the behavior I’m expecting.
    Thank you for your detailed example!

To be honest — I tried way too many configuration changes, and I reverted them — but in vain.
I just installed it (iRedMail 0.9.8) from scratch with the following configuration:

  • CentOS 7.5.1804

  • SELINUX and firewalld disabled

  • All of the packages are updated (yum update -y)

  • default mail storage path

  • Nginx web server

  • PostgreSQL backend

  • Optional componenets: Roundcubemail and iRedAdmin (without netdata and Fail2ban)

This always fails — I can’t connect to the server via SMTP or web, so I installed with all of the default optional components (also netdata and Fail2ban) — and it always works — I can connect to it via SMTP and web. (I’ll open another post for them so they’ll know about it)

And now I’m back to where I started — it’s working locally, but when trying remotely I’m getting:

451 4.7.1 <postmaster@mail.englab.forescout.com>: Recipient address rejected: Intentional policy rejection, please try again later

or if you prefer, from /var/log/maillog:

May 16 19:45:19 il-lab-mail postfix/smtpd[18827]: NOQUEUE: reject: RCPT from unknown[10.40.0.109]: 451 4.7.1 <postmaster@mail.englab.forescout.com>: Recipient address rejected: Intentional policy rejection, please try again later; from=<oz.edri@forescout.com> to=<postmaster@mail.englab.forescout.com> proto=ESMTP helo=<mail.englab.forescout.com>

According to their Errors you may see while maintaining iRedMail server page I just should retry — but it won’t work.

According to their answer in this forum (link) it’s greylisting, and it can be disabled.

So I did it in combination with other suggested methods they suggested in their documentation — and this is how I got the 521 5.5.1 Protocol error

Anyway, I’m going way to off topic now.
I’ll try with the new setup and with minor configuration changes while I backup and revert if needed.

Thank you for your assistance.

9 Reply by swejun 2018-05-17 19:56:13

  • swejun
  • Member
  • Offline
  • Registered: 2017-07-26
  • Posts: 84

Re: 550 5.5.1 Protocol error

I can’t say I’m an expert in Postfix, although I’ve done a few installations.
The good part with the iRedMail project, that it’s rather easy to install from scratch, and You get all the features
configured according with best practices with security in mind.
This means that out-of-the box it comes with
— Greylisting acivated, but with an extensive white list
— Postscreen to catch bad behaving connections
— ldap/SQL server user lookup before accepting
— Not possible to relay if not using SASL login via port 587
etc.

All in all, this means it can be hard to verify with «telnet 25», because you would
somehow fail the antispam features.
— The connected server MUST have ab DNS resolvable name
— The senders mail address must be a valid domain name
— ……

Most of these features can be disabled or tweaked in Postfix, iredAPD and postscreen
(documented on iredmail doc site)

When I first installed my server, I used my Gmail account to verify external connections.
Then I know for sure that it behaves correctly.
https://mxtoolbox.com/ has got a good set of tools to verify dns settings for your domain, and also to test
smtp connections. I used the MX and SMTP tools

Regards
/I

10 Reply by ZhangHuangbin 2018-05-18 09:35:20

  • ZhangHuangbin
  • ZhangHuangbin
  • iRedMail Developers
  • Offline
  • Registered: 2009-05-06
  • Posts: 30,080

Re: 550 5.5.1 Protocol error

OzEdri wrote:

Isn’t there a way to use the normal SMTP service or to configure «postscreen» to allow sending mails via telnet?

Why are you insisting in sending email through port 25?

11 Reply by OzEdri 2018-05-24 21:10:17

  • OzEdri
  • OzEdri
  • Member
  • Offline
  • Registered: 2018-05-15
  • Posts: 5

Re: 550 5.5.1 Protocol error

Because this is what I deployed iRedMail for — simple unsecure mail send via SMTP and simple web interface for interacting with the mail account.

Posts: 11

Pages 1

You must login or register to post a reply

Generated in 0.010 seconds (73% PHP — 27% DB) with 8 queries

When connecting to my windows server 2008 machine as the adminstrator, I often get the error message » because of a protocol error, the remote session will be disconnected … «

This always happens especially when I open a browser in the server machine, as the webpage is being loaded. After the the loading finish, connection will be safe.

When I search for the event log in the server machine, I always find a warning administrator event:
«Microsoft-Windows-TerminalServices-PnPDevices: Redirection of additional supported devices is disabled by policy.»

But following this event ID 36 and its solution http://technet.microsoft.com/en-us/library/cc775202%28WS.10%29.aspx, I cannot work around. I also change the remote desktop settings to cross out any PnP device (to exactly all devices will not be brought to the remote session) but problem still remains.

For other possible solutions, I have update both client machine and server machine. I have tried different client machines, with OS being windows XP pro or windows server 2003. I have tried different versions of RD applications MSTSC.exe. I also patched a hotfix for windows 2008. In short, I have tried many official and non-official workarounds for this issue but no one works actually.

I hope someone could give a real answer. Thanks!

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Driver irql error
  • Driver install error 0x000007d1 root
  • Driver error compensation ableton это
  • Driver error code 10 windows 10
  • Driver initialize error face injector

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии