Postfix error too many connections from

В логах постфикса простыни (как минимум сотни строк) вида Feb 1 19:33:24 politepol postfix/qmgr[1353]: ED856E15D2: from=, size=813, nrcpt=1 (queue active) Feb 1 19:33:24 politepol postfix/qmgr[1353]: E8DCCE5606: from=<noreply...

В логах постфикса простыни (как минимум сотни строк) вида

Feb  1 19:33:24 politepol postfix/qmgr[1353]: ED856E15D2: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: E8DCCE5606: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: EAEAAE76E5: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: EEF84E5600: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: EA402E423E: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: E824AE0C3A: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: E8BAEE76A7: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: EF9DAE3ACD: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)
Feb  1 19:33:24 politepol postfix/qmgr[1353]: E0400E0CC7: from=<noreply@politepol.com>, size=813, nrcpt=1 (queue active)

и

Feb  1 19:38:25 politepol postfix/error[22966]: EC5C1E5183: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=46668, delays=46667/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22934]: EC073E2EAD: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=75983, delays=75982/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22921]: EED77E1F62: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=97139, delays=97138/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22925]: EAD7CE20CB: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=96956, delays=96955/1.4/0/0, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22932]: E9CADE5123: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=46708, delays=46707/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22961]: EA4FFE210C: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=96924, delays=96923/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22975]: E0CA1E0D0B: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=109769, delays=109768/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22968]: E1837E78CE: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=17218, delays=17217/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22946]: EA1BEE0DB6: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=109533, delays=109532/1.4/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)
Feb  1 19:38:25 politepol postfix/error[22972]: E487FE5770: to=<fgfdsfhjjhkj@yandex.com>, relay=none, delay=42330, delays=42329/1.4/0/0, dsn=4.7.0, status=deferred (delivery temporarily suspended: host mail.gandi.net[217.70.178.9] refused to talk to me: 421 4.7.0 relay4-d.mail.gandi.net Error: too many connections from 46.226.108.155)

На этом же сервере лежит веб приложение. Которое может отправлять письма на fgfdsfhjjhkj@yandex.com (этот имейл фигурирует в логах). Единственное место где может быть отправлено множество писем на мой взгляд — это страница восстановления пароля, но я эту функцию отключил. Может ли быть проблема с postfix-ом?

Может нужен конфиг postfix-а (main.cf)? Вот он:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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 = politepol.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, politepol.com, localhost.com, , localhost
# relayhost =
mynetworks = 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

relayhost = mail.gandi.net:submission
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_auth_enable = yes
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain, login
smtp_sasl_security_options = noanonymous
smtp_generic_maps = hash:/etc/postfix/generic
#smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

Буду благодарен за любой комментарий

Hello
We have a server installed during the last year and we’ve not problems before yesterday. Suddenly all the messages to all different domains started to return 451 Error: Sorry, too many connections from «Internal IP». This occurs with destinations to gmail, hotmail, and other domains.
I’ve been trying several setups for bind but It seems not to be the problem. The complet log for a mail send to hotmail is:

Apr 12 20:19:36 mail amavis[13418]: (13418-01) FWD via SMTP:  -> ,BODY=7BIT 250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as A975B5029D0

Apr 12 20:19:36 mail amavis[13418]: (13418-01) Passed CLEAN, MYNETS LOCAL [192.1.1.151] [192.1.1.151] -> , Message-ID: , mail_id: FrgfPtEqvsEO, Hits: 3.679, size: 2152, queued_as: A975B5029D0, 563 ms

Apr 12 20:19:36 mail postfix/smtp[16275]: 1EB0B5028EB: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.6, delays=0.02/0.01/0.01/0.56, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as A975B5029D0)

Apr 12 20:19:36 mail postfix/qmgr[13669]: 1EB0B5028EB: removed

Apr 12 20:19:36 mail postfix/smtp[16279]: A975B5029D0: host mx3.hotmail.com[65.55.92.184] refused to talk to me: 451 Sorry, too many connections from 192.1.1.151, try again later

Apr 12 20:19:36 mail amavis[13418]: (13418-01) extra modules loaded: /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/autosplit.ix, /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/randomize.al, IO/Socket/SSL.pm, Net/LDAP/Extension.pm, Net/SSLeay.pm

Apr 12 20:19:36 mail postfix/smtp[16279]: A975B5029D0: host mx1.hotmail.com[65.54.188.110] refused to talk to me: 451 Sorry, too many connections from 192.1.1.151, try again later

