LINUX.ORG.RU

Сообщения xlin84

 

Белеберда в заголовках From, to и т.д. в теле письма

To: =?UTF-8?B?0KHQsNC50LrQvtCyINCS0LDQu9C10L3RgtC40L0=?= <xxxx@mydomain.ru>
From: =?UTF-8?B?0JLQsNC70LXQvdGC0LjQvSDQodCw0LnQutC+0LI=?=
 <xxxxxx@gmail.com>

Как исправить? Может из-за это го меня и гугл банит. Пытался протестировать, а получил кучу ошибок. Посмотрите https://www.unlocktheinbox.com/mail-tester/uU7qzmwEeG4=/

Стоит postfix+dovecot. Письма не ходят только на гугл. (хотя из консоли долетают нормально)

echo "This is the body of the email" | mail -s "This is the subject line" xxxxxx@gmail.com

P.S. Ни кто не поделится файлом master.cf - может я там напутал чего. И еще просьба. Кто профи, проверьте пожалуйста, нормально ли у меня записи сделаны для домена gb2bel.ru PTR и MX.

Вот конфиг main.cf http://pastebin.com/GULUpdbm

 , , ,

xlin84
()

HelpMe Не работает почта (не принимает от gmail и yandex)

Доброго дня. Умоляю, помогите. Голова реально уже опухла с этой почтой.

Сервер на postfix+dovecot был замечен на рассылке спама. Проблему нашли и исправили, но письма не ходят на gmail и не принимаются от yandex.

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

Добавил DKIM+SPF записи. Тест проходит теперь без проблем http://mxtoolbox.com/domain/gb2bel.ru/

Что еще ему нужно? Устал биться. Кстати, вчера он на гугл пару раз прорвался с письмом и получилось отправить с моего сервера.

 , , ,

xlin84
()

Не собирается PEAR-Net_LDAP3 на gentoo

Обновил постовую вебморду roundcube и в ней перестала работать адресная книга, которая берет адреса через LDAP В логах

&#91;Sun Jul 24 13:20:27.842887 2016] &#91;:error] &#91;pid 3694] &#91;client 176.194.165.155:49854] PHP Fatal error:  Class 'Net_LDAP3' not found in /var/www/localhost/htdocs/roundcube/program/lib/Roundcube/rcube_ldap_generic.php on line 31, referer: https://mail.gb2bel.ru/?_task=mail&_action=compose&_id=50947977957949545a3a8b
Погугли форумы и понял, что нужен пакет dev-php/PEAR-Net_LDAP3-1.0.2::kolab В портах его не оказалась и пришлось установить laymon и подключить оверлей kolab

mail PEAR-Net_LDAP3 # eix -e PEAR-Net_LDAP3
* dev-php/PEAR-Net_LDAP3 &#91;1]
	 Доступные версии:	  1.0.2
	 Описание:			  OO interface for searching and manipulating LDAP-entries

&#91;1] "kolab" /var/lib/layman/kolab

Начал устанавливать, но не получилось. Можно ли это поправить? Клиенты почтового сервера остались без адресной книги и скоро будут кричать, т.к. при обращении к ней вылетает ошибка. Помогите пожалуйста.

mail PEAR-Net_LDAP3 # emerge -auv PEAR-Net_LDAP3

 * IMPORTANT: config file '/etc/portage/package.keywords' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

These are the packages that would be merged, in order:

Calculating dependencies... done!
&#91;ebuild  N	 ] dev-php/PEAR-Net_LDAP3-1.0.2::kolab  0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? &#91;Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-php/PEAR-Net_LDAP3-1.0.2::kolab
>>> Unpacking source...
Клонирование в голый репозиторий «/usr/portage/distfiles/egit-src/php-net_ldap.git»…
remote: Counting objects: 450, done.
remote: Compressing objects: 100% (266/266), done.
remote: Total 450 (delta 106), reused 383 (delta 82)
Получение объектов: 100% (450/450), 116.40 KiB | 0 bytes/s, готово.
Определение изменений: 100% (106/106), готово.
Проверка соединения… готово.
GIT NEW clone -->
   repository:			   https://git.kolab.org/diffusion/PNL/php-net_ldap.git
   at the commit:			50896031cf5a56057d4fc632c61ad1c663b7debc
   branch:				   master
   storage directory:		"/usr/portage/distfiles/egit-src/php-net_ldap.git"
   checkout type:			bare repository
