On Fri, Mar 13, 2015 at 05:30:27PM +0100, Kurt Roeckx wrote: > I've been looking for documentation about what the various > services in master.cf do. I can't seem to find any documentation > for that. I can guess what a few of those do because the command > they run is documented. But it's not always clear what it means > exactly.
There are lots of internal services that you simply need to run: qmgr unix n - n 300 1 qmgr rewrite unix - - n - - trivial-rewrite pickup unix n - n 60 1 pickup cleanup unix n - n - 0 cleanup bounce unix - - n - 0 bounce defer unix - - n - 0 bounce trace unix - - n - 0 bounce verify unix - - n - 1 verify flush unix n - n 1000? 0 flush showq unix n - n - - showq anvil unix - - n - 1 anvil scache unix - - n - 1 scache proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap # Required for TLS support tlsmgr unix - - n 1000? 1 tlsmgr Without the above various core features don't work. Then there the delivery agents that implement Postfix transports: local unix - n n - - local virtual unix - n n - - virtual smtp unix - - n - - smtp relay unix - - n - - smtp lmtp unix - - n - - lmtp error unix - - n - - error retry unix - - n - - error discard unix - - n - - discard You can create as many clones of these as you like, and/or disable those you don't need. Then there are the built-in inet services, smtpd(8), postscreen(8) or qmqpd(8). These can be cloned to create custom TCP service endpoints. Most common: smtp inet n - n - - smtpd You can build new transports with the pipe(8) delivery agent. And spawn(8) can be used to run ad-hoc programs in response to incoming connections. > From examples I've seen, it seems you can create your own > services, but it's unclear to me how those get "created", and when > they get used. You can create your transports, including pipe(8) transports. You can create custom cleanup services. You can create clones of SMTP inet listeners. You can spawn(8) third-party SMTP proxies or policy services. Transports get used when you route email to them via the transport table or equivalent. Inet services get used when someone connects to them from outside. Custom cleanup services get used by an smtpd(8) or other service that injects mail into the queue and is configured with a "-o cleanup_service_name" override. -- Viktor.