Apr 12 20:19:36 mail postfix/smtp[16279]: A975B5029D0: host mx3.hotmail.com[65.55.37.120] refused to talk to me: 451 Sorry, too many connections from 192.1.1.151, try again later

Apr 12 20:19:36 mail postfix/smtp[16279]: A975B5029D0: host mx4.hotmail.com[65.55.37.104] refused to talk to me: 451 Sorry, too many connections from 192.1.1.151, try again later

Apr 12 20:19:36 mail postfix/smtp[16279]: A975B5029D0: to=, relay=mx2.hotmail.com[65.55.92.168]:25, delay=0.04, delays=0.01/0.01/0.02/0, dsn=4.0.0, status=deferred (host mx2.hotmail.com[65.55.92.168] refused to talk to me: 451 Sorry, too many connections from 192.1.1.151, try again later)

Dig returns:
any:

; <<>> DiG 9.7.0-P1 <<>> domain.com any

;; global options: +cmd

;; Got answer:

;; ->>HEADER<
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:

;domain.com. IN ANY
;; ANSWER SECTION:

domain.com. 604800 IN SOA domain.com. root.domain.com. 2 604800 86400 2419200 604800

domain.com. 604800 IN MX 10 mail.domain.com.

domain.com. 604800 IN NS mail.domain.com.

domain.com. 604800 IN A 192.1.1.151
;; ADDITIONAL SECTION:

mail.domain.com. 604800 IN A 192.1.1.151
;; Query time: 0 msec

;; SERVER: 192.1.1.151#53(192.1.1.151)

;; WHEN: Fri Apr 12 20:21:49 2013

;; MSG SIZE rcvd: 155

mx:

; <<>> DiG 9.7.0-P1 <<>> domain.com mx

;; global options: +cmd

;; Got answer:

;; ->>HEADER<
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:

;domain.com. IN MX
;; ANSWER SECTION:

domain.com. 604800 IN MX 10 mail.domain.com.
;; AUTHORITY SECTION:

domain.com. 604800 IN NS mail.domain.com.
;; ADDITIONAL SECTION:

mail.domain.com. 604800 IN A 192.1.1.151
;; Query time: 0 msec

;; SERVER: 192.1.1.151#53(192.1.1.151)

;; WHEN: Fri Apr 12 20:23:57 2013

;; MSG SIZE rcvd: 82

host $(hostname)

mail.domain.com has address 192.1.1.151

I’ve been searching this errors 451 relative to Zimbra and Postfix but I cannot find the solution. Also I cannot understand why an internet server like hotmail (or another else) returns the missatge with internal IP: 451 Sorry, too many connections from 192.1.1.151
Thanks in advance

обобщу всю инфу:
настройки моего сервера:

Код: Выделить всё

hostlist trusted_hosts_list = 127.0.0.1:/etc/exim/trusted_hosts (в доверенных хостах 123.123.123.123 присутствует)
rfc1413_query_timeout = 30s
smtp_accept_max = 700
smtp_accept_max_per_host = 
${lookup{$sender_host_address}nwildlsearch{/etc/exim/max-per-host}} (в max-per-host для 123.123.123.123:300 для остальных *:15)
smtp_accept_queue_per_connection = 30
smtp_accept_reserve = 300
smtp_reserve_hosts = 123.123.123.123/32
в аклах:
acl_check_connect:
        accept hosts = /etc/exim/no_enforce.list
        control = no_enforce_sync
        accept
на всякий добавил в no_enforce.list хост 123.132.123.123

теперь из логов:

2008-08-21 11:52:02 SMTP protocol violation: synchronization error (input sent without waiting for greeting): rejected connection from H=tot.mailserver.ru [123.123.123.123]

после занесения в доверенные стало просто:

2008-08-21 12:01:22 Connection from [123.123.123.123] refused: too many connections

вот логи с той стороны (postfix 2.4.6 причем smtp_always_send_ehlo = yes), попутно вопрос — сколько по-умолчанию у постфикса ожидание ответного приветствия?:

