Provided by: kopano-dagent_8.7.0-7.2ubuntu2_amd64 bug

NAME

       kopano-dagent - Deliver mails to Kopano.

SYNOPSIS

       kopano-dagent [OPTION...] RECIPIENT...

DESCRIPTION

       With kopano-dagent, mail messages can be imported from Internet Mail format to Kopano. The
       message is read from standard input and delivered to the storage server in the mailbox of
       one or more RECIPIENTs. You can alter source and destination of this mail with various
       options.

       The RECIPIENT values are resolved by kopano-dagent prior to delivery, and therefore
       accepts any unique identifier for the recipient. In practice, it is most useful to pass
       the emailaddress of the user as the RECIPIENT parameter, since it is always unique. (Note
       that login names are sometimes not unique since group names may overlap).

       The delivery agent will accept and deliver the message piped through it or specified by -f
       and exit immediately.

       The delivery agent can also run as LMTP daemon.

OPTIONS

       Various options are possible. None of these options are required.

       --config, -c file
           Use a configuration file. See the CONFIG() section for more information.

           Default: /etc/kopano/dagent.cfg

       --deamonize, -d
           Daemonize after starting. This implies --listen and is only used when LMTP is active.

       --dump-config
           Displays the values of dagent.cfg configuration parameters and the implied defaults.

       --junk, -j
           Deliver in the Junk mail folder of the specified user.

       --file, -f file
           Read e-mail input from file. When not given, input is read from standard in.

       --host, -h path
           Connect to the storage server through path, e.g.  file:///path/to/socket. Default:
           file:///var/run/kopano/server.sock.

       --listen, -l
           Listen for incoming LMTP connections

       -q
           Use qmail style exit codes. Please see the EXITCODES() section for more information.

       -s
           Silent mode. No output will be printed by the DAgent, except when wrong parameters are
           used to call kopano-dagent.

       -v
           Verbose mode. More output can be printed when processing the e-mail for rules.

           When given a second time, more debugging output will be printed.

       -e
           Strip the domain from the given username. For example, when the DAgent is called with
           '-e' and the username is 'name@domain.com', the delivery will be started for user
           'name' instead of 'name@domain.com'.

       -R
           The passed recipient name will always be resolved first. This means that the recipient
           can be a username, e-mail address or any other resolvable, unique identifier for the
           user. However, if the resolve fails (e.g. when running as a non-trusted user), the
           passed name will be assumed to be a loginname of a user. Passing the -R option will
           disable this and will cause kopano-dagent to exit with an error when the resolve
           fails.

           In practice, the resolve will only fail if kopano-dagent is not running in a trusted
           account and is therefore only really here for backward-compatibility of earlier
           kopano-dagent versions.

       -n
           Use 'now' as the delivery time. Normally, the dagent will use the date from the first
           Received header, which is most likely to be the header from your own mailserver.

       --do-not-notify, -N
           Do not send a new mail notification to othere connected clients. This option can be
           useful when you have connected Outlook 2000 clients, which will also process rules
           when the mail is delivered. This is a bug workaround, and this option may disappear in
           the future.

       --folder, -F path\to\folder
           Deliver the incoming email to a specified subfolder of the store. Eg. --folder
           'Inbox\important'. Note that the 'Inbox' folder is language specific. If the folder
           does not exist, delivery is reverted to the normal Inbox of the user, or use the
           --create flag.

       --public, -P path\to\folder
           Deliver the incoming email to a specified subfolder of the public store. Eg. --public
           'sales\incoming'. If the folder does not exist, delivery is reverted to the normal
           Inbox of the user, or use the --create flag.

       -p <path separator>
           Use a different path separator. The default is '\'. If your delivery path contains a \
           character, you can use this to alter the separator. Eg. -p _ --folder
           'Inbox_resellers\dealers'. The mail will now be delivered in a folder called
           'resellers\dealers' as a subfolder of the Inbox.

       --create, -C
           Create the folder that was requested to deliver in. If there are no sufficient rights
           to create the folder, delivery is reverted to the normal Inbox of the user.

       --read, -r
           Deliver the mail as read. Normally, the message will be marked as unread. This option
           can be useful when importing old mail.

       -a autoresponder
           Path to autoresponder, e.g.  /usr/local/sbin/kopano-autorespond. This script will be
           called when the user enabled a vacation message in the Webaccess settings. When a
           header X-Kopano-Vacation or Precedence was found in the received e-mail, this program
           will not be called to avoid loops. The Precedence header is often used in mailing
           lists. Other loop protections can be archieved in this separate program. This program
           or script will be called with the following arguments, in order:

           from
               The e-mail address of the Kopano user sending the vacation message

           to
               The e-mail address of the user to send the response to

           subject
               The auto response subject set by the Kopano user

           kopano-username
               The username of the Kopano user which set the auto response

           messagefile
               A file where the auto respond message will be temporary written to during the
               autorespond

           The following environment variables are present:

           MESSAGE_TO_ME
               Set to 1 if the original mail had the user in the To header.

           MESSAGE_CC_ME
               Set to 1 if the original mail had the user in the Cc header.

           MAILHEADERS
               Optional, if this value is present it points to a file that contains the original
               headers of the received email.

           Default: /usr/sbin/kopano-autorespond.

USAGE

       To deliver an e-mail to a Kopano user's mailbox:

       kopano-dagent username < mailfile

       This passes the input to the dagent via the standard input interface.

CONFIG

       Normally, no configuration file is used or required. The following options can be set in
       the configuration file:

       server_socket
           Unix socket to find the connection to the Kopano server.

           Default: file:///var/run/kopano/server.sock

       sslkey_file
           Use this file as key to logon to the server. This is only used when server_socket is
           set to an HTTPS transport. See the kopano-server(8) manual page on how to setup SSL
           keys.

           Default: value not set.

       sslkey_pass
           The password of the SSL key file that is set in sslkey_file.

           Default: value not set.

EXITCODES

       The following exitcodes can be returned:

       0
           Delivery was successful

       64
           Wrong or not enough parameters were passed to the DAgent. Delivery cannot be started.

       70, 100
           Delivery was failed, and cannot be delivered. The SMTP server should not try again.
           When the -q option is used, this value is changed to 100, otherwise 70 is returned.

       75, 111
           Delivery was temporarily failed. This happens when the storage server is unavailable.
           The SMTP server may try again in a short while. When the -q option is used, this value
           is changed to 111, otherwise 75 is returned.

AUTHOR

       Written by Kopano.

SEE ALSO

       kopano-server(8), kopano-dagent.cfg(5)