To register a handler, the following command should be executed:
# mailmng --add-handler
--handler-name=<name>
--handler-type=[global|sender-domain|sender|recipient-domain|recipient]
--handler-type-name=<type-name>
--executable=<handler>
--context=<context>
--hook=[before-queue|before-local|before-remote]
--priority=<number>
The arguments are explained in the following table.
Argument |
Definition |
|---|---|
|
Specifies the handler name. The string is allowed to contain any character allowed in UNIX file name (that is, anything except slash and NUL). Registration will fail if a handler with the specified name has already been registered. |
|
Specifies the type of a handler, may take the following values:
|
|
Specifies domain or mail address for handler-type. Not required if handler type is |
|
Specifies the hook priority in queue of hooks. |
|
Specifies the handler executable file. Registration will fail if the file does not exist |
|
Specifies the context. This is an opaque string to be passed to the handler on the command line. |
|
Specifies the hooking point, should be one of: |
The following handler is added to filter correspondence before local delivery:
# mailmng --add-handler
--handler-name=1my_handler-ld
--handler-type=sender
--handler-type-name=myema@example.com
--executable=tmp/handler.sh
--context='context'
--hook=before-local
--priority=33