Aug 22 07:45:45 mailserver postfix/smtp[19552]: 45E7B5C12B: to=<moy_yashik@moyserver.ru>, relay=none, delay=137238, delays=137127/0.71/110/0, dsn=4.4.1, status=deferred (connect to moymail1.moyserver.ru[111.111.111.111]: Connection refused)
Aug 22 08:24:19 mailserver postfix/smtp[21583]: 76C585C163: conversation with main_mail.moyserver.ru[100.100.100.100] timed out while receiving the initial server greeting
Aug 22 08:24:45 mailserver postfix/smtp[21583]: 76C585C163: conversation with mail2.moyserver.ru[212.212.212.212] timed out while receiving the initial server greeting
Aug 22 08:25:15 mailserver postfix/smtp[21583]: connect to mail3.moyserver.ru[110.110.110.110]: Operation timed out (port 25)
Aug 22 08:25:45 mailserver postfix/smtp[21583]: connect to mail4.moyserver.ru[89.89.89.89]: Operation timed out (port 25)
Aug 22 08:25:45 mailserver postfix/smtp[21583]: connect to moymail1.moyserver.ru[111.111.111.111]: Connection refused (port 25)
Aug 22 08:25:45 mailserver postfix/smtp[21583]: 76C585C163: to=<moy_yashik@moyserver.ru>, relay=none, delay=86701, delays=86590/0.63/110/0, dsn=4.4.1, status=deferred (connect to moymail1.moyserver.ru[111.111.111.111]: Connection refused)
Aug 22 08:27:12 mailserver postfix/smtp[20981]: 6F5CD5C405: conversation with main_mail.moyserver.ru[100.100.100.100] timed out while receiving the initial server greeting
Aug 22 08:27:37 mailserver postfix/smtp[20981]: 6F5CD5C405: conversation with mail2.moyserver.ru[212.212.212.212] timed out while receiving the initial server greeting

Основной сервер, настройки которого я привел выше — это 100.100.100.100 (main_mail.moyserver.ru), остальные дополнительные серверы

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.

Postfix SMTP server: errors

Pages 1

You must login or register to post a reply

1 2011-04-15 19:20:35

  • busby
  • Member
  • Offline
  • Registered: 2011-04-15
  • Posts: 5

Topic: Postfix SMTP server: errors

Periodically, the mail     postmaster@mail.mydomain.tld I get these messages:

Transcript of session follows.

Out: 220 mail.mydomain.tld ESMTP Postfix (Debian/GNU)
In:  EHLO [10.0.0.216]
Out: 250-mail.mydomain.tld
Out: 250-PIPELINING
Out: 250-SIZE 15728640
Out: 250-ETRN
Out: 250-STARTTLS
Out: 250-AUTH PLAIN LOGIN
Out: 250-AUTH=PLAIN LOGIN
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250 DSN
In:  AUTH PLAIN
Out: 334
In:  AHNwQGF2aXRlay5ydQBSaGVuanFHZmhqa20=
Out: 235 2.7.0 Authentication successful
In:  MAIL FROM:<sp@avitek.ru> SIZE=1973882
Out: 250 2.1.0 Ok
In:  RCPT TO:<b????@sendermail.com>
Out: 451 4.3.0 <b    @sendermail.com>: Temporary lookup failure
In:  RSET
Out: 250 2.0.0 Ok
In:  RSET
Out: 250 2.0.0 Ok
In:  QUIT
Out: 221 2.0.0 Bye

Out: 220 mail.mydomain.tld ESMTP Postfix (Debian/GNU)
In:  HELO mail-server.prostosoft.ru
Out: 250 mail.mydomain.tld
In:  MAIL FROM:<user2@somedomain.com>
Out: 250 2.1.0 Ok
In:  RCPT TO:<user@mail.mydomain.tld>
Out: 451 4.3.0 <user@mail.mydomain.tld>: Temporary lookup failure
In:  QUIT
Out: 221 2.0.0 Bye

—-

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

2 Reply by ZhangHuangbin 2011-04-15 20:53:07

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

Re: Postfix SMTP server: errors

I’m a little confused. Seems you have a DNS lookup issue on your mail server.

Since postfix is running chrooted in /var/spool/postfix/ by default in iRedMail, it need several files for DNS lookup.

— /var/spool/postfix/etc/hosts. It should be same as /etc/hosts. You can simply copy from /etc/hosts. Keep them synced.
— /var/spool/postfix/etc/resolv.conf. It defines IP addresses of DNS servers. You should simply copy from /etc/resolv.conf, keep them synced.

Other two files are:
— /var/spool/postfix/etc/localtime
— /var/spool/postfix/etc/services

So please check these 4 files, and make sure they are up-to-date and correct.

3 Reply by busby 2011-04-19 21:58:08

  • busby
  • Member
  • Offline
  • Registered: 2011-04-15
  • Posts: 5

Re: Postfix SMTP server: errors

cat /var/log/mail.log | grep warning

