mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
More notice email tuning.
This commit is contained in:
parent
75e5caeff5
commit
0e79ec46b6
1 changed files with 8 additions and 1 deletions
|
@ -354,16 +354,23 @@ function email_notice_to(n: Notice::Info, dest: string, extend: bool)
|
||||||
|
|
||||||
local email_text = email_headers(fmt("%s", n$note), dest);
|
local email_text = email_headers(fmt("%s", n$note), dest);
|
||||||
|
|
||||||
|
# Finish off the headers and start the message body.
|
||||||
|
email_text = string_cat(email_text, "\n");
|
||||||
|
|
||||||
# First off, add information about the connection if it exists.
|
# First off, add information about the connection if it exists.
|
||||||
if ( n?$id )
|
if ( n?$id )
|
||||||
|
{
|
||||||
email_text = string_cat(email_text, "Connection: ",
|
email_text = string_cat(email_text, "Connection: ",
|
||||||
fmt("%s", n$id$orig_h), ":", fmt("%d", n$id$orig_p), " -> ",
|
fmt("%s", n$id$orig_h), ":", fmt("%d", n$id$orig_p), " -> ",
|
||||||
fmt("%s", n$id$resp_h), ":", fmt("%d", n$id$resp_p), "\n");
|
fmt("%s", n$id$resp_h), ":", fmt("%d", n$id$resp_p), "\n");
|
||||||
|
if ( n?$uid )
|
||||||
|
email_text = string_cat(email_text, "Connection uid: ", n$uid, "\n");
|
||||||
|
}
|
||||||
else if ( n?$src )
|
else if ( n?$src )
|
||||||
email_text = string_cat(email_text, "Address: ", fmt("%s", n$src), "\n");
|
email_text = string_cat(email_text, "Address: ", fmt("%s", n$src), "\n");
|
||||||
|
|
||||||
# Any connection information is followed up by the human readable message.
|
# Any connection information is followed up by the human readable message.
|
||||||
email_text = string_cat(email_text, "\n", "Message: ", n$msg, "\n");
|
email_text = string_cat(email_text, "Message: ", n$msg, "\n");
|
||||||
|
|
||||||
# Add the extended information if it's requested.
|
# Add the extended information if it's requested.
|
||||||
if ( extend )
|
if ( extend )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue