E-MailRelay

Classes | Public Member Functions | Static Public Member Functions | List of all members
GFilters::MxLookup Class Reference

A DNS MX lookup client. More...

`#include <gmxlookup.h>`

Inheritance diagram for GFilters::MxLookup:
[legend]
Collaboration diagram for GFilters::MxLookup:
[legend]

## Classes
struct | Config
| A configuration structure for GFilters::MxLookup. More...

## Public Member Functions
| MxLookup (GNet::EventState, Config={})
| Constructor. More...
| MxLookup (GNet::EventState, Config, const std::vector< GNet::Address > &ns)
| Constructor taking a list of nameservers. More...
void | start (const GStore::MessageId &, const std::string &question_domain, unsigned int port)
| Starts the lookup. More...
G::Slot::Signal< GStore::MessageId, std::string, std::string > & | doneSignal () noexcept
| Returns a reference to the completion signal. More...
void | cancel ()
| Cancels the lookup so the doneSignal() is not emitted. More...

## Static Public Member Functions
static bool | enabled ()
| Returns true if implemented. More...

## Detailed Description

A DNS MX lookup client.

Each nameserver is queried in turn with a 'ns_timeout' interval. After the final nameserver has been queried there is a 'restart_timeout' before the sequence starts again. There is no overall timeout.

Definition at line 49 of file gmxlookup.h.

## Constructor & Destructor Documentation

## ◆ MxLookup() [1/2]

GFilters::MxLookup::MxLookup | ( | GNet::EventState | es,
|  | Config | config = `{}`
| ) |  |
| explicit

Constructor.

Definition at line 48 of file gmxlookup.cpp.

## ◆ MxLookup() [2/2]

GFilters::MxLookup::MxLookup | ( | GNet::EventState | es,
|  | Config | config,
|  | const std::vector< GNet::Address > & | ns
| ) |  |
| explicit

Constructor taking a list of nameservers.

See also
  GNet::nameservers()

Definition at line 54 of file gmxlookup.cpp.

## Member Function Documentation

## ◆ cancel()

void GFilters::MxLookup::cancel | ( |  | ) |

Cancels the lookup so the doneSignal() is not emitted.

Definition at line 247 of file gmxlookup.cpp.

## ◆ doneSignal()

G::Slot::Signal< GStore::MessageId, std::string, std::string > & GFilters::MxLookup::doneSignal | ( |  | ) |
| noexcept

Returns a reference to the completion signal.

The signal parameters are (1) the original message id, (2) the answer port-25 transport address (if successful), and (3) the error reason (if not).

Definition at line 304 of file gmxlookup.cpp.

## ◆ enabled()

bool GFilters::MxLookup::enabled | ( |  | ) |
| static

Returns true if implemented.

Definition at line 42 of file gmxlookup.cpp.

## ◆ start()

void GFilters::MxLookup::start | ( | const GStore::MessageId & | message_id,
|  | const std::string & | question_domain,
|  | unsigned int | port
| ) |  |

Starts the lookup.

Definition at line 89 of file gmxlookup.cpp.

The documentation for this class was generated from the following files:

- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/gfilters/gmxlookup.h
- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/gfilters/gmxlookup.cpp