Apr 18 17:16:51 mail postfix/proxymap[20271]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:18:23 mail postfix/proxymap[20271]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:23:02 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:23:02 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:24:30 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:24:30 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:25:40 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:25:40 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:26:51 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:26:51 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:29:14 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:29:14 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:31:52 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:31:52 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:34:34 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:34:34 mail postfix/proxymap[20361]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:37:46 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:37:46 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:39:31 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:39:31 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:42:42 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:42:42 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:44:33 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:44:33 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:45:35 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:45:35 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:48:12 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:48:12 mail postfix/proxymap[20568]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:56:00 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:56:00 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:57:22 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 17:57:22 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:00:07 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:00:07 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:01:11 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:01:11 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:03:40 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:03:40 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:07:17 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:07:17 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:10:00 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 18 18:10:00 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections
Apr 19 09:49:42 mail postfix/smtpd[27562]: warning: network_biopair_interop: error reading 5 bytes from the network: Connection reset by peer
Apr 19 17:28:13 mail postfix/proxymap[31825]: warning: mysql query failed: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation ‘=’
Apr 19 17:28:13 mail postfix/trivial-rewrite[31826]: warning: transport_maps lookup failure
Apr 19 18:56:14 mail postfix/proxymap[32442]: warning: mysql query failed: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation ‘=’
Apr 19 18:56:14 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure
Apr 19 18:56:38 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure
Apr 19 18:56:39 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure
Apr 19 18:56:40 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure
Apr 19 18:56:44 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure
Apr 19 18:56:48 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure
Apr 19 18:56:51 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure
Apr 19 18:56:53 mail postfix/trivial-rewrite[32444]: warning: transport_maps lookup failure

4 Reply by ZhangHuangbin 2011-04-20 09:16:11

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

Re: Postfix SMTP server: errors

busby wrote:

Apr 18 17:56:00 mail postfix/proxymap[21063]: warning: connect to mysql server 127.0.0.1: Too many connections

You can try to increase MySQL server setting «max_connections» in its config file (/etc/my.cnf, or /etc/mysql/my.cnf).

[mysqld]
set-variable = max_connections=1024

5 Reply by Znekar 2011-07-02 20:49:08 (edited by Znekar 2011-07-02 21:02:24)

  • Znekar
  • Member
  • Offline
  • Registered: 2011-06-30
  • Posts: 14

Re: Postfix SMTP server: errors

Since about 2 days I have this problems too:

Transcript of session follows.

 Out: 220 poseidon.mydomain.tld ESMTP Postfix (Ubuntu)
 In:  EHLO dd6936.domain.tld
 Out: 250-poseidon.mydomain.tld
 Out: 250-PIPELINING
 Out: 250-SIZE 15728640
 Out: 250-ETRN
 Out: 250-STARTTLS
 Out: 250-AUTH PLAIN LOGIN
 Out: 250-AUTH=PLAIN LOGIN
 Out: 250-ENHANCEDSTATUSCODES
 Out: 250-8BITMIME
 Out: 250 DSN
 In:  MAIL FROM:<www-data@senderdomain.tld> SIZE=3281
 Out: 250 2.1.0 Ok
 In:  RCPT TO:<user@mydomain.tld>
     ORCPT=rfc822;guestbook_check@senderdomain.tld
 Out: 451 4.3.0 <www-data@senderdomain.tld>: Temporary lookup failure
 In:  DATA
 Out: 554 5.5.1 Error: no valid recipients
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  QUIT
 Out: 221 2.0.0 Bye


For other details, see the local mail logfile

I got more than 500 of such Emails since the last 2 days.

The problems with too much mySQL connections I don´t see in my logfiles.

Any suggestions?

BTW
— /var/spool/postfix/etc/hosts
— /var/spool/postfix/etc/resolv.conf
— /var/spool/postfix/etc/localtime
— /var/spool/postfix/etc/services
are the same like in /etc

6 Reply by ZhangHuangbin 2011-07-03 00:38:16

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

Re: Postfix SMTP server: errors

7 Reply by Znekar 2011-07-03 01:16:32

  • Znekar
  • Member
  • Offline
  • Registered: 2011-06-30
  • Posts: 14

Re: Postfix SMTP server: errors

8 Reply by Znekar 2011-07-05 04:41:34 (edited by Znekar 2011-07-05 05:33:04)

  • Znekar
  • Member
  • Offline
  • Registered: 2011-06-30
  • Posts: 14

Re: Postfix SMTP server: errors

I have 2 more examples.

