nmsg  0.9.0
Variables
email.c File Reference

base "email" message type. More...

Go to the source code of this file.

Variables

struct nmsg_msgmod_field email_fields []
 
struct nmsg_msgmod_plugin nmsg_msgmod_ctx
 

Detailed Description

base "email" message type.

This message type is meant to carry information about the envelope, headers, and body of an email message delivered over SMTP.

Email message fields.

Name Type Required Repeated

Description

type enum EmailType no no

Type of email

headers multi-line string no no

Email headers; may be redacted

srcip IP address no no

Remote client IP

srchost string no no

Remote client hostname, if known

helo string no no

HELO/EHLO SMTP parameter

from string no no

MAIL FROM SMTP parameter (brackets stripped)

rcpt string no yes

RCPT TO SMTP parameters(s) (brackets stripped)

bodyurl string no yes

URL(s) found in decoded body

enum EmailType values.

Name Value

Description

unknown 0

spamtrap 1

Email sent to a spamtrap

rej_network 2

Rejected by network or SMTP (pre-DATA) checks, including IP blacklists.

rej_content 3

Rejected by content filter, including domain blacklists.

rej_user 4

Classified by user as spam.

Definition in file email.c.

Variable Documentation

struct nmsg_msgmod_field email_fields[]
Initial value:
= {
{ .type = nmsg_msgmod_ft_enum, .name = "type" },
{ .type = nmsg_msgmod_ft_mlstring, .name = "headers" },
{ .type = nmsg_msgmod_ft_ip, .name = "srcip" },
{ .type = nmsg_msgmod_ft_string, .name = "srchost" },
{ .type = nmsg_msgmod_ft_string, .name = "helo" },
{ .type = nmsg_msgmod_ft_string, .name = "from" },
{
.name = "rcpt",
},
{
.name = "bodyurl",
},
{ .type = nmsg_msgmod_ft_mlstring, .name = "body" },
NMSG_MSGMOD_FIELD_END
}
Protobuf enum.
Definition: msgmod.h:75
Protobuf byte array.
Definition: msgmod.h:96
Protobuf byte array.
Definition: msgmod.h:84
Protobuf byte array.
Definition: msgmod.h:90
#define NMSG_MSGMOD_FIELD_REPEATED
field is repeated
Definition: msgmod.h:123

Definition at line 25 of file email.c.

struct nmsg_msgmod_plugin nmsg_msgmod_ctx
Initial value:
= {
NMSG_MSGMOD_REQUIRED_INIT,
.vendor = NMSG_VENDOR_BASE,
.msgtype = { NMSG_VENDOR_BASE_EMAIL_ID, NMSG_VENDOR_BASE_EMAIL_NAME },
.pbdescr = &nmsg__base__email__descriptor,
.fields = email_fields
}

Definition at line 48 of file email.c.