[Exim] about $message_body

Top Page
Delete this message
Reply to this message
Author: maxes
Date:  
To: exim-users
Subject: [Exim] about $message_body
Hi all.

I have counter system for outgoing mail.
In sysem filter placed next code:

...
if $n0 is above $n1
   or
   $n0 is $n1
then
  mail to $sender_address
       from system@host
       subject "mail send reached limit ($n1)"
       expand file /usr/local/etc/exim/stat/templ/out_overlimit.mail
  pipe "/usr/local/etc/exim/stat/counter_fail_out.pl $sender_address"
  seen finish
endif
...


1)
script /usr/local/etc/exim/stat/counter_fail_out.pl write in *.dbm
number of failed attempt.

2)
/usr/local/etc/exim/stat/templ/out_overlimit.mail contain text:

Your mail to $h_to with subject $h_subject not send.
Reason: to many messages per day

------ This is a copy of your message, including all the headers. ------

$message_headers

$message_body


In filter documentation for $message_body :
"The initial portion of the body of the message.
By default, up to 500 characters are read into this variable, but
the system administrator can configure this to some other value.
Newlines in the body are converted into single spaces"

I can increase message_body_visible to some big number, for
example, 10000.
But what do with "Newlines in the body are converted into single
spaces" ?

Some person like analize this "to many mesasages per day " reject in
local mailbox and send mail again. In next day, for example.
May be exists more elegant way to count outgoing messages and reject
overlimit mesages with full header and _full_ body ?

b.r.
Kozin Maxim