Email 1:

Transcript of session follows.

 Out: 220 poseidon.mydomain.tld ESMTP Postfix (Ubuntu)
 In:  EHLO j121po145.domain.tld
 Out: 250-poseidon.mydomain.tld
 Out: 250-PIPELINING
 Out: 250-SIZE 15728640
 Out: 250-ETRN
 Out: 250-STARTTLS
 Out: 250-AUTH PLAIN LOGIN
 Out: 250-AUTH=PLAIN LOGIN
 Out: 250-ENHANCEDSTATUSCODES
 Out: 250-8BITMIME
 Out: 250 DSN
 In:  MAIL FROM:<testfahrer@senderdomain.tld> BODY=8BITMIME
     ENVID=15__1_1501309757223_702_1309757401
 Out: 250 2.1.0 Ok
 In:  RCPT TO:<myuser@mydomain.tld> NOTIFY=FAILURE
 Out: 451 4.3.0 <testfahrer@senderdomain.tld>: Temporary lookup failure
 In:  DATA
 Out: 554 5.5.1 Error: no valid recipients
 In:  QUIT
 Out: 221 2.0.0 Bye


For other details, see the local mail logfile

Log Email 1:

Jul  4 22:10:36 poseidon postfix/smtpd[14957]: connect from j121po145.domain.tld[nnn.nnn.nnn.nnn]
Jul  4 22:10:36 poseidon postfix/trivial-rewrite[14922]: warning: transport_maps lookup failure
Jul  4 22:10:36 poseidon postfix/smtpd[14957]: NOQUEUE: reject: RCPT from j121po145.domain.tld[nnn.nnn.nnn.nnn]: 451 4.3.0 <testfahrer@senderdomain.tld>: Temporary lookup failure; from=<testfahrer@senderdomain.tld> to=<myuser@mydomain.tld> proto=ESMTP helo=<j121po145.domain.tld>
Jul  4 22:10:36 poseidon postfix/cleanup[14958]: 41E43252E04: message-id=<20110704201036.41E43252E04@poseidon.mydomain.tld>
Jul  4 22:10:36 poseidon postfix/qmgr[1513]: 41E43252E04: from=<double-bounce@poseidon.mydomain.tld>, size=1187, nrcpt=1 (queue active)
Jul  4 22:10:36 poseidon postfix/smtpd[14957]: disconnect from j121po145.domain.tld[nnn.nnn.nnn.nnn]

Email2:

Transcript of session follows.

 Out: 220 poseidon.mydomain.tld ESMTP Postfix (Ubuntu)
 In:  EHLO j121po155.domain.tld
 Out: 250-poseidon.mydomain.tld
 Out: 250-PIPELINING
 Out: 250-SIZE 15728640
 Out: 250-ETRN
 Out: 250-STARTTLS
 Out: 250-AUTH PLAIN LOGIN
 Out: 250-AUTH=PLAIN LOGIN
 Out: 250-ENHANCEDSTATUSCODES
 Out: 250-8BITMIME
 Out: 250 DSN
 In:  MAIL FROM:<??hr_geld@senderdomain.tld> BODY=8BITMIME
     ENVID=15__1_1511309431064_883_1309431281
 Out: 250 2.1.0 Ok
 In:  RCPT TO:<myuser@mydomain.tld> NOTIFY=FAILURE
 Out: 451 4.3.0 <  hr_geld@senderdomain.tld>: Temporary lookup failure
 In:  DATA
 Out: 554 5.5.1 Error: no valid recipients
 In:  QUIT
 Out: 221 2.0.0 Bye


For other details, see the local mail logfile

Log Email 2:

Jul  4 22:09:58 poseidon postfix/smtpd[14957]: connect from j121po155.domain.tld[nnn.nnn.nnn.nnn]
Jul  4 22:09:58 poseidon postfix/proxymap[14923]: warning: mysql query failed: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
Jul  4 22:09:58 poseidon postfix/trivial-rewrite[14922]: warning: transport_maps lookup failure
Jul  4 22:09:58 poseidon postfix/trivial-rewrite[14922]: warning: transport_maps lookup failure
Jul  4 22:09:58 poseidon postfix/smtpd[14957]: NOQUEUE: reject: RCPT from j121po155.domain.tld[nnn.nnn.nnn.nnn]: 451 4.3.0 <  hr_geld@senderdomain.tld>: Temporary lookup failure; from=<??hr_geld@senderdomain.tld> to=<myuser@mydomain.tld> proto=ESMTP helo=<j121po155.domain.tld>
Jul  4 22:09:58 poseidon postfix/cleanup[14958]: 86471252E02: message-id=<20110704200958.86471252E02@poseidon.mydomain.tld>
Jul  4 22:09:58 poseidon postfix/qmgr[1513]: 86471252E02: from=<double-bounce@poseidon.mydomain.tld>, size=1183, nrcpt=1 (queue active)
Jul  4 22:09:58 poseidon postfix/trivial-rewrite[14922]: warning: transport_maps lookup failure
Jul  4 22:09:58 poseidon postfix/smtpd[14957]: disconnect from j121po155.domain.tld[nnn.nnn.nnn.nnn]

