1
0
Fork
You've already forked postfix-socketmap-table
0
Package socketmap implements Postfix' socketmap_table lookup protocol
  • Go 100%
2022年08月12日 13:36:18 +02:00
examples/static_lookup Add static_lookup example 2022年08月11日 20:51:34 +02:00
.gitignore gitignore editor files 2022年08月11日 17:04:00 +02:00
data.go Add elaborate package documentation 2022年08月11日 20:54:58 +02:00
data_test.go Add tests for data structures 2022年08月11日 18:05:49 +02:00
go.mod Implement server tests and fix server initialisation 2022年08月11日 19:19:06 +02:00
go.sum Implement server tests and fix server initialisation 2022年08月11日 19:19:06 +02:00
LICENSE Define interface of socketmap library 2022年08月11日 12:59:47 +02:00
README.md Give credits to sendmail 2022年08月12日 13:36:18 +02:00
server.go Give credits to sendmail 2022年08月12日 13:36:18 +02:00
server_test.go Implement server tests and fix server initialisation 2022年08月11日 19:19:06 +02:00

Go implementation for Postfix' socketmap_table lookup protocol

Go Reference

Package socketmap implements Postfix' socketmap_table lookup protocol.

Background

The Postfix mail server uses lookup tables in various places, when it needs to translate some value into another. The most common use case is alias expansion for mail addresses.

While most tasks can be achieved using Postfix' built-in tables and flat files, sometimes, a more dynamic approach is needed. Therefore, Postfix can query external services using the socketmap_table protocol.

The protocol originates from sendmail, which should also be able to use services implemented using this library.

Implementing a lookup server

To implement a socketmap_table lookup server, only two things are needed:

  1. A lookup function which implements the lookup itself and returns a response
  2. A network listener to listen for Postfix' connections on

The source code repository has examples.

A single server can handle many different named maps, by registering different lookup functions.

Origin and maintenance

This package was written for the Bergblau component WebMilterd, which, among otehr functionality, resolves aliases by querying a REST API.

It is maintained by velocitux, which also offers commercial support for this lookup mechanism and for Postfix in general.

Special thanks to Claus Assmann for his proposal to use the socketmap_table.