base/protocols/smtp/main.zeek
- SMTP
- Namespace:
SMTP
- Imports:
base/frameworks/notice/weird.zeek, base/protocols/conn/removal-hooks.zeek, base/utils/addrs.zeek, base/utils/directions-and-hosts.zeek, base/utils/email.zeek
Summary
Runtime Options
Direction to capture the full “Received from” path. |
|
When seeing a RCPT TO or DATA command, validate that it has been preceded by a MAIL FROM or RCPT TO command, respectively, else log a weird and possibly disable the SMTP analyzer upon too many invalid transactions. |
|
Disable the SMTP analyzer when that many invalid transactions have been observed in an SMTP session. |
Types
Redefinitions
|
|
Events
Hooks
SMTP finalization hook. |
|
Functions
Create an extremely shortened representation of a log line. |
Detailed Interface
Runtime Options
- SMTP::mail_path_capture
-
- Direction to capture the full “Received from” path.
REMOTE_HOSTS - only capture the path until an internal host is found. LOCAL_HOSTS - only capture the path until the external host is discovered. ALL_HOSTS - always capture the entire path. NO_HOSTS - never capture the path.
- SMTP::mail_transaction_validation
-
When seeing a RCPT TO or DATA command, validate that it has been preceded by a MAIL FROM or RCPT TO command, respectively, else log a weird and possibly disable the SMTP analyzer upon too many invalid transactions.
- SMTP::max_invalid_mail_transactions
-
Disable the SMTP analyzer when that many invalid transactions have been observed in an SMTP session.
Types
- SMTP::Info
- Type:
- Fields:
-
-
trans_depth:
count&log A count to represent the depth of this message transaction in a single connection where multiple messages were transferred.
-
process_received_from:
bool&default=T&optional Indicates if the “Received: from” headers should still be processed.
-
has_client_activity:
bool&default=F&optional Indicates if client activity has been seen, but not yet logged.
-
process_smtp_headers:
bool&default=T&optional Indicates if the SMTP headers should still be processed.
-
entity:
SMTP::Entity&optional (present if base/protocols/smtp/entities.zeek is loaded)
The current entity being seen.
-
fuids:
vectorofstring&log&default=[]&optional (present if base/protocols/smtp/files.zeek is loaded)
An ordered vector of file unique IDs seen attached to the message.
-
rfc822_msg_fuid:
string&optional (present if base/protocols/smtp/files.zeek is loaded)
Tracks the fuid of the top-level RFC822 mail message if
SMTP::enable_rfc822_msg_file_analysisis set.
-
trans_depth:
- SMTP::State
- Type:
- Fields:
-
-
messages_transferred:
count&default=0&optional Count the number of individual messages transmitted during this SMTP session. Note, this is not the number of recipients, but the number of message bodies transferred.
-
pending_messages:
set[SMTP::Info]&optional
-
mime_depth:
count&default=0&optional (present if base/protocols/smtp/entities.zeek is loaded)
Track the number of MIME encoded files transferred during a session.
-
messages_transferred:
Events
- SMTP::log_smtp
- Type:
event(rec:SMTP::Info)
Hooks
- SMTP::finalize_smtp
- Type:
SMTP finalization hook. Remaining SMTP info may get logged when it’s called.
Functions
- SMTP::describe
- Type:
function(rec:SMTP::Info) :string
Create an extremely shortened representation of a log line.