It seems there is a problem with comparing data from the email with data in the database due the collation. This two emails want to be delivered all 10 minutes and for every of the mails I get an email like you see obove. In my opinion these emails are spam. The good thing is that this mails never get delivered but the warning mails bother me.

Sadly it happens not only to clearly noticable spammails. I have some wanted emails too that can´t get deliverd because of this. But of course the mailservers of these emails don´t try endless to deliver.

Is there some more information I can give to find what is wrong? Please let me know if I can give more information.

Thanks for every help in advance.

9 Reply by ZhangHuangbin 2011-07-05 08:19:09

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

Re: Postfix SMTP server: errors

Znekar wrote:

Jul  4 22:09:58 poseidon postfix/proxymap[14923]: warning: mysql query failed: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation ‘=’
Jul  4 22:09:58 poseidon postfix/trivial-rewrite[14922]: warning: transport_maps lookup failure

It’s clear here.
Did you change mysql query in postfix lookup file (in ‘transport_maps’ setting)? Please fix it first.

10 Reply by Znekar 2011-07-05 15:22:13

  • Znekar
  • Member
  • Offline
  • Registered: 2011-06-30
  • Posts: 14

Re: Postfix SMTP server: errors

ZhangHuangbin wrote:

Did you change mysql query in postfix lookup file (in ‘transport_maps’ setting)? Please fix it first.

Thanks for the hint ZhangHuangbin, but I cant see where the problem is. Perhaps because I am not a SQL specialist. wink

The query in /etc/postfix/mysql/transport_maps_domain.cf looks like:

query       = SELECT transport FROM domain WHERE domain='%s' AND active=1

and the one in /etc/postfix/mysql/transport_maps_user.cf is:

query       = SELECT mailbox.transport FROM mailbox,domain WHERE mailbox.username='%s' AND mailbox.domain='%d' AND mailbox.domain=domain.domain AND mailbox.transport<>'' AND mailbox.active=1 AND mailbox.enabledeliver=1 AND domain.backupmx=0 AND domain.active=1

Is there anything wrong or did I check the wrong files? In fact the files date is the one from installation day. So the files was not changed since then.

11 Reply by ZhangHuangbin 2011-07-05 17:02:42

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

Re: Postfix SMTP server: errors

Queries in lookup files are OK. Did you change MySQL structure? Because it complains » Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation ‘='».
Please paste output of below SQL commands:

$ mysql -uroot -p
mysql> USE vmail;
mysql> DESC mailbox;
mysql> DESC domain;

12 Reply by Znekar 2011-07-05 17:35:40

  • Znekar
  • Member
  • Offline
  • Registered: 2011-06-30
  • Posts: 14

Re: Postfix SMTP server: errors

Here is what I get. I paste all that you can see also the server version. Perhaps it is important…

