postfix. ddos detected (, Che_Guevara, 27-Авг-10, 21:26 [смотреть все]Добрый день,Недавно поднял почтовый сервак, пару дней все норм было, почта ходила..никаких проблем...но седня заметил что почтовик не принимает и не отправляет письма. Смотрю лдоги постфикса, и заметил массу запросов, походу причиной отбоя почты наверно шквал запросов какихто (я ламер пока что в линухе()теперь не знаю как быть..почта вообще не фурычит..почтовик построил из: postfix+dovecot+mysql. вот логи постфикса: Aug 27 17:00:05 xxxxxxxxxxxxx postfix/postfix-script: starting the Postfix mail system Aug 27 17:00:05 xxxxxxxxxxxxx postfix/master[13330]: daemon started -- version 2.3.3, configuration /etc/postfix Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F1231115C9E5: from=<rrdiqlppejprnx@yahoo.com>, size=1575, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F2DEED9470C: from=<mushkjb@yahoo.com>, size=3866, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F111B498D8D: from=<dbgfoqs@yahoo.com>, size=2067, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F132C1DF720: from=<xnfpltootsh@hotmail.com>, size=1203, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F0F81DB5B0D: from=<wckkay@yahoo.com>, size=2651, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F1D4F35ECD9: from=<xbvvcneyrsef@pchome.com.tw>, size=2153, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F3248115F78D: from=<fzcrfjlwihkudm@ms23.hinet.net>, size=1034, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F0117DB6E83: from=<kbdbldgfedi@yahoo.com>, size=2063, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F17F0115F9E4: from=<uqtxzyax@hotmail.com>, size=2245, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F34DC1DF069: from=<xqydtpy@hotmail.com>, size=979, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F382695FD5C: from=<wssrq@yahoo.com>, size=5756, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F1AEA17E73D: from=<whjbohfny@yahoo.com>, size=1587, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F25C5D9D7E6: from=<ilnhxzso@ms56.hinet.net>, size=3691, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F349AD8EA32: from=<yqttiq@yahoo.com.tw>, size=1123, nrcpt=30 (queue active) Aug 27 17:00:06 xxxxxxxxxxxxx postfix/qmgr[13332]: F2EC8D9594A: from=<jvubfziir@yahoo.com>, size=3924, nrcpt=30 (queue active) Aug 27 17:06:38 xxxxxxxxxxxxxxpostfix/smtp[13441]: F1231115C9E5: to=<friction_wang2@yahoo.com.tw>, relay=mx2.mail.tw.yahoo.com[203.188.197.10]:25, delay=50440, delays=50438/0.1/2.1/0, dsn=4.7.0, status=deferred (host mx2.mail.tw.yahoo.com[203.188.197.10] refused to talk to me: 421 4.7.0 [TS01] Messages from ip_servaka temporarily deferred - 4.16.55.1; see http://postmaster.yahoo.com/errors/421-ts01.html) Aug 27 17:06:38 xxxxxxxxxxxxxxpostfix/smtp[13441]: F1231115C9E5: to=<friction_wang@yahoo.com.tw>, relay=mx2.mail.tw.yahoo.com[203.188.197.10]:25, delay=50440, delays=50438/0.1/2.1/0, dsn=4.7.0, status=deferred (host mx2.mail.tw.yahoo.com[203.188.197.10] refused to talk to me: 421 4.7.0 [TS01] Messages from ip_servaka temporarily deferred - 4.16.55.1; see http://postmaster.yahoo.com/errors/421-ts01.html) Aug 27 17:06:38 xxxxxxxxxxxxxxpostfix/smtp[13441]: F1231115C9E5: to=<frictional@yahoo.com.tw>, relay=mx2.mail.tw.yahoo.com[203.188.197.10]:25, delay=50440, delays=50438/0.1/2.1/0, dsn=4.7.0, status=deferred (host mx2.mail.tw.yahoo.com[203.188.197.10] refused to talk to me: 421 4.7.0 [TS01] Messages from ip_servaka temporarily deferred - 4.16.55.1; see http://postmaster.yahoo.com/errors/421-ts01.html) Aug 27 17:06:38 xxxxxxxxxxxxxxpostfix/smtp[13441]: F1231115C9E5: to=<frictioncoating@yahoo.com.tw>, relay=mx2.mail.tw.yahoo.com[203.188.197.10]:25, delay=50440, delays=50438/0.1/2.1/0, dsn=4.7.0, status=deferred (host mx2.mail.tw.yahoo.com[203.188.197.10] refused to talk to me: 421 4.7.0 [TS01] Messages from ip_servaka temporarily deferred - 4.16.55.1; see http://postmaster.yahoo.com/errors/421-ts01.html) Aug 27 17:06:38 xxxxxxxxxxxxxxpostfix/smtp[13441]: F1231115C9E5: to=<frictionless@yahoo.com.tw>, relay=mx2.mail.tw.yahoo.com[203.188.197.10]:25, delay=50440, delays=50438/0.1/2.1/0, dsn=4.7.0, status=deferred (host mx2.mail.tw.yahoo.com[203.188.197.10] refused to talk to me: 421 4.7.0 [TS01] Messages from ip_servaka temporarily deferred - 4.16.55.1; see http://postmaster.yahoo.com/errors/421-ts01.html) Aug 27 17:06:38 xxxxxxxxxxxxxxpostfix/smtp[13441]: F1231115C9E5: to=<frictions@yahoo.com.tw>, relay=mx2.mail.tw.yahoo.com[203.188.197.10]:25, delay=50440, delays=50438/0.1/2.1/0, dsn=4.7.0, status=deferred (host mx2.mail.tw.yahoo.com[203.188.197.10] refused to talk to me: 421 4.7.0 [TS01] Messages from ip_servaka temporarily deferred - 4.16.55.1; see http://postmaster.yahoo.com/errors/421-ts01.html) Aug 27 17:06:38 xxxxxxxxxxxxxxpostfix/smtp[13441]: F1231115C9E5: to=<fricyhuang@yahoo.com.tw>, relay=mx2.mail.tw.yahoo.com[203.188.197.10]:25, delay=50440, delays=50438/0.1/2.1/0, dsn=4.7.0, status=deferred (host mx2.mail.tw.yahoo.com[203.188.197.10] refused to talk to me: 421 4.7.0 [TS01] Messages from ip_servaka temporarily deferred - 4.16.55.1; see http://postmaster.yahoo.com/errors/421-ts01.html) вообщем глушит по черному...файрволом закрыл всю сетку 203.188.197.0/24 на 25 порт...все равно бомбит...
как мне их закрыть? main.cf:
queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix myhostname = mail.mydomain.com inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost unknown_local_recipient_reject_code = 550 mynetworks_style = subnet mynetworks = 0.0.0.0/0, 127.0.0.0/8 alias_maps = hash:/etc/postfix/aliases alias_database = hash:/etc/postfix/aliases debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = postdrop manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.3.3/samples readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES address_verify_map = btree:/var/spool/postfix/address_verify disable_vrfy_command = yes smtpd_error_sleep_time = 0s
default_process_limit = 2000 smtpd_client_connection_count_limit = 8 bounce_size_limit = 2000 smtpd_client_message_rate_limit = 30 smtpd_connection_reuse_time_limit = 150s smtpd_client_connection_rate_limit = 3 anvil_rate_time_unit = 1s smtp_helo_timeout = 60s smtpd_timeout = 60s smtp_mail_timeout = 60s smtp_rcpt_timeout = 60s smtpd_client_recipient_rate_limit = 5 virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf virtual_mailbox_base = /var/spool/mail/virtual/ virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf virtual_minimum_uid = 203 virtual_uid_maps = static:203 virtual_gid_maps = static:203 virtual_transport = dovecot message_size_limit = 31457280 dovecot_destination_recipient_limit = 1
|
- postfix. ddos detected (, mef, 21:36 , 27-Авг-10 (1)
mynetworks = 0.0.0.0/0, 127.0.0.0/80.0.0.0/0 - убрать и вместо него вписать сетку которая используется в вашей конторе. P.S. это не ddos, а openrelay, используй сервис для проверки на опен релей, их в инете навалом, например http://www.checkor.com/ Если это действительно так, то рекомендую как можно быстрее решить эту проблему, т.к. инфа о том что открыт relay быстро распространится по инету и твой сервер на несколько дней, а может и недель попадет в blacklist`ы, что чревато проблемами с отправкой писем в дальнейшем.
- postfix. ddos detected (, Che_Guevara, 17:18 , 29-Авг-10 (2)
>[оверквотинг удален] > >0.0.0.0/0 - убрать и вместо него вписать сетку которая используется в вашей >конторе. > >P.S. это не ddos, а openrelay, используй сервис для проверки на опен >релей, их в инете навалом, например http://www.checkor.com/ Если это действительно так, >то рекомендую как можно быстрее решить эту проблему, т.к. инфа о >том что открыт relay быстро распространится по инету и твой сервер >на несколько дней, а может и недель попадет в blacklist`ы, что >чревато проблемами с отправкой писем в дальнейшем. сделал как вы сказали, но ситуация та же(
- postfix. ddos detected (, mef, 22:02 , 29-Авг-10 (3)
>сделал как вы сказали, но ситуация та же( Добавить smtpd_recipient_restrictions = permit_sasl_authenticated (или как пользователи проходят аутентификацию), permit_auth_destination, reject
- postfix. ddos detected (, Che_Guevara, 23:55 , 29-Авг-10 (4)
>>сделал как вы сказали, но ситуация та же( > >Добавить >smtpd_recipient_restrictions = permit_sasl_authenticated (или как пользователи проходят аутентификацию), permit_auth_destination, reject Да, я седня добавил эту комманду...но я всмонил что я закрыл порты 25/110 чтоб посмотреть на реакцию..еще день назад...заметил нетстатом что мой сервак теперь сам делает smtp запросы на другие серваки...( мой конфиг: майн.йф queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix myhostname = mail.mydomain.com inet_interfaces = all #Домены для которых почта доставляется локально: mydestination = $myhostname, localhost.$mydomain, localhost #Список своих сетей: mynetworks_style = subnet mynetworks = 127.0.0.0/8 #Немного поправим пути к базе алиасов: alias_maps = hash:/etc/postfix/aliases alias_database = hash:/etc/postfix/aliases #Уровень дебага: debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = postdrop manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.3.3/samples readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES address_verify_map = btree:/var/spool/postfix/address_verify #Здесь боремся со спамерами (мать их идти...) show_user_unknown_table_name = no smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, check_client_access hash:$config_directory/client_access, check_client_access regexp:$config_directory/dul_checks, reject_rbl_client bl.spamcop.net, reject_rbl_client list.dsbl.org, reject_rbl_client zen.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_unknown_client, reject_unknown_client_hostname, permit smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, check_helo_access hash:$config_directory/helo_access, check_helo_access regexp:$config_directory/helo_regexp, check_helo_access regexp:$config_directory/dul_checks, reject_invalid_helo_hostname, reject_unknown_helo_hostname, reject_non_fqdn_helo_hostname, permit smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access regexp:$config_directory/recipient_access, reject_unauth_destination, reject_unlisted_recipient, reject_unknown_recipient_domain, reject_non_fqdn_recipient, reject_unverified_recipient, reject_rbl_client bl.spamcop.net, reject_rbl_client list.dsbl.org, reject_rbl_client zen.spamhaus.org, reject_rbl_client cbl.abuseat.org, check_policy_service inet:127.0.0.1:10023, permit smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, check_sender_access regexp:$config_directory/sender_access, reject_authenticated_sender_login_mismatch, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unlisted_sender, permit unknown_address_reject_code = 550 unknown_client_reject_code = 550 unknown_hostname_reject_code = 550 unknown_local_recipient_reject_code = 550 unknown_relay_recipient_reject_code = 550 unknown_virtual_alias_reject_code = 550 unknown_virtual_mailbox_reject_code = 550 nverified_sender_reject_code = 550 #Ограничения на некоторые комманды disable_vrfy_command = yes smtpd_error_sleep_time = 0s default_process_limit = 10 smtpd_client_connection_count_limit = 8 bounce_size_limit = 2000 smtpd_client_message_rate_limit = 30 smtpd_connection_reuse_time_limit = 150s smtpd_client_connection_rate_limit = 3 anvil_rate_time_unit = 1s smtp_helo_timeout = 60s smtpd_timeout = 60s smtp_mail_timeout = 60s smtp_rcpt_timeout = 60s smtpd_client_recipient_rate_limit = 5 #Список виртуальных доменов: virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf virtual_mailbox_base = /var/spool/mail/virtual/ virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf virtual_minimum_uid = 203 virtual_uid_maps = static:203 virtual_gid_maps = static:203 #прикручиваем LDA от Dovecot: virtual_transport = dovecot #Указываем максимальный размер письма. message_size_limit = 31457280 dovecot_destination_recipient_limit = 1
- postfix. ddos detected (, mef, 05:42 , 30-Авг-10 (5)
В вашем случае лучше если правило заканчивается на reject, а не на permit, т.к. Вы рискуете перечислить не все исключения.
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access regexp:$config_directory/recipient_access, reject_unauth_destination, reject_unlisted_recipient, reject_unknown_recipient_domain, reject_non_fqdn_recipient, reject_unverified_recipient, reject_rbl_client bl.spamcop.net, reject_rbl_client list.dsbl.org, reject_rbl_client zen.spamhaus.org, reject_rbl_client cbl.abuseat.org, check_policy_service inet:127.0.0.1:10023, permit
А на другие серваки он делает запрос, т.к. видимо в очереди много писем скопилось спамерских, которые он не смог отправить по причине того что Ваш домен уже отвергается при подключении. Если таких писем много, то попробуйте просто очистить очередь.
- postfix. ddos detected (, Che_Guevara, 20:10 , 30-Авг-10 (6)
>[оверквотинг удален] > reject_rbl_client list.dsbl.org, > reject_rbl_client zen.spamhaus.org, > reject_rbl_client cbl.abuseat.org, > check_policy_service inet:127.0.0.1:10023, > permit > >А на другие серваки он делает запрос, т.к. видимо в очереди много >писем скопилось спамерских, которые он не смог отправить по причине того >что Ваш домен уже отвергается при подключении. Если таких писем много, >то попробуйте просто очистить очередь. Спасибо вроде, избавился от спамеров....очистил очередь все норм....теперь проблема появилась..клиенты почтовика с паблик нета отсылают и получают почту...т.е. mynetwork тока сам сервак тока...так вот теперь клиенты пытается с отправить письмо ему на bobik@gmail.com скажем, письмо не уходит а автоматом приходит такого типа письмо от сервака: Сообщение не было получено одним или несколькими получателями.
Тема: sdsd Отправлено: 30.08.2010 20:19 Сообщение не получили следующие получатели: 'bobik@gmail.com' 30.08.2010 20:19 550 5.7.1 Client host rejected: cannot find your hostname, [ipшник клиента(реальный)] а когда с gmaila пишу клиенту сервака приходит дилевери:
Delivery to the following recipient failed permanently: manager@mydomain.com Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 5.7.1 <mail-pz0-f47.google.com[209.85.210.47]>: Client host rejected: Access denied (state 14). ----- Original message ----- MIME-Version: 1.0 Received: by 10.142.188.20 with SMTP id l20mr4844188wff.90.1283184500684; Mon, 30 Aug 2010 09:08:20 -0700 (PDT) Received: by 10.151.11.7 with HTTP; Mon, 30 Aug 2010 09:08:20 -0700 (PDT) Date: Mon, 30 Aug 2010 21:08:20 +0500 Message-ID: <AANLkTi=hw4C8wRRyXYsvbwuskbJyYyXPLTNw8sizAQL=@mail.gmail.com> Subject: test From: Bob Bobik <bobik@gmail.com> To: NOC <manager@mydomain.com> Content-Type: multipart/alternative; boundary=000e0cd2df3458380a048f0cacf4 sdsdsd в чем может быть проблема ((((?
- postfix. ddos detected (, mef, 20:54 , 30-Авг-10 (7)
Надо настроить PTR запись. Обратись к своему провайдеру, чтобы он прописал. Вообще gmail часто принимает и без PTR записи, но видимо твой сервер уже попал в blacklist`ы поэтому gmail такой подозрительный стал.
- postfix. ddos detected (, Che_Guevara, 23:08 , 30-Авг-10 (8)
>Надо настроить PTR запись. Обратись к своему провайдеру, чтобы он прописал. >Вообще gmail часто принимает и без PTR записи, но видимо твой сервер >уже попал в blacklist`ы поэтому gmail такой подозрительный стал. в строке myhostname = я указал ipadress клиента (внешний), он отправил письмо на gmail. Но с gmaila обратно не прошло..
- postfix. ddos detected (, mef, 08:54 , 31-Авг-10 (9)
>>Надо настроить PTR запись. Обратись к своему провайдеру, чтобы он прописал. >>Вообще gmail часто принимает и без PTR записи, но видимо твой сервер >>уже попал в blacklist`ы поэтому gmail такой подозрительный стал. > >в строке myhostname = >я указал ipadress клиента (внешний), он отправил письмо на gmail. >Но с gmaila обратно не прошло.. Только с gmail не доходят или с других тоже? Могу посоветовать заказать MX server, который вы укажите в dns для записи с меньшим приоритетом. Письма будут проходить через него и потом к вам фильтруясь на спам и вирусы. Можно обратится сюда http://www.amsbox.com/ там и антиспам и прочие приблуды, и попросите тестовый доступ, дадут на несколько дней.
|