winlicli
Goto Top

Amavisd Mailbenachrichtigungs-Vorlagen anpassen

Hallo,

weis jemand wo ich unter CentOS7 die MailVorlagen für amavisd finde, die an einem bestimmten Kontakt verschickt werden, wenn ein Virus oder Spam gefunden wird?
Im Netz finde ich leider überhaupt nichts dazu, zumindest nichts brauchbares für CentOS7.

Ich möchte diesen Text nämlich anpassen.

Auf Antworten würde ich mich freuen.

Lg

Content-Key: 560480

Url: https://administrator.de/contentid/560480

Printed on: April 18, 2024 at 16:04 o'clock

Member: godlie
godlie Mar 24, 2020 at 16:45:09 (UTC)
Goto Top
Hallo,

such doch einfach mal nach den template file namen:

find /etc/ -name 'charset'  

charset                     
template-dsn.txt               
template-release-quarantine.txt  
template-spam-sender.txt  
template-virus-recipient.txt
template-auto-response.txt  
template-problem-feedback.txt  
template-spam-admin.txt          
template-virus-admin.txt  
template-virus-sender.txt
Member: WinLiCLI
WinLiCLI Mar 24, 2020 at 22:39:01 (UTC)
Goto Top
Nein, nichts.
Auch nichts unter /var/spool.
Member: godlie
Solution godlie Mar 25, 2020 at 04:13:29 (UTC)
Goto Top
Hallo,

so nach ein wenig Recherche , für das gelinge gesagt bescheidene CentOs.....

Du musst dir da die amavisd.conf etwas erweitern, ansonsten kannst du keine CustomTemplates laden

# $notify_sender_templ       = ... built-in default at the end of file amavisd
# $notify_virus_sender_templ = ... built-in default at the end of file amavisd
# $notify_spam_sender_templ  = ... built-in default at the end of file amavisd
# $notify_virus_admin_templ  = ... built-in default at the end of file amavisd
# $notify_spam_admin_templ   = ... built-in default at the end of file amavisd
$notify_virus_recips_templ = read_text('/etc/amavisd/notify_virus_recips.txt');  
# $notify_spam_recips_templ  = ... built-in default at the end of file amavisd
# $notify_release_templ      = ... built-in default at the end of file amavisd
# $notify_report_templ       = ... built-in default at the end of file amavisd
Member: godlie
Solution godlie Mar 25, 2020 at 05:18:49 (UTC)
Goto Top
Hier die Einzelnen Templates:

