How to add recipient in stored.virus.message.txt (and related) report?
Mark Sapiro
mark at msapiro.net
Thu Sep 15 22:44:40 UTC 2016
On 09/13/2016 01:53 AM, Tom wrote:
> Hello,
>
> I need to include the recipient email address in stored.*.message.txt reports,
> but Mailscanner removes the line if I try. So, if I have this template:
>
> [..]
> Bitte halten Sie diese Meldung bereit:
>
> Kunde: blah
> Timestamp: $datenumber
> QueueID: $id
> Email: $to
>
> Information Helpdesk: eroeffnen Sie ein Ticket und leiten Sie dieses
> [..]
>
> Then the user receives something like this:
>
> [..]
> Bitte halten Sie diese Meldung bereit:
>
> Kunde: blah
> Timestamp: 20160913
> QueueID: ABABABABAB
>
> Information Helpdesk: eroeffnen Sie ein Ticket und leiten Sie dieses
> [..]
>
> The line containing "Email: $to" have been removed.
But these reports are in the message delivered to the recipient.
Presumably the recipient already knows who she is, so why do you want to
pot a To: line in the report?
> Is this possible?
>
> And - if it is currently not possible, could someone please point me to
> the correct place in the code so that I can patch it myself?
There are a couple of things going on here. Apparently if a line in the
report template contains an unknown $string replacement, the entire line
is removed. I think this is a bug. I think the correct behavior is to
leave the line unchanged.
The other thing is apparently $to is 'unknown' for the
stored.*.message.txt templates even though it is clearly known for at
least some other reports.
I haven't specifically looked for the code, but it would be in
MailScanner's Message.pm module. If you want to work on this, it would
be helpful if you filed an issue at
<https://github.com/MailScanner/v5/issues> and an eventual PR if you
develop a fix.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the MailScanner
mailing list