#  mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 21094
Server version: 5.1.49-1ubuntu8.1 (Ubuntu)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> USE vmail;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> DESC mailbox;
+--------------------------+-----------------+------+-----+---------------------+-------+
| Field                    | Type            | Null | Key | Default             | Extra |
+--------------------------+-----------------+------+-----+---------------------+-------+
| username                 | varchar(255)    | NO   | PRI | NULL                |       |
| password                 | varchar(255)    | NO   |     |                     |       |
| name                     | varchar(255)    | NO   |     |                     |       |
| storagebasedirectory     | varchar(255)    | NO   |     | /var/vmail          |       |
| storagenode              | varchar(255)    | NO   |     | vmail1              |       |
| maildir                  | varchar(255)    | NO   |     |                     |       |
| quota                    | bigint(20)      | NO   |     | 0                   |       |
| bytes                    | bigint(20)      | NO   |     | 0                   |       |
| messages                 | bigint(20)      | NO   |     | 0                   |       |
| domain                   | varchar(255)    | NO   | MUL |                     |       |
| transport                | varchar(255)    | NO   |     |                     |       |
| department               | varchar(255)    | NO   | MUL |                     |       |
| rank                     | varchar(255)    | NO   |     | normal              |       |
| employeeid               | varchar(255)    | YES  | MUL |                     |       |
| enablesmtp               | tinyint(1)      | NO   | MUL | 1                   |       |
| enablesmtpsecured        | tinyint(1)      | NO   | MUL | 1                   |       |
| enablepop3               | tinyint(1)      | NO   | MUL | 1                   |       |
| enablepop3secured        | tinyint(1)      | NO   | MUL | 1                   |       |
| enableimap               | tinyint(1)      | NO   | MUL | 1                   |       |
| enableimapsecured        | tinyint(1)      | NO   | MUL | 1                   |       |
| enabledeliver            | tinyint(1)      | NO   | MUL | 1                   |       |
| enablemanagesieve        | tinyint(1)      | NO   | MUL | 1                   |       |
| enablemanagesievesecured | tinyint(1)      | NO   | MUL | 1                   |       |
| enablesieve              | tinyint(1)      | NO   | MUL | 1                   |       |
| enablesievesecured       | tinyint(1)      | NO   | MUL | 1                   |       |
| enableinternal           | tinyint(1)      | NO   | MUL | 1                   |       |
| lastlogindate            | datetime        | NO   |     | 0000-00-00 00:00:00 |       |
| lastloginipv4            | int(4) unsigned | NO   |     | 0                   |       |
| lastloginprotocol        | char(255)       | NO   |     |                     |       |
| disclaimer               | text            | NO   |     | NULL                |       |
| passwordlastchange       | datetime        | NO   | MUL | 0000-00-00 00:00:00 |       |
| created                  | datetime        | NO   |     | 0000-00-00 00:00:00 |       |
| modified                 | datetime        | NO   |     | 0000-00-00 00:00:00 |       |
| expired                  | datetime        | NO   | MUL | 9999-12-31 00:00:00 |       |
| active                   | tinyint(1)      | NO   | MUL | 1                   |       |
| local_part               | varchar(255)    | NO   |     |                     |       |
+--------------------------+-----------------+------+-----+---------------------+-------+
36 rows in set (0.01 sec)

mysql> DESC domain;
+-----------------------+--------------+------+-----+---------------------+-------+
| Field                 | Type         | Null | Key | Default             | Extra |
+-----------------------+--------------+------+-----+---------------------+-------+
| domain                | varchar(255) | NO   | PRI |                     |       |
| description           | text         | NO   |     | NULL                |       |
| disclaimer            | text         | NO   |     | NULL                |       |
| aliases               | int(10)      | NO   |     | 0                   |       |
| mailboxes             | int(10)      | NO   |     | 0                   |       |
| maxquota              | bigint(20)   | NO   |     | 0                   |       |
| quota                 | bigint(20)   | NO   |     | 0                   |       |
| transport             | varchar(255) | NO   |     | dovecot             |       |
| backupmx              | tinyint(1)   | NO   | MUL | 0                   |       |
| defaultuserquota      | bigint(20)   | NO   |     | 1024                |       |
| defaultuseraliases    | text         | NO   |     | NULL                |       |
| defaultpasswordscheme | varchar(10)  | NO   |     |                     |       |
| minpasswordlength     | int(10)      | NO   |     | 0                   |       |
| maxpasswordlength     | int(10)      | NO   |     | 0                   |       |
| created               | datetime     | NO   |     | 0000-00-00 00:00:00 |       |
| modified              | datetime     | NO   |     | 0000-00-00 00:00:00 |       |
| expired               | datetime     | NO   | MUL | 9999-12-31 00:00:00 |       |
| active                | tinyint(1)   | NO   | MUL | 1                   |       |
+-----------------------+--------------+------+-----+---------------------+-------+
18 rows in set (0.00 sec)

13 Reply by michburt 2011-07-06 02:28:13

  • michburt
  • Member
  • Offline
  • Registered: 2011-07-06
  • Posts: 4

Re: Postfix SMTP server: errors

I have exactly the same problem.
I also get the following warning:

warning: mysql query failed: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='

Due to the missing collation info in the mysql output from Znekar, I added the table info from phpmyadmin for Information. Here you can see that the collation of all domain and mail address fields are set to ascii_general_ci.

Post’s attachments

mailbox.png 131.98 kb, file has never been downloaded. 

You don’t have the permssions to download the attachments of this post.