Клонирование в «/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work/PEAR-Net_LDAP3-1.0.2»…
готово.
Ветка branch-master отслеживает внешнюю ветку master из origin.
Переключено на новую ветку «branch-master»
>>> Unpacked to /var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work/PEAR-Net_LDAP3-1.0.2
>>> Source unpacked in /var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work
>>> Preparing source in /var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work/PEAR-Net_LDAP3-1.0.2 ...
 * Applying PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch ...

 * Failed Patch: PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch !
 *  ( /var/lib/layman/kolab/dev-php/PEAR-Net_LDAP3/files/PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/temp/PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch.out

 * ERROR: dev-php/PEAR-Net_LDAP3-1.0.2::kolab failed (prepare phase):
 *   Failed Patch: PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch!
 * 
 * Call stack:
 *	 ebuild.sh, line  133:  Called src_prepare
 *   environment, line 2268:  Called epatch '/var/lib/layman/kolab/dev-php/PEAR-Net_LDAP3/files/PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch'
 *   environment, line  729:  Called die
 * The specific snippet of code:
 *			   die "Failed Patch: ${patchname}!";
 * 
 * If you need support, post the output of `emerge --info '=dev-php/PEAR-Net_LDAP3-1.0.2::kolab'`,
 * the complete build log and the output of `emerge -pqv '=dev-php/PEAR-Net_LDAP3-1.0.2::kolab'`.
 * The complete build log is located at '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work/PEAR-Net_LDAP3-1.0.2'
 * S: '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work/PEAR-Net_LDAP3-1.0.2'

>>> Failed to emerge dev-php/PEAR-Net_LDAP3-1.0.2, Log file:

>>>  '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/temp/build.log'

 * Messages for package dev-php/PEAR-Net_LDAP3-1.0.2:

 * Failed Patch: PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch !
 *  ( /var/lib/layman/kolab/dev-php/PEAR-Net_LDAP3/files/PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/temp/PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch.out
 * ERROR: dev-php/PEAR-Net_LDAP3-1.0.2::kolab failed (prepare phase):
 *   Failed Patch: PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch!
 * 
 * Call stack:
 *	 ebuild.sh, line  133:  Called src_prepare
 *   environment, line 2268:  Called epatch '/var/lib/layman/kolab/dev-php/PEAR-Net_LDAP3/files/PEAR-Net_LDAP3-1.0.2-4918-fix-debug-level.patch'
 *   environment, line  729:  Called die
 * The specific snippet of code:
 *			   die "Failed Patch: ${patchname}!";
 * 
 * If you need support, post the output of `emerge --info '=dev-php/PEAR-Net_LDAP3-1.0.2::kolab'`,
 * the complete build log and the output of `emerge -pqv '=dev-php/PEAR-Net_LDAP3-1.0.2::kolab'`.
 * The complete build log is located at '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work/PEAR-Net_LDAP3-1.0.2'
 * S: '/var/tmp/portage/dev-php/PEAR-Net_LDAP3-1.0.2/work/PEAR-Net_LDAP3-1.0.2'

emerge --info '=dev-php/PEAR-Net_LDAP3-1.0.2::kolab'

Portage 2.2.28 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-4.7.3, glibc-2.22-r4, 3.12.21-gentoo-r1 x86_64)
=================================================================
						 System Settings
=================================================================
System uname: Linux-3.12.21-gentoo-r1-x86_64-Intel-R-_Xeon-R-_CPU_E5520_@_2.27GHz-with-gentoo-2.2
KiB Mem:	 6106920 total,	493788 free
KiB Swap:	3145724 total,   3115524 free
Timestamp of repository gentoo: Sun, 24 Jul 2016 10:15:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:		  4.3_p42-r1::gentoo
dev-lang/perl:			5.20.2::gentoo
dev-lang/python:		  2.7.10-r1::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:		   3.3.1-r1::gentoo
dev-util/pkgconfig:	   0.28-r2::gentoo
sys-apps/baselayout:	  2.2::gentoo
sys-apps/openrc:		  0.19.1::gentoo
sys-apps/sandbox:		 2.10-r1::gentoo
sys-devel/autoconf:	   2.69::gentoo
sys-devel/automake:	   1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:	   2.25.1-r1::gentoo
sys-devel/gcc:			4.7.3-r1::gentoo, 4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:	 1.7.3::gentoo
sys-devel/libtool:		2.4.6::gentoo
sys-devel/make:		   4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:		   2.22-r4::gentoo
Repositories:

gentoo
	location: /usr/portage
	sync-type: rsync
	sync-uri: rsync://rsync2.ru.gentoo.org/gentoo-portage
	priority: -1000

x-portage
	location: /usr/local/portage
	masters: gentoo
	priority: 0

kolab
	location: /var/lib/layman/kolab
	masters: gentoo
	priority: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-write"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ ftp://mirror.yandex.ru/gentoo-distfiles/"
LANG="ru_RU.UTF-8"
LC_ALL="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j15"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 apache2 berkdb bzip2 cli cracklib crypt cxx dovecot-sasl dri fortran gdbm iconv imap iproute2 kerberos logrotate mmx mmxext modules multilib ncurses nls nptl openmp openssl pam pcre pdo postgres python readline samba seccomp session sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 tcpd unicode vim-pager vim-syntax winbind xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="dav actions alias auth_basic authz_host cgi cgid dir env mime mime_magic proxy proxy_connect proxy_ftp proxy_http vhost_alias asis auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_owner authz_user autoindex cache cern_meta deflate disk_cache dumpio expires ext_filter file_cache filter ident imagemap info mem_cache proxy_ajp proxy_balancer rewrite speling status headers include log_config log_forensic logio negotiation setenvif substitute unique_id userdir usertrack version" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru_RU ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

 , , , ,

xlin84
()

Беда. Спамит postfix. Попал во все черные списки

Доброго дня. Два дня пытался своими силами избавиться от вирусного спама с постового сервера. Прошу помощи. Молю даже.

Ситуация следующая. Примерно с 15 числа идет огромный спам с моего сервера или на мой и я уже пересылаю. Не пойму точно. Стоит postfix+dovecot+roudcube Настроен clamd+clamsmtpd+spamd

Я так понял проблема началась с ящика конкретного пользователя. Если смотреть очередь через mailq, то там постоянно фигурирует nl.krivosheeva@gb2bel.ru. Это ящик с моего домена. очередь постоянно увеличивается.

5346E361A17	 1753 Tue Jul 19 18:26:06  nl.krivosheeva@gb2bel.ru
(host as-av.iinet.net.au&#91;203.0.178.180] refused to talk to me: 554-icp-osb-irony-in8.iinet.net.au 554 Your access to this mail system from 37.208.65.160 has been rejected due to the sending MTA's poor reputation. If you believe that this failure is in error, please contact the intended recipient via alternate means.)
										 chuckchunder@iinet.net.au

51B6B36199E	 1566 Tue Jul 19 18:02:19  nl.krivosheeva@gb2bel.ru
(delivery temporarily suspended: lost connection with mx.bt.lon5.cpcloud.co.uk&#91;65.20.0.49] while sending RCPT TO)
										 peter476@btinternet.com

5F5BD361FBA	 1639 Tue Jul 19 20:17:33  nl.krivosheeva@gb2bel.ru
(delivery temporarily suspended: host mailin-01.mx.aol.com&#91;64.12.91.195] refused to talk to me: 554 5.7.1 : (RLY:B1) https://postmaster.aol.com/error-codes#554rlyb1)
										 horseloversx2@aol.com

5D59E361FEA	 1510 Tue Jul 19 20:19:31  nl.krivosheeva@gb2bel.ru
(delivery temporarily suspended: host mailin-01.mx.aol.com&#91;64.12.91.195] refused to talk to me: 554 5.7.1 : (RLY:B1) https://postmaster.aol.com/error-codes#554rlyb1)
										 patkotn@aol.com
										 pnsarandos@aol.com

56E7F361D3F	 1590 Tue Jul 19 19:12:52  nl.krivosheeva@gb2bel.ru
(delivery temporarily suspended: lost connection with mx.bt.lon5.cpcloud.co.uk&#91;65.20.0.49] while sending RCPT TO)
										 nicolasmyth63@btinternet.com

527BE361F44	 1799 Tue Jul 19 20:15:04  nl.krivosheeva@gb2bel.ru
		(connect to faithfunding.com&#91;107.23.198.240]:25: Connection timed out)
										 lisa.dillon@faithfunding.com

56C0F361601	 1620 Tue Jul 19 17:20:54  nl.krivosheeva@gb2bel.ru
(host dbrwirnap01.dnb.com&#91;158.151.214.66] refused to talk to me: 554 dbrwirnap01.dnb.com)
										 leonoral@mail.dnb.com

52808360FC0	 1636 Tue Jul 19 16:28:42  nl.krivosheeva@gb2bel.ru
(Host or domain name not found. Name service error for name=vizionfurniture.dk type=MX: Host not found, try again)
										 cn@vizionfurniture.dk

Вот содержимое письма из очереди

mail ~ # postcat -q 5F544360F7F
*** ENVELOPE RECORDS deferred/5/5F544360F7F ***
message_size:			1704			 657			   1			   0			1704
message_arrival_time: Tue Jul 19 15:58:08 2016
create_time: Tue Jul 19 15:58:08 2016
named_attribute: log_ident=5F544360F7F
named_attribute: rewrite_context=local
sender: nl.krivosheeva@gb2bel.ru
named_attribute: log_client_name=mail.gb2bel.ru
named_attribute: log_client_address=127.0.0.1
named_attribute: log_client_port=50978
named_attribute: log_message_origin=mail.gb2bel.ru&#91;127.0.0.1]
named_attribute: log_helo_name=mx0.gb2bel.ru
named_attribute: log_protocol_name=ESMTP
named_attribute: client_name=mail.gb2bel.ru
named_attribute: reverse_client_name=mail.gb2bel.ru
named_attribute: client_address=127.0.0.1
named_attribute: client_port=50978
named_attribute: helo_name=mx0.gb2bel.ru
named_attribute: protocol_name=ESMTP
named_attribute: client_address_type=2
named_attribute: dsn_orig_rcpt=rfc822;vlulsyteew@willbear.com
original_recipient: vlulsyteew@willbear.com
recipient: vlulsyteew@willbear.com
*** MESSAGE CONTENTS deferred/5/5F544360F7F ***
Received: from mx0.gb2bel.ru (mail.gb2bel.ru &#91;127.0.0.1])
		by mx0.gb2bel.ru (Postfix) with ESMTP id 5F544360F7F
		for <vlulsyteew@willbear.com>; Tue, 19 Jul 2016 15:58:08 +0300 (MSK)
Received: by mx0.gb2bel.ru (Postfix, from userid 10696)
		id 516C9360F80; Tue, 19 Jul 2016 15:58:08 +0300 (MSK)
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.gb2bel.ru
X-Spam-Flag: YES
X-Spam-Level: **************************************************
X-Spam-Status: Yes, score=99.8 required=3.0 tests=ALL_TRUSTED,UPPERCASE_50_75,
		USER_IN_BLACKLIST autolearn=no autolearn_force=no version=3.4.0
X-Spam-Report: 
		* -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
		*  100 USER_IN_BLACKLIST From: address is in the user's black-list
		*  0.8 UPPERCASE_50_75 message body is 50-75% uppercase
Received: from &#91;127.0.0.1] (unknown &#91;81.9.26.103])
		by mx0.gb2bel.ru (Postfix) with ESMTPA id 41EBC360F23;
		Tue, 19 Jul 2016 15:58:07 +0300 (MSK)
Message-ID: <578DA54A.C1B49E99@gb2bel.ru>
Date: Tue, 19 Jul 2016 03:58:02 -0700
From: nl.krivosheeva@gb2bel.ru
Subject: &#91;***** SPAM 99.8 *****] armpits ARMPITS CANADIENNE CHEP PILLIES, CIUILIS ETC
To: wookard@yahoo.com
Cc: dkfrank314@gmail.com, sascia4@interfree.it, vlulsyteew@willbear.com
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
X-Spam-Prev-Subject: armpits ARMPITS CANADIENNE CHEP PILLIES, CIUILIS ETC
X-Virus-Scanned: ClamAV using ClamSMTP

Probably you are in search for good solution?


Check out ours http://biologicalcircadian.tumblr.com/?4Tzl
HARROLD WHATEVER - ASS OR PUSSY - YOUR DICK WILL STAND LIKE MOUNTAIN H=
arrold
PRAYED YER BEST FRIEND- VIUGRA! prayed


reddit
*** HEADER EXTRACTED deferred/5/5F544360F7F ***
*** MESSAGE FILE END deferred/5/5F544360F7F ***

Конфиги сервера [spoiler]

mail ~ # cat /etc/postfix/main.cf
#размер письма
message_size_limit = 41943040
queue_directory = /var/spool/postfix
config_directory = /etc/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/db/postfix
mail_owner = postfix
#myhostname = mail.gb2bel.ru
myhostname = mx0.gb2bel.ru
mydomain = gb2bel.ru
myorigin = $mydomain
inet_interfaces = all
inet_protocols = ipv4
#mydestination = $myhostname, localhost.$mydomain, localhost
mydestination =
relay_domains = 
local_recipient_maps = unix:passwd.byname $alias_maps
unknown_local_recipient_reject_code = 550
mynetworks_style = host
###########
mynetworks = 127.0.0.0/8 172.16.5.5/32 
############
#mynetworks=
###########
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
smtpd_banner = MHI Belgorod City Hospital 2 ESMTP server
debug_peer_level = 2

sendmail_path = /usr/sbin/sendmail
newaliases_path = /bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = mail
html_directory = no
manpage_directory = /usr/share/man
readme_directory = no
virtual_mailbox_base = /var/spool/mail/
virtual_alias_maps = proxy:pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf
virtual_mailbox_domains = proxy:pgsql:/etc/postfix/pgsql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:pgsql:/etc/postfix/pgsql_virtual_mailbox_maps.cf
virtual_minimum_uid			 = 65534
virtual_uid_maps				= static:65534
virtual_gid_maps				= static:65534
virtual_transport			   = dovecot
dovecot_destination_recipient_limit = 1

#Размер почтового ящика
mailbox_size_limit = 524288000

smtp_always_send_ehlo = yes
smtpd_reject_unlisted_sender = yes
smtpd_reject_unlisted_recipient = yes
disable_vrfy_command = yes
smtp_always_send_ehlo = yes
#smtpd_hard_error_limit = 2
smtpd_recipient_limit = 40
bounce_queue_lifetime = 1d
maximal_queue_lifetime = 3d
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

########## DOBAVIL #########
smtpd_client_restrictions=
		# Разрешить клиентов из доверенных сетей
		permit_mynetworks,
		# Разрешить клиентов, прошедших аутентификацию
		permit_sasl_authenticated,
		# Отклонять клиентов, у которых доменное имя из PTR-записи
		# не решается в тот же IP по A-записи
		reject_unknown_client_hostname
		reject_unauth_destination,
		reject_rbl_client zen.spamhaus.org,
		reject_rbl_client bl.spamcop.net,
		reject_rbl_client cbl.abuseat.org,
		permit


smtpd_helo_restrictions=
		permit_mynetworks,
		permit_sasl_authenticated,
		# Отклонять клиентов, использующих неправильный синтаксис доменного имени в HELO
		reject_invalid_helo_hostname,
		# Отклонять клиентов, указывающих в HELO не полное доменное имя
		reject_non_fqdn_helo_hostname,
		# Отклонять клиентов, DNS-имя из HELO которых не имеет A- или MX-записи
		 reject_unknown_helo_hostname
smtpd_sender_restrictions =
		check_sender_access hash:/etc/postfix/conf/access_sender,
		permit_mynetworks,
		permit_sasl_authenticated,
		permit_tls_clientcerts,
		reject_unknown_sender_domain,
		reject_non_fqdn_sender
##############################################
#smtpd_sender_restrictions=
smtpd_recipient_restrictions =
		permit_mynetworks, 
		permit_sasl_authenticated,
		reject_unauth_destination,
		check_policy_service inet:127.0.0.1:10030,
#	   check_policy_service unix:/var/spool/postfix/postgrey/socket,
		reject_unauth_pipelining,
		check_client_access hash:$config_directory/access_client,
		check_sender_access hash:$config_directory/access_sender,
		reject_non_fqdn_sender,
		reject_unknown_sender_domain,
		#reject_unverified_sender,
		reject_non_fqdn_recipient,
		reject_invalid_hostname,
		reject_unknown_recipient_domain,
		reject_unlisted_recipient,
		reject_unverified_recipient,
		reject_rbl_client cbl.abuseat.org,
#	   reject_rbl_client dnsbl.sorbs.net,
#	   reject_rbl_client ubl.unsubscore.com,
		reject_unauth_destination,
		reject_non_fqdn_helo_hostname,
		reject_unknown_helo_hostname,
		reject_non_fqdn_recipient,
		permit

smtpd_data_restrictions =
		reject_unauth_pipelining

smtpd_restriction_classes = OnlyFromMyUsers
OnlyFromMyUsers = permit_mynetworks,
				  permit_sasl_authenticated,
				  reject 

################ DKIM ################
#smtpd_milters		   = inet:127.0.0.1:8891  
#non_smtpd_milters	   = $smtpd_milters  
#milter_default_action   = accept  
#milter_protocol		 = 2

####################################

sample_directory = /etc/postfix

#smtp_pix_workaround_delay_time = 10s
#smtp_pix_workaround_maps = hash:$config_directory/pix_workarounds
#smtp_pix_workaround_threshold_time = 500s
smtp_pix_workarounds = disable_esmtp,delay_dotcrlf
#smtp_pix_workaround_maps = 
# TLS/SSL options
smtpd_use_tls = yes
#smtpd_tls_auth_only = yes
smtpd_tls_key_file = /etc/postfix/ssl/201211-mail.gb2bel.ru/mail.gb2bel.ru.key
smtpd_tls_cert_file = /etc/postfix/ssl/201211-mail.gb2bel.ru/mail.gb2bel.ru.crt
smtpd_tls_CAfile = /etc/postfix/ssl/201211-mail.gb2bel.ru/ca.crt
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

##content_filter = scan:127.0.0.1:8025

content_filter = scan:127.0.0.1:10025 

receive_override_options = no_address_mappings
recipient_bcc_maps = hash:/etc/postfix/recipient_bcc 
#smtpd_milters = local:/var/run/milter/spamass-milter.sock inet:127.0.0.1:3001
#smtpd_milters = inet:127.0.0.1:3001
#milter_content_timeout = 300s
#milter_default_action = tempfail
#milter_protocol = 6
#milter_mail_macros = _
#milter_mail_macros = {client_addr}
#milter_mail_macros = {client_name} 
#milter_end_of_data_macros = i auth_type
######################################
### ADDED BY MAILD-POSTFIX INSTALL ###
######################################
#content_filter = spamassassin
#receive_override_options = no_address_mappings
mail ~ # cat /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#			   (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
#SMTP
smtp	  inet   n	   -	   n	   -	   -	   smtpd 
##spamassasin
		-o content_filter=spamassassin
#######
dovecot   unix   -	   n	   n	   -	   -	   pipe 
		flags=DRhu user=nobody:nobody argv=/usr/libexec/dovecot/deliver -c /etc/dovecot/dovecot.conf -f $(sender) -d ${recipient}
#submission inet n	   -	   n	   -	   -	   smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps	 inet  n	   -	   n	   -	   -	   smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628	  inet  n	   -	   n	   -	   -	   qmqpd
pickup	fifo  n	   -	   n	   60	  1	   pickup
cleanup   unix  n	   -	   n	   -	   0	   cleanup
qmgr	  fifo  n	   -	   n	   300	 1	   qmgr
#qmgr	 fifo  n	   -	   n	   300	 1	   oqmgr
tlsmgr	unix  -	   -	   n	   1000?   1	   tlsmgr
rewrite   unix  -	   -	   n	   -	   -	   trivial-rewrite
bounce	unix  -	   -	   n	   -	   0	   bounce
defer	 unix  -	   -	   n	   -	   0	   bounce
trace	 unix  -	   -	   n	   -	   0	   bounce
verify	unix  -	   -	   n	   -	   1	   verify
flush	 unix  n	   -	   n	   1000?   0	   flush
proxymap  unix  -	   -	   n	   -	   -	   proxymap
proxywrite unix -	   -	   n	   -	   1	   proxymap
smtp	  unix  -	   -	   n	   -	   -	   smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay	 unix  -	   -	   n	   -	   -	   smtp
		-o smtp_fallback_relay=
#	   -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq	 unix  n	   -	   n	   -	   -	   showq
error	 unix  -	   -	   n	   -	   -	   error
retry	 unix  -	   -	   n	   -	   -	   error
discard   unix  -	   -	   n	   -	   -	   discard
local	 unix  -	   n	   n	   -	   -	   local
virtual   unix  -	   n	   n	   -	   -	   virtual
lmtp	  unix  -	   -	   n	   -	   -	   lmtp
anvil	 unix  -	   -	   n	   -	   1	   anvil
scache	unix  -	   -	   n	   -	   1	   scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop  unix  -	   n	   n	   -	   -	   pipe
#  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix  -	   n	   n	   -	   -	   pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus	 unix  -	   n	   n	   -	   -	   pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp	  unix  -	   n	   n	   -	   -	   pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail	unix  -	   n	   n	   -	   -	   pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp	 unix  -	   n	   n	   -	   -	   pipe
#  flags=Fq. user=bsmtp argv=/usr/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -	   n	   n	   -	   2	   pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -	   n	   n	   -	   -	   pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}


######################################
### ADDED BY MAILD-POSTFIX INSTALL ###
######################################
##scan	  unix  -	   -	   n	   -	  -	smtp
##			-o smtp_send_xforward_command=yes
##127.0.0.1:8026 inet  n	   -	   n	   -	   -	  smtpd
##			-o content_filter=
##			-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
##			-o smtpd_helo_restrictions=
##			-o smtpd_client_restrictions=
##			-o smtpd_sender_restrictions=
##			-o smtpd_recipient_restrictions=permit_mynetworks,reject
##			-o mynetworks=127.0.0.0/8
##			-o smtpd_authorized_xforward_hosts=127.0.0.0/8


#spamassassin unix - n n - - pipe
#	   user=mail argv=/usr/bin/spamc -f -e
#	   /usr/sbin/sendmail -oi -f ${sender} ${recipient}

###############POSLEDNEE#############

# AV scan filter (used by content_filter) 
scan unix - - n - 16 smtp 
	   -o smtp_send_xforward_command=yes 
# For injecting mail back into postfix from the filter 
127.0.0.1:10026 inet n - n - 16 smtpd 
		-o content_filter= 
		-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks 
		-o smtpd_helo_restrictions= 
		-o smtpd_client_restrictions= 
		-o smtpd_sender_restrictions=reject_unknown_sender_domain 
		-o smtpd_recipient_restrictions=permit_mynetworks,reject 
		-o mynetworks=127.0.0.0/8
		#-o mynetworks_style=host 
		-o smtpd_authorized_xforward_hosts=127.0.0.0/8 

spamassassin unix - n n - - pipe
		user=spam argv=/usr/bin/spamc -f -e
		/usr/sbin/sendmail -oi -f ${sender} ${recipient}
[/spoiler]

Логи почтовика. Портянка не останавливается. http://pastebin.com/NNm62Fd0

Что еще нужно, говорите. Как это безобразие исправить? Помогите пожалуйста.

З.Ы. Прогонял maldet по всем файлам. Было 41 запись найдена как вирусная и перенесена в карантин. Все было найдено у пользователей в письмах.

Надо избавиться от этой атаки и только тогда смогу пересесть на чистый IP. Т.к. сразу менять страшно. И его забанят.

Вот я пытаюсь очистить очередь и она сразу же заполняется новыми письмами

mail ~ # postsuper -r ALL 
postsuper: Requeued: 1438 messages
mail ~ # postsuper -r ALL 
postsuper: Requeued: 54 messages
mail ~ # postsuper -r ALL 
postsuper: Requeued: 76 messages
mail ~ # postsuper -r ALL 
postsuper: Requeued: 337 messages
mail ~ # postsuper -r ALL 
postsuper: Requeued: 149 messages

 , , , ,

xlin84
()

RSS подписка на новые темы