template-auto-response
#
# =============================================================================
# This is a template for the plain text part of an auto response (e.g.
# vacation, out-of-office), see RFC 3834.
#
From: %f
Date: %d
To: [? %#T |undisclosed-recipients:;|[%T|, ]]
[? %#C |#|Cc: [%C|, ]]
Reply-To: postmaster@%h
Message-ID: <ARE%i@%h>
Auto-Submitted: auto-replied
[:wrap|76||\t|Subject: Auto: autoresponse to: %s]
[? %m  |#|In-Reply-To: %m]
Precedence: junk

This is an auto-response to a message \
[? %a |\nreceived on %d,|received from\nIP address \[%a\] on %d,]
envelope sender: %s
(author)   From: [:rfc2822_from]
[? %j |#|[:wrap|78||  |Subject: %j]]
[?[:dkim|author]|#|
A first-party DKIM or DomainKeys signature is valid, d=[:dkim|author].]

template-dsn
#
# =============================================================================
# This is a template for (neutral: non-virus, non-spam, non-banned)
# DELIVERY STATUS NOTIFICATIONS to sender.
# 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: [?%#D|Undeliverable mail|Delivery status notification]\
[? [:ccat|major] |||, MTA-BLOCKED\
|, OVERSIZED message\
|, invalid header section[=explain_badh|1]\
[?[:ccat|minor]||: bad MIME|: unencoded 8-bit character\
|: improper use of control char|: all-whitespace header line\
|: header line longer than 998 characters|: header field syntax error\
|: missing required header field|: duplicate header field|]\
|, UNSOLICITED BULK EMAIL apparently from you\
|, UNSOLICITED BULK EMAIL apparently from you\
|, contents UNCHECKED\
|, BANNED contents type (%F)\
|, VIRUS in message apparently from you (%V)\
]
Message-ID: <DSN%i@%h>

[? %#D |#|Your message WAS SUCCESSFULLY RELAYED to:[\n  %D]
[~[:dsn_notify]|["\\bSUCCESS\\b"]|\  
and you explicitly requested a delivery status notification on success.\n]\
]
[? %#N |#|The message WAS NOT relayed to:[\n  %N]
]
[:wrap|78|||This [?%#D|nondelivery|delivery] report was \
generated by the program amavisd-new at host %h. \
Our internal reference code for your message is %n/%i]

# ccat_min 0: other,  1: bad MIME,  2: 8-bit char,  3: NUL/CR,
#          4: empty,  5: long,  6: syntax,  7: missing,  8: multiple
[? [:explain_badh] ||[? [:ccat|minor]
|INVALID HEADER
|INVALID HEADER: BAD MIME HEADER SECTION OR BAD MIME STRUCTURE
|INVALID HEADER: INVALID 8-BIT CHARACTERS IN HEADER SECTION
|INVALID HEADER: INVALID CONTROL CHARACTERS IN HEADER SECTION
|INVALID HEADER: FOLDED HEADER FIELD LINE MADE UP ENTIRELY OF WHITESPACE
|INVALID HEADER: HEADER LINE LONGER THAN RFC 5322 LIMIT OF 998 CHARACTERS
|INVALID HEADER: HEADER FIELD SYNTAX ERROR
|INVALID HEADER: MISSING REQUIRED HEADER FIELD
|INVALID HEADER: DUPLICATE HEADER FIELD
|INVALID HEADER
]
[[:wrap|78|  |  |%X]\n]
]\
#
[:wrap|78||  |Return-Path: %s[?[:dkim|envsender]|| (OK)]]
[:wrap|78||  |From: [:header_field|From|100][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|\
[:wrap|78||  |Sender: [:header_field|Sender|100]\
[?[:dkim|sender]|| (dkim:SENDER)]]]
[? %m |#|[:wrap|78||  |Message-ID: %m]]
[? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
[? %#X|#|[? [:useragent] |#|[:wrap|78||  |[:useragent]]]]
[? %j |#|[:wrap|78||  |Subject: [:header_field|Subject|100]]]

# ccat_min 0: other,  1: bad MIME,  2: 8-bit char,  3: NUL/CR,
#          4: empty,  5: long,  6: syntax,  7: missing,  8: multiple
[? [:explain_badh] ||[? [:ccat|minor]
|# 0: other
|# 1: bad MIME
|# 2: 8-bit char
WHAT IS AN INVALID CHARACTER IN A MAIL HEADER SECTION?

  The RFC 5322 document specifies rules for forming internet messages.
  It does not allow the use of characters with codes above 127 to be
  used directly (non-encoded) in a mail header section.

  If such characters (e.g. with diacritics) from ISO Latin or other
  alphabets need to be included in a header section, these characters
  need to be properly encoded according to RFC 2047. Such encoding
  is often done transparently by mail reader (MUA), but if automatic
  encoding is not available (e.g. by some older MUA) it is a user's  
  responsibility to avoid using such characters in a header section,
  or to encode them manually. Typically the offending header fields
  in this category are 'Subject', 'Organization', and comment fields  
  or display names in e-mail addresses of 'From', 'To' or 'Cc'.  

  Sometimes such invalid header fields are inserted automatically
  by some MUA, MTA, content filter, or other mail handling service.
  If this is the case, such service needs to be fixed or properly
  configured. Typically the offending header fields in this category
  are 'Date', 'Received', 'X-Mailer', 'X-Priority', 'X-Scanned', etc.  

  If you don't know how to fix or avoid the problem, please report it  
  to _your_ postmaster or system manager.
#
[~[:useragent]|^X-Mailer:\\s*Microsoft Outlook Express 6\\.00|["  
  If using Microsoft Outlook Express as your MUA, make sure its
  settings under:
     Tools -> Options -> Send -> Mail Sending Format -> Plain & HTML
  are: "MIME format" MUST BE selected,  
  and  "Allow 8-bit characters in headers" MUST NOT be enabled!  
"]]#  
|# 3: NUL/CR
IMPROPER USE OF CONTROL CHARACTER IN A MESSAGE HEADER SECTION

  The RFC 5322 document specifies rules for forming internet messages.
  It does not allow the use of control characters NUL and bare CR
  to be used directly in a mail header section.
|# 4: empty
IMPROPERLY FOLDED HEADER FIELD LINE MADE UP ENTIRELY OF WHITESPACE

  The RFC 5322 document specifies rules for forming internet messages.
  In section '3.2.2. Folding white space and comments' it explicitly  
  prohibits folding of header fields in such a way that any line of a
  folded header field is made up entirely of white-space characters
  (control characters SP and HTAB) and nothing else.
|# 5: long
HEADER LINE LONGER THAN RFC 5322 LIMIT OF 998 CHARACTERS

  The RFC 5322 document specifies rules for forming internet messages.
  Section '2.1.1. Line Length Limits' prohibits each line of a header  
  section to be more than 998 characters in length (excluding the CRLF).
|# 6: syntax
|# 7: missing
MISSING REQUIRED HEADER FIELD

  The RFC 5322 document specifies rules for forming internet messages.
  Section '3.6. Field Definitions' specifies that certain header fields  
  are required (origination date field and the "From:" originator field).  
|# 8: multiple
DUPLICATE HEADER FIELD

  The RFC 5322 document specifies rules for forming internet messages.
  Section '3.6. Field Definitions' specifies that certain header fields  
  must not occur more than once in a message header section.
|# other
]]#

template-problem-feedback
#
# =============================================================================
# This is a template for the plain text part of a problem/feedback report,
# with either the original message included in-line, or attached,
# or the message is structured as a FEEDBACK REPORT NOTIFICATIONS format.
# See RFC 5965 - "An Extensible Format for Email Feedback Reports".  
#
From: %f
Date: %d
Subject: Fw: %j
To: [? %#T |undisclosed-recipients:;|[%T|, ]]
[? %#C |#|Cc: [%C|, ]]
Message-ID: <ARF%i@%h>
#Auto-Submitted: auto-generated

This is an e-mail [:feedback_type] report for a message \
[? %a |\nreceived on %d,|received from\nIP address [:client_addr_port] on %d,]

[:wrap|78||  |Return-Path: %s]
[:wrap|78||  |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|[:wrap|78||  |Sender: [:header_field|Sender]]]
[? %m |#|[:wrap|78||  |Message-ID: %m]]
[? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
[? %j |#|[:wrap|78||  |Subject: [:header_field|Subject|100]]]
[?[:dkim|author]|#|
A first-party DKIM or DomainKeys signature is valid, d=[:dkim|author].]

Reporting-MTA: %h
Our internal reference code for the message is %n/%i

[~[:report_format]|["^(arf|attach|dsn)$"]|["\  
A complete original message is attached.
[~[:report_format]|["^arf$"]|\  
For more information on the ARF format please see RFC 5965.
]"]|["\  
A complete original message in its pristine form follows:
"]]#  

template-release-quarantine
#
# =============================================================================
# This is a template for the plain text part of a RELEASE FROM A QUARANTINE,
# applicable if a chosen release format is 'attach' (not 'resend').  
#
From: %f
Date: %d
Subject: \[released message\] %j
To: [? %#T |undisclosed-recipients:;|[%T|, ]]
[? %#C |#|Cc: [%C|, ]]
Message-ID: <QRA%i@%h>

Please find attached a message which was held in a quarantine,
and has now been released.

[:wrap|78||  |Return-Path: %s[?[:dkim|envsender]|| (OK)]]
[:wrap|78||  |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|\
[:wrap|78||  |Sender: [:header_field|Sender]\
[?[:dkim|sender]|| (dkim:SENDER)]]]
# [? %m |#|[:wrap|78||  |Message-ID: %m]]
# [? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
# [? [:useragent] |#|[:wrap|78||  |[:useragent]]]
[? %j |#|[:wrap|78||  |Subject: %j]]

Our internal reference code for the message is %n/%i
#
[~[:report_format]|["^attach$"]|["[? [:attachment_password] |#|  

Contents of the attached mail message may pose a threat to your computer or
could be a social engineering deception, so it should be handled cautiously.
To prevent undesired automatic opening, the attached original mail message
has been wrapped in a password-protected ZIP archive.

Here is the password that allows opening of the attached archive:

  [:attachment_password]

Note that the attachment is not strongly encrypted and the password
is not a strong secret (being displayed in this non-encrypted text),
so this attachment is not suitable for guarding a secret contents.
The sole purpose of this password protection it to prevent undesired
accidental or automatic opening of a message, either by some filtering
software, a virus scanner, or by a mail reader.
]"]|]#  

template-spam-admin
#
# =============================================================================
# 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: %f
Date: %d
Subject: Spam FROM [?%l||LOCAL ][?%a||[:client_addr_port] ]%s
To: [? %#T |undisclosed-recipients:;|[%T|, ]]
[? %#C |#|Cc: [%C|, ]]
Message-ID: <SA%i@%h>

Content type: [:ccat|name|main]#
[? [:ccat|is_blocked_by_nonmain] ||, blocked for [:ccat|name]]
Internal reference code for the message is %n/%i

[? %a |#|[:wrap|78||  |First upstream SMTP client IP address: \[%a\] %g]]
[? %e |#|[:wrap|78||  |According to a 'Received:' trace,\  
 the message apparently originated at: \[%e\], %t]]

[:wrap|78||  |Return-Path: %s[?[:dkim|envsender]|| (OK)]]
[:wrap|78||  |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|\
[:wrap|78||  |Sender: [:header_field|Sender]\
[?[:dkim|sender]|| (dkim:SENDER)]]]
[? %m |#|[:wrap|78||  |Message-ID: %m]]
[? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
[? [:useragent] |#|[:wrap|78||  |[:useragent]]]
[? %j |#|[:wrap|78||  |Subject: %j]]
[? %q |Not quarantined.|The message has been quarantined as: %q]

[? %#D |#|The message WILL BE relayed to:[\n%D]
]
[? %#N |#|The message WAS NOT relayed to:[\n%N]
]
Spam scanner report:
[%A
]\

template-spam-sender
#
# =============================================================================
# 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: Considered UNSOLICITED BULK EMAIL, apparently from you
[? %m  |#|In-Reply-To: %m]
Message-ID: <SS%i@%h>

A message from %s[
to: %R]

was considered unsolicited bulk e-mail (UBE).

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.

[? %a |#|[:wrap|78||  |First upstream SMTP client IP address: \[%a\] %g]]
[? %e |#|[:wrap|78||  |According to a 'Received:' trace,\  
 the message apparently originated at: \[%e\], %t]]

[:wrap|78||  |Return-Path: %s[?[:dkim|envsender]|| (OK)]]
[:wrap|78||  |From: [:header_field|From|100][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|\
[:wrap|78||  |Sender: [:header_field|Sender|100]\
[?[:dkim|sender]|| (dkim:SENDER)]]]
[? %m |#|[:wrap|78||  |Message-ID: %m]]
[? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
# [? [:useragent] |#|[:wrap|78||  |[:useragent]]]
[? %j |#|[:wrap|78||  |Subject: [:header_field|Subject|100]]]
[? %#X |#|\n[[:wrap|78||  |%X]\n]]

[? %#D |Delivery of the email was stopped!
]#
#
# Spam scanner report:
# [%A
# ]\

template-virus-admin
#
# =============================================================================
# This is a template for non-spam (e.g. VIRUS,...) ADMINISTRATOR 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]\
 FROM [?%l||LOCAL ][?%a||[:client_addr_port] ]%s
To: [? %#T |undisclosed-recipients:;|[%T|, ]]
[? %#C |#|Cc: [%C|, ]]
Message-ID: <VA%i@%h>

[? %#V |No viruses were found.
|A virus was found: %V
|Two viruses were found:\n  %V
|%#V viruses were found:\n  %V
]
[? %#F |#|[:wrap|78||  |Banned [?%#F|names|name|names]: %F]]
[? %#X |#|Bad header:[\n[:wrap|78|  |  |%X]]]
[? %#W |#\
|Scanner detecting a virus: %W
|Scanners detecting a virus: %W
]
Content type: [:ccat|name|main]#
[? [:ccat|is_blocked_by_nonmain] ||, blocked for [:ccat|name]]
Internal reference code for the message is %n/%i

[? %a |#|[:wrap|78||  |First upstream SMTP client IP address: \[%a\] %g]]
[? %e |#|[:wrap|78||  |According to a 'Received:' trace,\  
 the message apparently originated at: \[%e\], %t]]

[:wrap|78||  |Return-Path: %s[?[:dkim|envsender]|| (OK)]]
[:wrap|78||  |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|\
[:wrap|78||  |Sender: [:header_field|Sender]\
[?[:dkim|sender]|| (dkim:SENDER)]]]
[? %m |#|[:wrap|78||  |Message-ID: %m]]
[? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
[? %j |#|[:wrap|78||  |Subject: %j]]
[? %q |Not quarantined.|The message has been quarantined as: %q]

[? %#S |Notification to sender will not be mailed.

]#
[? %#D |#|The message WILL BE relayed to:[\n%D]
]
[? %#N |#|The message WAS NOT relayed to:[\n%N]
]
[? %#V |#|[? %#v |#|Virus scanner output:[\n  %v]
]]

template-virus-recipient
#
# =============================================================================
# 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 %s
[? [:header_field|To] |To: undisclosed-recipients:;|To: [:header_field|To]]
[? [:header_field|Cc] |#|Cc: [:header_field|Cc]]
Message-ID: <VR%i@%h>

[? %#V |[? %#F ||BANNED CONTENTS ALERT]|VIRUS ALERT]

Our content checker found
[? %#V |#|[:wrap|78|    |  |[?%#V|viruses|virus|viruses]: %V]]
[? %#F |#|[:wrap|78|    |  |banned [?%#F|names|name|names]: %F]]
[? %#X |#|[[:wrap|78|    |  |%X]\n]]

in an email to you [? %#V |from:|from probably faked sender:]
  %o
[? %#V |#|claiming to be: %s]

Content type: [:ccat|name|main]#
[? [:ccat|is_blocked_by_nonmain] ||, blocked for [:ccat|name]]
Our internal reference code for your message is %n/%i

[? %a |#|[:wrap|78||  |First upstream SMTP client IP address: \[%a\] %g]]
[? %e |#|[:wrap|78||  |According to a 'Received:' trace,\  
 the message apparently originated at: \[%e\], %t]]

[:wrap|78||  |Return-Path: %s[?[:dkim|envsender]|| (OK)]]
[:wrap|78||  |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|\
[:wrap|78||  |Sender: [:header_field|Sender]\
[?[:dkim|sender]|| (dkim:SENDER)]]]
[? %m |#|[:wrap|78||  |Message-ID: %m]]
[? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
[? [:useragent] |#|[:wrap|78||  |[:useragent]]]
[? %j |#|[:wrap|78||  |Subject: %j]]
[? %q |Not quarantined.|The message has been quarantined as: %q]

Please contact your system administrator for details.

template-virus-sender
#
# =============================================================================
# This is a template for VIRUS/BANNED 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: [? [:ccat|major]
|Clean message from you\
|Clean message from you\
|Clean message from you (MTA blocked)\
|OVERSIZED message from you\
|BAD-HEADER in message from you\
|Spam claiming to be from you\
|Spam claiming to be from you\
|A message with UNCHECKED contents from you\
|BANNED contents from you (%F)\
|VIRUS in message apparently from you (%V)\
]
[? %m  |#|In-Reply-To: %m]
Message-ID: <VS%i@%h>

[? [:ccat|major] |Clean|Clean|MTA-BLOCKED|OVERSIZED|INVALID HEADER|\
Spammy|Spam|UNCHECKED contents|BANNED CONTENTS ALERT|VIRUS ALERT]

Our content checker found
[? %#V |#|[:wrap|78|    |  |[? %#V |viruses|virus|viruses]: %V]]
[? %#F |#|[:wrap|78|    |  |banned [? %#F |names|name|names]: %F]]
[? %#X |#|[[:wrap|78|    |  |%X]\n]]

in email presumably from you %s
to the following [? %#R |recipients|recipient|recipients]:[
-> %R]

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

[? %a |#|[:wrap|78||  |First upstream SMTP client IP address: \[%a\] %g]]
[? %e |#|[:wrap|78||  |According to a 'Received:' trace,\  
 the message apparently originated at: \[%e\], %t]]

[:wrap|78||  |Return-Path: %s[?[:dkim|envsender]|| (OK)]]
[:wrap|78||  |From: [:header_field|From|100][?[:dkim|author]|| (dkim:AUTHOR)]]
[? [:header_field|Sender]|#|\
[:wrap|78||  |Sender: [:header_field|Sender|100]\
[?[:dkim|sender]|| (dkim:SENDER)]]]
[? %m |#|[:wrap|78||  |Message-ID: %m]]
[? %r |#|[:wrap|78||  |Resent-Message-ID: %r]]
[? %j |#|[:wrap|78||  |Subject: [:header_field|Subject|100]]]

[? %#D |Delivery of the email was stopped!

]#
[? %#V ||Please check your system for viruses,
or ask your system administrator to do so.

]#
[? %#V |[? %#F ||#
The message [?%#D|has been blocked|triggered this warning] because it contains a component
(as a MIME part or nested within) with declared name
or MIME type or contents type violating our access policy.

To transfer contents that may be considered risky or unwanted
by site policies, or simply too large for mailing, please consider
publishing your content on the web, and only sending an URL of the
document to the recipient.

Depending on the recipient and sender site policies, with a little
effort it might still be possible to send any contents (including
viruses) using one of the following methods:

- encrypted using pgp, gpg or other encryption methods;

- wrapped in a password-protected or scrambled container or archive
  (e.g.: zip -e, arj -g, arc g, rar -p, or other methods)

Note that if the contents is not intended to be secret, the
encryption key or password may be included in the same message
for recipient's convenience.  

We are sorry for inconvenience if the contents was not malicious.

The purpose of these restrictions is to cut the most common propagation
methods used by viruses and other malware. These often exploit automatic
mechanisms and security holes in more popular mail readers (Microsoft
mail readers and browsers are a common target). By requiring an explicit
and decisive action from the recipient to decode mail, the danger of
automatic malware propagation is largely reduced.
#
# Details of our mail restrictions policy are available at ...

]]#

grüße
Member: WinLiCLI
WinLiCLI Mar 25, 2020 at 09:39:28 (UTC)
Goto Top
Danke dafür.

Wo hast du die Templates gefunden, was die Variablen alle bedeuten will ich aus dieser Doku raus lesen.
Da amavisd bereits ohne diese Templates Nachrichten verschickt, denke ich, dass der default bereits im Code drin steckt.

Lg
Member: godlie
godlie Mar 25, 2020 updated at 11:15:01 (UTC)
Goto Top
Hallo,

die Templates hab ich von meinem Debian gezogen, du findest sie aber auch am Ende der amavisd Binary.

grüße
Member: WinLiCLI
WinLiCLI Mar 25, 2020 at 11:35:43 (UTC)
Goto Top
Mit amavisd Binary meinst du die config von amavisd?

Unter CentOS habe interessante Infos in der Datei

ReadMe unter /usr/share/doc gefunden.

Da werden auch die Variablen erklärt.
Member: godlie
Solution godlie Mar 25, 2020 at 11:43:11 (UTC)
Goto Top
Da sich das liebevolle CentOs in meiner VM dauernd verabschiedet ( spricht umso mehr dafür sich davon zu trennen face-smile ), tipp ich mal auf diese Datei

/usr/sbin/amavisd
Member: WinLiCLI
WinLiCLI Mar 27, 2020 at 15:04:18 (UTC)
Goto Top
Das sieht viel versprechend aus.

Dann muss ich mich noch mit der genauen Syntax beschäftigen und könnte dann eigene Templates erstellen.

Als du binary meintest, dachte ich, du meinst ein richtiges binary Paket. Bei mir ist es ein Perl-Skript.

Ich danke dir :=)

Lg
Member: WinLiCLI
WinLiCLI Mar 28, 2020 at 19:39:58 (UTC)
Goto Top
es gibt schon ganz gute Fortschritte.
Mir ist aufgefallen, dass Umlaute in den Templates nicht korrekt angezeigt werden.
Ich habe schon einiges probiert, was aber nichts gebracht hat.

Zb folgendes:

$bdy_encoding = 'utf-8';

Hast du dafür auch eine Lösung?

Danke und Lg
Member: godlie
godlie Mar 29, 2020 at 06:58:29 (UTC)
Goto Top
Hallo,

welches Encoding haben deine Files?

Alternativ kann amavisd auch ein ganzes Directory lesen mit einerm entsprechendem File.

Eintrag in der amavisd.conf
read_l10n_templates('en_US', '/etc/amavis');  

Datei charset:
# This is charset for en_US messages.
# If you are creating new messages, use 'iconv -l' to get possible encodings.  
ascii   # or iso-8859-1
Member: WinLiCLI
WinLiCLI Mar 29, 2020 at 13:15:00 (UTC)
Goto Top
Was mich wundert ist, dass per default, wenn man eine Spamnotification erhält, dann wird im Mailbody der Text von Spamassassin rein gesetzt:

"[...] Die ursprüngliche Nachricht wurde an diesen Bericht angehängt, so dass
Sie sie anschauen können (falls es doch eine legitime E-Mail ist) oder [...]"

und da werden auch Umlaute verwendet die standardmäßig korrekt angezeigt werden.

Laut meinen Recherchen ist "read_l10n_templates" nur für Debian Distris vorbehalten.
Member: godlie
godlie Mar 29, 2020 at 13:43:15 (UTC)
Goto Top
Das "read_l10n_templates" ist nur ein Alias für "Amavis::Util::read_l10n_templates" und ist in der Source vom amavis hinterlegt.

Ich glaube nicht, dass diese Mail vom amavis generiert wird, der sendet eig. nur an den "Admin" u. den "Absender".

bzgl. deinem Encoding, was hier wichtig ist, dass deine Files auch in UTF-8 gespeichert sind

$hdr_encoding = 'UTF-8';  # header field bodies charset  
$bdy_encoding = 'UTF-8';  # notification body text charset  
Member: WinLiCLI
WinLiCLI Mar 29, 2020 at 13:58:54 (UTC)
Goto Top
das hatte ich auch schon drin gehabt. Aber bringen tut es nichts.
So sieht das mit den Grüßen immer aus:

[...]
Mit freundlichen Grüßen
[..]

Ich habe auch im Template den charset auf UTF-8 gesetzt.
Auch dies hat nichts gebracht.
Member: godlie
Solution godlie Mar 29, 2020 at 14:12:28 (UTC)
Goto Top
Sodala,

also umso weiter ich grabe um so seltsamer wirds face-smile, so wie das aussieht, ist da vieles was mit Deutsch un Umlauten zu tun hat, nicht mit UTF-8 zu behandeln sondern mit 'ISO-8859-1'.

das heist die dateien müssen dementsprechend codiert sein, kontrolle mittels:

file -i filename
sollte:
template-dsn.txt: text/plain; charset=iso-8859-1

Datei charset muss dann folgendes beinhalten:
# This is charset for de_DE messages.
# If you are creating new messages, use 'iconv -l' to get possible encodings.  
iso-8859-1  # or iso-8859-1
ignored lines after first one

Deutsche Beispieldateien: http://fblan.de/postfix/amavis/de_DE/charset
Member: WinLiCLI
WinLiCLI Mar 29, 2020 at 15:33:05 (UTC)
Goto Top
Das war es!
Ich habe mein Template einfach mit iconv von utf-8 zu dem iso-8859-1 konvertiert.
Ein cat auf das Template sieht dann so aus:

[...]
Mit freundlichen Gr��en


Aber die E-Mail wird dann korrekt mit Umlaut angezeigt.

Somit klappt auch dies nun.

Danke dir :D

Lg