LINUX.ORG.RU
решено ФорумAdmin

Что случилось с postfix?

 


0

1

Добрый день. У меня виртуальный сервер на Ubuntu 14, apache+nginx+mysql+postfix, настраивал сам по гайдам в интернете, поэтому мог накосячить. Связка проработала год без проблем и тут сервер начал подвисать.. еле подключился после рестарта. В списке процессов вижу следующее:


---------------------------------------------

postfix   1346  0.1  0.0  27536  1484 ?        S    09:44   0:00 scache -l -t unix -u -c

postfix   1348  0.0  0.1  42432  2716 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1354  0.0  0.1  42432  2696 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1357  0.0  0.1  42432  2696 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1360  0.0  0.1  42432  2716 ?        S    09:44   0:00 smtp -t unix -u -c

www-data  1370  0.7  0.9 411328 20476 ?        S    09:44   0:00 /usr/sbin/apache2 -k start

www-data  1371  1.8  0.9 411760 20176 ?        S    09:44   0:01 /usr/sbin/apache2 -k start

www-data  1372  0.7  1.0 411772 22368 ?        S    09:44   0:00 /usr/sbin/apache2 -k start

www-data  1373  1.2  1.4 421556 30104 ?        S    09:44   0:01 /usr/sbin/apache2 -k start

www-data  1374  0.9  0.8 408292 16792 ?        S    09:44   0:01 /usr/sbin/apache2 -k start

postfix   1424  0.0  0.1  42432  2700 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1461  0.0  0.1  42432  2696 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1506  0.0  0.1  42432  2700 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1525  0.0  0.1  42432  2696 ?        S    09:44   0:00 smtp -t unix -u -c

root      1566  0.0  0.0  15816   928 tty1     Ss+  09:44   0:00 /sbin/getty -8 38400 tty1

postfix   1580  0.0  0.1  42432  2696 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1587  0.0  0.1  42432  2692 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1603  0.0  0.1  42432  2700 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1609  0.0  0.1  42432  2700 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1614  0.0  0.1  42432  2700 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1640  0.0  0.1  42432  2704 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1644  0.0  0.1  42432  2696 ?        S    09:44   0:00 smtp -t unix -u -c

postfix   1651  0.0  0.1  42432  2700 ?        S    09:44   0:00 smtp -t unix -u -c

www-data  1918  1.0  0.9 411704 20028 ?        S    09:44   0:01 /usr/sbin/apache2 -k start

www-data  2169  0.9  1.0 413128 22296 ?        S    09:44   0:00 /usr/sbin/apache2 -k start

www-data  2246  1.2  1.1 412304 23520 ?        S    09:44   0:01 /usr/sbin/apache2 -k start

www-data  2372  0.7  1.0 411492 22516 ?        S    09:44   0:00 /usr/sbin/apache2 -k start

www-data  2425  1.4  1.0 413624 22188 ?        S    09:44   0:01 /usr/sbin/apache2 -k start

postfix   2430  0.0  0.0  27436  1612 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2458  0.0  0.0  27436  1608 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2482  0.0  0.0  27504  1868 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   2563  0.0  0.1  27452  2088 ?        S    09:44   0:00 local -t unix

postfix   2584  0.0  0.0  27436  1612 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2620  0.0  0.0  27436  1608 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2621  0.0  0.0  27436  1616 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2622  0.0  0.0  27436  1608 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2623  0.0  0.0  27436  1612 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2624  0.0  0.0  27436  1616 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2625  0.0  0.0  27436  1612 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2626  0.0  0.0  27436  1612 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2627  0.0  0.0  27504  1868 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   2628  0.0  0.0  27436  1612 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2629  0.0  0.0  27436  1612 ?        S    09:44   0:00 bounce -z -t unix -u -c

postfix   2630  0.0  0.0  27504  1872 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   2633  0.0  0.0  27504  1872 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   2635  0.0  0.0  27420  1844 ?        S    09:44   0:00 trivial-rewrite -n rewrite -t unix -u -c

postfix   2639  0.0  0.0  27504  1872 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   2640  0.0  0.0  27504  1872 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   2641  0.0  0.0  27504  1876 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   2642  0.0  0.0  27504  1876 ?        S    09:44   0:00 cleanup -z -t unix -u -c

