The drweb-inject utility allows delivery of local mail via Sender. The utility receives a message body from standard input and returns 0 for success and not 0, if an error occurs. The sent email message can be piped to the utility via | conveyor (for example, as a cat command result ) or redirected to the standard output via <.
The following command line parameters are available:
Short case
|
Extended case
|
Arguments
|
|
--help
|
|
Description: Output short help information on the command line parameters to the console and exit
|
|
|
--version
|
|
Description: Outputs information on the utility version and exit
|
|
|
--agent
|
<file path>
|
Description: Set the path to the socket of Dr.Web Agent component to receive configuration (by default, if the parameter is not specified, the %var_dir%/ipc/.agent path is used). If the switch is specified without a path, configuration from Dr.Web Agent is not requested.
|
|
|
--timeout
|
<time period>
|
Description: Set the maximum allowed time to wait for response from Dr.Web Agent when requesting configuration.
|
|
|
--id
|
<identifier>
|
Description: Set the unique identifier of Sender used for mail dispatch. If not specified, the default Sender is used.
|
|
-f
|
--env-from
|
<address>
|
Description: Set the message sender (for the message envelope). If not specified, the parameter value is the name of the user under whose account the utility is launched. If the username is not found, the utility exits with a non-zero error code.
|
|
-F
|
--from
|
<address>
|
Description: Specify the From field value if the despatched email message does not have that field.
|
|
-i
|
--ignore-dot
|
|
Description: Instruct not to treat a string with the only dot character (".") as a terminating symbol of message entry.
|
|
-t
|
--extract-recipients
|
|
Description: Instruct to add all message recipients from the To field to the recipients in the email envelope.
|
Example of mail dispatch with the use of the drweb-inject utility:
cat /var/drweb/msgs/out/failed/00000A59tNvGZ8 | drweb-inject -f sender@domain rcpt@domain
This command instructs to send a message, saved to the 00000A59tNvGZ8 file and located in the msgs/out/failed directory. This directory stores all messages that failed to be sent including deferred ones. As an -f parameter value, the sender is specified and then - the recipient.
Note that when a message is sent from the database, Dr.Web MailD uses message files instead of envelope files (the latter have the same ID, but the extension is .envelope)!
To extract the list of recipients from the message, the -t parameter is used (in this case, specify only the message sender):
cat absGRjJ0to1Ubye | drweb-inject -t -f sender@domain
|