текст сообщения amavis-new

Общие вопросы по установке и настройке сервера Postfix.
Писать в этот форум могут только зарегистрированные пользователи.

Модераторы: prefer, alexandrnew, ALex_hha, Roman, Axel

Ответить
danver
Новичок
Новичок
Сообщения: 10
Зарегистрирован: 23 май 2016, 13:14
Откуда: Новосибирск

текст сообщения amavis-new

Сообщение danver » 01 июн 2016, 12:43

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

Аватара пользователя
Andy_mak
Член клуба
Член клуба
Сообщения: 436
Зарегистрирован: 08 фев 2012, 14:37
Откуда: Russia, Moscow

Re: текст сообщения amavis-new

Сообщение Andy_mak » 04 июн 2016, 20:05

danver писал(а):Здравствуйте!
Подскажите, где лежат шаблоны сообщений амависа которые он рассылает при срабатывании событий? Например, при блокировке письма с не разрешенным вложением?
Добрый день!
Все дефолтные шаблоны "зашиты" в исполняемом файле amavisd, который написан на perl. Смотри в самом конце. Вот пример из amavisd-new 2.10.1:

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

# =============================================================================
# This is a template for VIRUS/BANNED/BAD-HEADER RECIPIENTS NOTIFICATIONS.
# For syntax and customization instructions see README.customize.
# Long header fields will be automatically wrapped by the program.
#
From: %f
Date: %d
Subject: [? [:ccat|major] |Clean mail|Clean mail|MTA-blocked mail|\
OVERSIZED mail|INVALID HEADER in mail|Spammy|Spam|UNCHECKED contents in mail|\
BANNED contents (%F) in mail|VIRUS (%V) in mail] TO YOU from [:mail_addr_decode|%s]
[? [:header_field|To] |To: undisclosed-recipients:;|To: [:header_field|To]]
[? [:header_field|Cc] |#|Cc: [:header_field|Cc]]
Message-ID&#58; <VR%i@%h>

&#91;? %#V |&#91;? %#F ||BANNED CONTENTS ALERT&#93;|VIRUS ALERT&#93;

Our content checker found
&#91;? %#V |#|&#91;&#58;wrap|78|    |  |&#91;?%#V|viruses|virus|viruses&#93;&#58; %V&#93;&#93;
&#91;? %#F |#|&#91;&#58;wrap|78|    |  |banned &#91;?%#F|names|name|names&#93;&#58; %F&#93;&#93;
&#91;? %#X |#|&#91;&#91;&#58;wrap|78|    |  |%X&#93;\n&#93;&#93;

in an email to you &#91;? %#V |from&#58;|from probably faked sender&#58;&#93;
  &#91;&#58;mail_addr_decode|%o&#93;
&#91;? %#V |#|claiming to be&#58; &#91;&#58;mail_addr_decode|%s&#93;&#93;

Content type&#58; &#91;&#58;ccat|name|main&#93;#
&#91;? &#91;&#58;ccat|is_blocked_by_nonmain&#93; ||, blocked for &#91;&#58;ccat|name&#93;&#93;
Our internal reference code for your message is %n/%i

&#91;? %a |#|&#91;&#58;wrap|78||  |First upstream SMTP client IP address&#58; &#91;&#58;client_addr_port&#93; %g&#93;&#93;

&#91;&#58;wrap|78||  |Received trace&#58; &#91;ip_proto_trace_all|%x| < &#93;&#93;

&#91;&#58;wrap|78||  |Return-Path&#58; &#91;&#58;mail_addr_decode|%s&#93;&#91;?&#91;&#58;dkim|envsender&#93;|| &#40;OK&#41;&#93;&#93;
&#91;&#58;wrap|78||  |From&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|From&#93;|100&#93;\
&#91;?&#91;&#58;dkim|author&#93;|| &#40;dkim&#58;AUTHOR&#41;&#93;&#93;
&#91;? &#91;&#58;header_field|Sender&#93;|#|\
&#91;&#58;wrap|78||  |Sender&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|Sender&#93;|100&#93;\
&#91;?&#91;&#58;dkim|sender&#93;|| &#40;dkim&#58;SENDER&#41;&#93;&#93;&#93;
&#91;? %m |#|&#91;&#58;wrap|78||  |Message-ID&#58; &#91;&#58;mail_addr_decode|%m&#93;&#93;&#93;
&#91;? %r |#|&#91;&#58;wrap|78||  |Resent-Message-ID&#58; &#91;&#58;mail_addr_decode|%r&#93;&#93;&#93;
&#91;? &#91;&#58;useragent&#93; |#|&#91;&#58;wrap|78||  |&#91;&#58;useragent&#93;&#93;&#93;
&#91;? %j |#|&#91;&#58;wrap|78||  |Subject&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|Subject&#93;|100&#93;&#93;&#93;
&#91;? %q |Not quarantined.|The message has been quarantined as&#58; %q&#93;

Please contact your system administrator for details.
__DATA__
#
# =============================================================================
# This is a template for spam SENDER NOTIFICATIONS.
# For syntax and customization instructions see README.customize.
# The From, To and Date header fields will be provided automatically.
# Long header fields will be automatically wrapped by the program.
#
Subject&#58; Considered UNSOLICITED BULK EMAIL, apparently from you
&#91;? %m  |#|In-Reply-To&#58; &#91;&#58;mail_addr_decode|%m&#93;&#93;
Message-ID&#58; <SS%i@%h>

A message from &#91;&#58;mail_addr_decode|%s&#93;\
&#91;%R|\nto&#58; &#91;&#58;mail_addr_decode|%R&#93;|&#93;

was considered unsolicited bulk e-mail &#40;UBE&#41;.

Our internal reference code for your message is %n/%i

The message carried your return address, so it was either a genuine mail
from you, or a sender address was faked and your e-mail address abused
by third party, in which case we apologize for undesired notification.

We do try to minimize backscatter for more prominent cases of UBE and
for infected mail, but for less obvious cases some balance between
losing genuine mail and sending undesired backscatter is sought,
and there can be some collateral damage on either side.

&#91;? %a |#|&#91;&#58;wrap|78||  |First upstream SMTP client IP address&#58; &#91;&#58;client_addr_port&#93; %g&#93;&#93;

&#91;&#58;wrap|78||  |Received trace&#58; &#91;ip_proto_trace_all|%x| < &#93;&#93;

&#91;&#58;wrap|78||  |Return-Path&#58; &#91;&#58;mail_addr_decode|%s&#93;&#91;?&#91;&#58;dkim|envsender&#93;|| &#40;OK&#41;&#93;&#93;
&#91;&#58;wrap|78||  |From&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|From&#93;|100&#93;\
&#91;?&#91;&#58;dkim|author&#93;|| &#40;dkim&#58;AUTHOR&#41;&#93;&#93;
&#91;? &#91;&#58;header_field|Sender&#93;|#|\
&#91;&#58;wrap|78||  |Sender&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|Sender&#93;|100&#93;\
&#91;?&#91;&#58;dkim|sender&#93;|| &#40;dkim&#58;SENDER&#41;&#93;&#93;&#93;
&#91;? %m |#|&#91;&#58;wrap|78||  |Message-ID&#58; &#91;&#58;mail_addr_decode|%m&#93;&#93;&#93;
&#91;? %r |#|&#91;&#58;wrap|78||  |Resent-Message-ID&#58; &#91;&#58;mail_addr_decode|%r&#93;&#93;&#93;
# &#91;? &#91;&#58;useragent&#93; |#|&#91;&#58;wrap|78||  |&#91;&#58;useragent&#93;&#93;&#93;
&#91;? %j |#|&#91;&#58;wrap|78||  |Subject&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|Subject&#93;|100&#93;&#93;&#93;
&#91;? %#X |#|\n&#91;&#91;&#58;wrap|78||  |%X&#93;\n&#93;&#93;

&#91;? %#D |Delivery of the email was stopped!
&#93;#
#
# Spam scanner report&#58;
# &#91;%A
# &#93;\
__DATA__
#
# =============================================================================
# This is a template for spam ADMINISTRATOR NOTIFICATIONS.
# For syntax and customization instructions see README.customize.
# Long header fields will be automatically wrapped by the program.
#
From&#58; %f
Date&#58; %d
Subject&#58; Spam FROM &#91;?%l||LOCAL &#93;&#91;?%a||&#91;&#58;client_addr_port&#93; &#93;&#91;&#58;mail_addr_decode|%s&#93;
To&#58; &#91;? %#T |undisclosed-recipients&#58;;|&#91;%T|, &#93;&#93;
&#91;? %#C |#|Cc&#58; &#91;%C|, &#93;&#93;
Message-ID&#58; <SA%i@%h>

Content type&#58; &#91;&#58;ccat|name|main&#93;#
&#91;? &#91;&#58;ccat|is_blocked_by_nonmain&#93; ||, blocked for &#91;&#58;ccat|name&#93;&#93;
Internal reference code for the message is %n/%i

&#91;? %a |#|&#91;&#58;wrap|78||  |First upstream SMTP client IP address&#58; &#91;&#58;client_addr_port&#93; %g&#93;&#93;

&#91;&#58;wrap|78||  |Received trace&#58; &#91;ip_proto_trace_all|%x| < &#93;&#93;

&#91;&#58;wrap|78||  |Return-Path&#58; &#91;&#58;mail_addr_decode|%s&#93;&#91;?&#91;&#58;dkim|envsender&#93;|| &#40;OK&#41;&#93;&#93;
&#91;&#58;wrap|78||  |From&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|From&#93;|100&#93;\
&#91;?&#91;&#58;dkim|author&#93;|| &#40;dkim&#58;AUTHOR&#41;&#93;&#93;
&#91;? &#91;&#58;header_field|Sender&#93;|#|\
&#91;&#58;wrap|78||  |Sender&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|Sender&#93;|100&#93;\
&#91;?&#91;&#58;dkim|sender&#93;|| &#40;dkim&#58;SENDER&#41;&#93;&#93;&#93;
&#91;? %m |#|&#91;&#58;wrap|78||  |Message-ID&#58; &#91;&#58;mail_addr_decode|%m&#93;&#93;&#93;
&#91;? %r |#|&#91;&#58;wrap|78||  |Resent-Message-ID&#58; &#91;&#58;mail_addr_decode|%r&#93;&#93;&#93;
&#91;? &#91;&#58;useragent&#93; |#|&#91;&#58;wrap|78||  |&#91;&#58;useragent&#93;&#93;&#93;
&#91;? %j |#|&#91;&#58;wrap|78||  |Subject&#58; &#91;&#58;mime_decode|&#91;&#58;header_field_octets|Subject&#93;|100&#93;&#93;&#93;
&#91;? %q |Not quarantined.|The message has been quarantined as&#58; %q&#93;

&#91;? %#D |#|The message WILL BE relayed to&#58;&#91;%D|\n&#91;&#58;mail_addr_decode|%D&#93;|&#93;
&#93;
&#91;? %#N |#|The message WAS NOT relayed to&#58;&#91;%N|\n&#91;&#58;mail_addr_decode|%N&#93;|&#93;
&#93;
Spam scanner report&#58;
&#91;%A
&#93;\
__DATA__
#
Для использования своих шаблонов, указывай в конфиге amavisd.conf их место расположения.
FreeBSD, PostFix, AmavisD-New, Spamassassin - это хорошо!

Аватара пользователя
Виктор
Член клуба
Член клуба
Сообщения: 833
Зарегистрирован: 02 июн 2006, 15:54
Откуда: Южно-Сахалинск

Re: текст сообщения amavis-new

Сообщение Виктор » 06 июн 2016, 06:22

Причем он ничего и никому не посылает (только на админа).
Эти предупреждения добавляются в Subject сообщения.
А при полной блокировке просто заносятся в логи почтовика.
чем. толще наши морды. тем теснее наши ряды.

Ответить