postfix   3530  0.0  0.1  27452  2088 ?        S    09:44   0:00 local -t unix

postfix   3549  0.0  0.1  27452  2088 ?        S    09:44   0:00 local -t unix

---------------------------------------------

Судя по всему, postfix жрёт все системные ресурсы. Судя по висящим процессам smtp, напали спаммеры. Так? В mail.log последние записи, прежде чем я грохнул postifx:

---------------------------------------------

4] said: 550 5.7.1 This message was not accepted due to domain (mail.ru) owner DMARC policy (RFC 7489) https://help.mail.ru/mail-help/postmaster/dmarc (in reply to end of DATA command))

Dec  4 09:44:51 www postfix/cleanup[2639]: AEA741C1C71: message-id=<20181204064451.AEA741C1C71@my-domain.ru>

Dec  4 09:44:51 www postfix/bounce[2622]: ACFAD1C2AEE: sender non-delivery notification: AEA741C1C71

Dec  4 09:44:51 www postfix/qmgr[1039]: ACFAD1C2AEE: removed

Dec  4 09:44:51 www postfix/qmgr[1039]: AEA741C1C71: from=<>, size=2979, nrcpt=1 (queue active)

Dec  4 09:44:51 www postfix/local[3530]: AEA741C1C71: to=<www-data@my-domain.ru>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

Dec  4 09:44:51 www postfix/qmgr[1039]: AEA741C1C71: removed

