smtp

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package smtp allows to monitor SMTP servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, serverName string, addr string) error

Connect dials a tcp connection to the given address addr. It then exchanges greeting messages with the SMTP server behind the connection and requests STARTTLS. It then opens a TLSv1.3 connection and checks if the server has the given server name serverName and that its certificate is trusted by the local CA storage and closes the SMTP connection afterwards.

func ResolveV4

func ResolveV4(ctx context.Context, domain string) (string, string, error)

ResolveV4 resolves the IPv4 address of the SMTP server responsible for the given domain and returns the first IPv4 address.

func ResolveV6

func ResolveV6(ctx context.Context, domain string) (string, string, error)

ResolveV6 resolves the IPv6 address of the SMTP server responsible for the given domain and returns the first IPv6 address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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