adanos-mail-connector

command module
v0.0.0-...-603c9bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

adanos-mail-connector

伪装成为 SMTP 服务器,将邮件转换为 Adanos 事件发送给 Adanos-alert Server

type MailContent struct {
	pattern.Helpers
	ID      string            `json:"id"`
	Origin  string            `json:"origin"`
	Subject string            `json:"subject"`
	Body    string            `json:"body"`
	From    string            `json:"from"`
	To      []string          `json:"to"`
	Links   map[string]string `json:"links"`
}

事件转发规则,以 MailContent 对象为参数。事件转发规则配置文件格式为 YAML

  • 如果没有指定任何规则,则全部转发
  • 如果指定了规则,但是没有匹配,则丢弃事件,如果匹配规则,则转发
- name: 用于描述该规则
  expr: Origin == "192.168.1.212:25"
- name: 规则 2
  expr: any(To, {# matches "mylxsw@aicode.cc"})

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址