Integration with mail service is performed via mail handlers.
Handler is an executable file which is invoked at selected points (called hooking points).
Mail handlers are used to handle incoming, outgoing, and pass-through mail at various stages of processing by the Mail Transfer Agent (MTA). One or more handlers can be applied to a message.
Note: Every handler you use should be registered with the
mail_handlers_control utility. For details, refer to the
Managing Handlers section.