14 Reply by michburt 2011-07-06 02:30:05

  • michburt
  • Member
  • Offline
  • Registered: 2011-07-06
  • Posts: 4

Re: Postfix SMTP server: errors

find attached also the image of the domain table structure

Post’s attachments

domain.png
domain.png 82.58 kb, file has never been downloaded. 

You don’t have the permssions to download the attachments of this post.

15 Reply by atros 2011-07-07 08:03:56

  • atros
  • Member
  • Offline
  • Registered: 2011-01-27
  • Posts: 7

Re: Postfix SMTP server: errors

michburt wrote:

find attached also the image of the domain table structure

I was having the same problem and changing the collation for the columns fixed the problem. It seems that every time I was having that problem it was also affecting other SMTP transactions. Eventually the messages come through because the sending end tries again but I would say you have to change it on the following tables and columns:

— alias: address, goto, domain
— alias_domain: alias_domain, target_domain
— domain: domain
— mailbox: username, domain

That fixed the problem when the server was getting messages like: é@domainname.com

I would say it’s wise to also make changes to tables like:

— recipient_bcc_domain
— recipient_bcc_user
— sender_bcc_domain
— sender_bcc_user

As that might also cause problems.

16 Reply by ZhangHuangbin 2011-07-07 08:50:08

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

Re: Postfix SMTP server: errors

I’m confused what trigger this issue on your servers. Any logs (e.g. invalid sender/recipient email addresses, subjects, etc)?

17 Reply by Znekar 2011-07-07 16:17:27 (edited by Znekar 2011-07-08 00:04:47)

  • Znekar
  • Member
  • Offline
  • Registered: 2011-06-30
  • Posts: 14

Re: Postfix SMTP server: errors

atros wrote:

I was having the same problem and changing the collation for the columns fixed the problem. It seems that every time I was having that problem it was also affecting other SMTP transactions.

I can confirm that. Now the spamer stoped sending to my server and I don´t have any problems anymore.

@ZhangHuangbin: If you want I can send you logfiles. Just tell me which one you need and I´ll send them via Email to you.

edit: Sorry, quoted bad. I ment that I confirm that the problem affecting other SMTP transactions. I didn´t change anything on my server.

18 Reply by ZhangHuangbin 2011-07-07 17:58:37

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

Re: Postfix SMTP server: errors

Hi Znekar,

May i know how you fixed this issue? Any SQL command or others? What’s the trigger and why it happened?

19 Reply by Znekar 2011-07-07 19:11:45

  • Znekar
  • Member
  • Offline
  • Registered: 2011-06-30
  • Posts: 14

Re: Postfix SMTP server: errors

ZhangHuangbin wrote:

Hi Znekar,

May i know how you fixed this issue? Any SQL command or others? What’s the trigger and why it happened?

Well, I don´t fix anything. The mailserver which wanted to send spam to me gave up try to send. At the moment everything is fine, but I am afraid that the problem will be back again sooner or later. sad

As I offered before I can send you logfiles if they can help you to find what was the problem.

atros wrote:

Eventually the messages come through because the sending end tries again but I would say you have to change it on the following tables and columns…

@atros: Did you change that tables and colums to UTF8?

20 Reply by blade 2011-10-10 18:17:22

  • blade
  • Member
  • Offline
  • From: Poland
  • Registered: 2010-05-05
  • Posts: 23

Re: Postfix SMTP server: errors

atros wrote:

michburt wrote:

find attached also the image of the domain table structure

I was having the same problem and changing the collation for the columns fixed the problem. It seems that every time I was having that problem it was also affecting other SMTP transactions. Eventually the messages come through because the sending end tries again but I would say you have to change it on the following tables and columns:

— alias: address, goto, domain
— alias_domain: alias_domain, target_domain
— domain: domain
— mailbox: username, domain

That fixed the problem when the server was getting messages like: é@domainname.com

I would say it’s wise to also make changes to tables like:

— recipient_bcc_domain
— recipient_bcc_user
— sender_bcc_domain
— sender_bcc_user

As that might also cause problems.

Did You change ascii_general_ci to utf8_general_ci ?

Posts: 20

Pages 1

You must login or register to post a reply

Generated in 0.014 seconds (76% PHP — 24% DB) with 8 queries

Понравилась статья? Поделить с друзьями:
  • Postfix error command not recognized
  • Postfix e sub process usr bin dpkg returned an error code 1
  • Poster cdn resource access error перевод
  • Poster cdn resource access error xiaomi tv
  • Postcard коды ошибок