Dec  4 09:44:51 www postfix/smtp[1357]: AC7F41C2AED: to=<grey_1999@mail.ru>, relay=mxs.mail.ru[94.100.180.104]:25, delay=702, delays=682/19/0.53/0.23, dsn=5.7.1, status=bounced (host mxs.mail.ru[94.100.180.104] said: 550 5.7.1 This message was not accepted due to domain (mail.ru) owner DMARC policy (RFC 7489) https://help.mail.ru/mail-help/postmaster/dmarc (in reply to end of DATA command))

Dec  4 09:44:51 www postfix/cleanup[2641]: B66741C1C71: message-id=<20181204064451.B66741C1C71@my-domain.ru>

Dec  4 09:44:51 www postfix/bounce[2622]: AC7F41C2AED: sender non-delivery notification: B66741C1C71

Dec  4 09:44:51 www postfix/qmgr[1039]: B66741C1C71: from=<>, size=2927, nrcpt=1 (queue active)

Dec  4 09:44:51 www postfix/qmgr[1039]: AC7F41C2AED: removed

Dec  4 09:44:51 www postfix/local[3549]: B66741C1C71: to=<www-data@my-domain.ru>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

Dec  4 09:44:51 www postfix/qmgr[1039]: B66741C1C71: removed

Dec  4 09:44:51 www postfix/local[2563]: B01C91C2855: to=<www-data@my-domain.ru>, relay=local, delay=8, delays=0.03/0.01/0/8, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

Dec  4 09:44:51 www postfix/qmgr[1039]: B01C91C2855: removed

Dec  4 09:44:51 www postfix/smtp[1651]: 3942C1C2A95: to=<my_email>, relay=mxs.mail.ru[94.100.180.104]:25, delay=703, delays=682/15/5.2/0.18, dsn=5.7.1, status=bounced (host mxs.mail.ru[94.100.180.104] said: 550 5.7.1 This message was not accepted due to domain (mail.ru) owner DMARC policy (RFC 7489) https://help.mail.ru/mail-help/postmaster/dmarc (in reply to end of DATA command))

Dec  4 09:44:51 www postfix/cleanup[2482]: EF0BA1C1C71: message-id=<20181204064451.EF0BA1C1C71@my-domain.ru>

Dec  4 09:44:51 www postfix/bounce[2430]: 3942C1C2A95: sender non-delivery notification: EF0BA1C1C71

Dec  4 09:44:51 www postfix/qmgr[1039]: 3942C1C2A95: removed

Dec  4 09:44:51 www postfix/qmgr[1039]: EF0BA1C1C71: from=<>, size=2926, nrcpt=1 (queue active)

Dec  4 09:44:51 www postfix/local[3530]: EF0BA1C1C71: to=<www-data@my-domain.ru>, relay=local, delay=0.01, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

Dec  4 09:44:51 www postfix/qmgr[1039]: EF0BA1C1C71: removed

Dec  4 09:44:52 www postfix/smtp[1525]: 3EE361C29A1: to=<grey_1999@mail.ru>, relay=mxs.mail.ru[94.100.180.31]:25, delay=698, delays=677/16/5/0.22, dsn=5.7.1, status=bounced (host mxs.mail.ru[94.100.180.31] said: 550 5.7.1 This message was not accepted due to domain (mail.ru) owner DMARC policy (RFC 7489) https://help.mail.ru/mail-help/postmaster/dmarc (in reply to end of DATA command))

Dec  4 09:44:52 www postfix/cleanup[2641]: 169F61C1C71: message-id=<20181204064452.169F61C1C71@my-domain.ru>

Dec  4 09:44:52 www postfix/bounce[2430]: 3EE361C29A1: sender non-delivery notification: 169F61C1C71

Dec  4 09:44:52 www postfix/qmgr[1039]: 3EE361C29A1: removed

Dec  4 09:44:52 www postfix/qmgr[1039]: 169F61C1C71: from=<>, size=2922, nrcpt=1 (queue active)

Dec  4 09:44:52 www postfix/local[2563]: 169F61C1C71: to=<www-data@my-domain.ru>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

Dec  4 09:44:52 www postfix/qmgr[1039]: 169F61C1C71: removed

Dec  4 09:44:53 www postfix/smtp[1506]: 4F5E91C2951: to=<grey_1999@mail.ru>, relay=mxs.mail.ru[94.100.180.104]:25, delay=1054, delays=1033/16/5/0.75, dsn=5.7.1, status=bounced (host mxs.mail.ru[94.100.180.104] said: 550 5.7.1 This message was not accepted due to domain (mail.ru) owner DMARC policy (RFC 7489) https://help.mail.ru/mail-help/postmaster/dmarc (in reply to end of DATA command))

Dec  4 09:44:53 www postfix/cleanup[2642]: 301FE1C1C71: message-id=<20181204064453.301FE1C1C71@my-domain.ru>

Dec  4 09:44:53 www postfix/bounce[2629]: 4F5E91C2951: sender non-delivery notification: 301FE1C1C71

Dec  4 09:44:53 www postfix/qmgr[1039]: 4F5E91C2951: removed

Dec  4 09:44:53 www postfix/qmgr[1039]: 301FE1C1C71: from=<>, size=2925, nrcpt=1 (queue active)

Dec  4 09:44:53 www postfix/local[3530]: 301FE1C1C71: to=<www-data@my-domain.ru>, relay=local, delay=0.01, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

Dec  4 09:44:53 www postfix/qmgr[1039]: 301FE1C1C71: removed

Dec  4 09:44:54 www postfix/smtp[1334]: 800E41C2993: to=<grey_1999@mail.ru>, relay=mxs.mail.ru[94.100.180.104]:25, delay=707, delays=684/18/5/0.22, dsn=5.7.1, status=bounced (host mxs.mail.ru[94.100.180.104] said: 550 5.7.1 This message was not accepted due to domain (mail.ru) owner DMARC policy (RFC 7489) https://help.mail.ru/mail-help/postmaster/dmarc (in reply to end of DATA command))

Dec  4 09:44:54 www postfix/cleanup[2639]: 6BBD71C1C71: message-id=<20181204064454.6BBD71C1C71@my-domain.ru>

Dec  4 09:44:54 www postfix/bounce[2626]: 800E41C2993: sender non-delivery notification: 6BBD71C1C71

Dec  4 09:44:54 www postfix/qmgr[1039]: 6BBD71C1C71: from=<>, size=2925, nrcpt=1 (queue active)

Dec  4 09:44:54 www postfix/qmgr[1039]: 800E41C2993: removed

Dec  4 09:44:54 www postfix/local[2563]: 6BBD71C1C71: to=<www-data@my-domain.ru>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

Dec  4 09:44:54 www postfix/qmgr[1039]: 6BBD71C1C71: removed

Dec  4 09:44:58 www postfix/smtp[1345]: connect to null.pochta.ru[91.215.36.1]:25: Connection timed out

Dec  4 09:44:58 www postfix/smtp[1345]: 4DCF31C28B3: to=<frolov_80@pochta.ru>, relay=none, delay=119584, delays=119554/0.01/30/0, dsn=4.4.1, status=deferred (connect to null.pochta.ru[91.215.36.1]:25: Connection timed out)

Dec  4 09:46:34 www postfix/master[1025]: terminating on signal 15
---------------------------------------------
Я так понимаю, кто-то пытается слать почту с несуществующего адреса?
---------------------------------------------

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 = my-domain.ru

virtual_alias_maps = hash:/etc/postfix/virtual

alias_database = hash:/etc/aliases

myorigin = /etc/mailname

mydestination = my-domain.ru, www.my-domain.ru, localhost.my-domain.ru, localhost

relayhost =

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

mailbox_command = procmail -a "$EXTENSION"

mailbox_size_limit = 0

recipient_delimiter = +

inet_interfaces = all

inet_protocols = all

-------------------------------------

Скажите пожалуйста, что делать? Я так понимаю, включить авторизацию на smtp? неужели она по умолчанию не включена? И что вообще случилось то? Как настроить postfix, чтобы решить эту проблему?

Я извиняюсь за двойные отступы, но иначе всё сливается.



Последнее исправление: nophear (всего исправлений: 3)

Ответ на: комментарий от anonymous

да у меня форум.. может он и спамит. Как проверить? Как можно хотя бы содержимое этих писем увидеть? Или какой скрипт хотя бы инициирует спам (отсылку писем)?

nophear
() автор топика
Ответ на: комментарий от anonymous

Разобрался, посмотрел очередь. Там в районе 200 в основном украинских адресов:

3EDDC1C289C     3350 Mon Dec  3 00:30:58  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         szimenkov@ukr.net

318631C27F3     2214 Mon Dec  3 00:30:42  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         szimenkov@ukr.net

3AA7A1C27B7     3548 Mon Dec  3 00:31:39  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         lutsik.viktor.98@ukr.net

339431C27CD     1737 Mon Dec  3 00:31:32  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         josh-1990@ukr.net

302341C283E     1841 Sat Dec  1 00:07:10  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         sabrixxx@ukr.net

34FF21C287C     2094 Mon Dec  3 00:31:47  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         lutsik.viktor.98@ukr.net

3D5A81C1E47     1873 Mon Dec  3 00:30:25  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         nikolaevig@ukr.net

2B2031C285B     6900 Mon Dec  3 00:31:57  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         kolya-rc@ukr.net

25DDE1C288A     1853 Sun Dec  2 16:10:05  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         lutsik.viktor.98@ukr.net

285E01C1CA6     1928 Mon Dec  3 00:30:50  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         lutsik.viktor.98@ukr.net

271101C1E3A     1921 Mon Dec  3 00:30:48  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         szimenkov@ukr.net

21BAC1C2886     2712 Tue Dec  4 00:03:01  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         babaxa_best@ukr.net

2F4721C283F     2400 Mon Dec  3 00:31:13  www-data@my-host.ru
(delivery temporarily suspended: host mxs.ukr.net[212.42.75.251] refused to talk to me: 550 62.173.1.1 in RBL. See http://wiki.ukr.net/mta/errors/rblled.html)
                                         szimenkov@ukr.net

Всё это форумные пользователи. То есть это форум долбит по ним уведомлениями, отсюда всё и виснет. Но вот чего я не пойму - почему они из очереди не удаляются? Как поставить лимит, допустим, 3 раза отослал - не получилось - удалил из очереди?

nophear
() автор топика
Ответ на: комментарий от nophear
minimal_backoff_time = 300s
maximal_backoff_time = 1000s
maximal_queue_lifetime = 1h
bounce_queue_lifetime = 1h

Вот 4 основных параметра управления очередью. В примере очередь живет 1 час, потом еще час живет баунс на www-data. Думаю, вам достаточно.

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.