5 Commits

Author SHA1 Message Date
Alberto Bertogli
9999a69086 aliases: Implement "via" aliases
This patch implements "via" aliases, which let us explicitly select a
server to use for delivery.

This feature is useful in different scenarios, such as a secondary MX
server that forwards all incoming email to a primary.

For now, it is experimental and the syntax and semantics are subject to
change.
2025-04-12 23:23:21 +01:00
Alberto Bertogli
0bf5d9b242 Distinguish between permanent and transient errors
This patch makes the queue and couriers distinguish between permanent and
transient errors when delivering mail to individual recipients.

Pipe delivery errors are always permanent.

Procmail delivery errors are almost always permanent, except if the command
exited with code 75, which is an indication of transient.

SMTP delivery errors are almost always transient, except if the DNS resolution
for the domain failed.
2016-10-10 00:51:04 +01:00
Alberto Bertogli
9d172a6ea0 Make the queue aware of local and remote couriers
The routing courier is a nice idea in theory, but at least for now, we want
the queue to be aware of when a destination is local so we can implement
differentiated logic.

This may change in the future, though, but at the moment it's not clear that
the abstractions will be worth it.

So this patch removes it, and makes the queue do the routing. There is no
difference in how the two are handled yet, those will come in subsequent
patches.
2016-07-22 01:44:45 +01:00
Alberto Bertogli
362ef6f6d0 Introduce an "envelope" package
This patch introduces an "envelope" package which, for now, provides simple
utilities for getting the user and domain of an address.

It also changes the couriers to use it (but other implementations remain, will
be moved over in subsequent patches).
2016-07-22 01:44:45 +01:00
Alberto Bertogli
77d547288f Implement couriers
This patch introduces the couriers, which the queue uses to deliver mail.

We have a local courier (using procmail), a remote courier (uses SMTP), and a
router courier that decides which of the two to use based on a list of local
domains.

There are still a few things pending, but they all have their basic
functionality working and tested.
2015-11-13 03:41:06 +00:00