# phpman > man > ftpmail(1)

[ftpmail(1)](https://www.chedong.com/phpMan.php/man/ftpmail/1/markdown)                             General Commands Manual                            [ftpmail(1)](https://www.chedong.com/phpMan.php/man/ftpmail/1/markdown)



## NAME
       ftpmail - FIFO-based Perl script for sending email based on proftpd TransferLog

## SYNOPSIS
       **ftpmail**  [  **--help**  ]  [ **--fifo** _fifo-path_ ] [ **--from** _email-address_ ] [ **--log** _xferlog-file_ ] [
       **--recipient** _email-address_ ] [ **--subject** _email-subject_ ] [ **--smtp-server**  _server-address_  ]  [
       **--attach-file**  ]  [  **--auth** _smtp-auth-info-file_ ] [ **--ignore-users** _regex-pattern_ ] [ **--watch-**
       **users** _regex-pattern_ ]

## DESCRIPTION
       **ftpmail** is a Perl script designed to read ProFTPD's _TransferLog_ log entries, watching for up‐
       loads,  and to send an automatic email notification when uploads occur.  To use **ftpmail** , you
       configure your **proftpd** daemon to write its _TransferLog_ to a FIFO; the **ftpmail**  program  is  a
       FIFO reading program which then processes those log messages.

## OPTIONS
       **--help**      Display a short usage description, including all available options.

### --attach-file
                   If  used,  this  will cause a copy of the uploaded file to be included, as an at‐
                   tachment, in the generated email.

       **--auth** _smtp-auth-info-file_
                   Configures the path to a file containing SMTP  authentication  information.   The
                   configured file should look like this:
                          **user**      username
                          **password**  password

       **--fifo** _fifo-path_
                   Indicates the path to the FIFO to which **proftpd** is writing its **TransferLog**.  That
                   is, this is the path  that  you  used  for  the  **TransferLog**  directive  in  your
                   _proftpd.conf_.  This parameter is **REQUIRED.**

       **--from** _email-address_
                   Specifies  the  email address to use in the _From_ email header.  This parameter is
                   **REQUIRED.**

       **--ignore-users** _regex-pattern_
                   Specifies a Perl regular expression.  If the uploading  user  name  matches  this
                   regular  expression,  then an email notification is **NOT** sent; otherwise, an email
                   is sent.

       **--log** _xferlog-path_
                   Since this script reads the **TransferLog** using FIFOs, the actual **TransferLog**  file
                   is not written by default.  Use this option to write the normal **TransferLog** file,
                   in addition to watching for uploads.

       **--recipient** _email-address_
                   Specifies an email address to which to send an email notification of the  upload.
                   This  option can be used multiple times to specify multiple recipients.  **AT** **LEAST**
                   **ONE** recipient is **REQUIRED.**

       **--smtp-server** _server-address_
                   Specifies the SMTP server to which to send the  email.   This  parameter  is  **RE**‐‐
                   **QUIRED.**

       **--subject** _subject_
                   Specify  a  custom  _Subject_ email header for the email sent.  The default _Subject_
                   is:
                          User '_$user_' uploaded file '_$file_' via FTP

       **--watch-users** _regex-pattern_
                   Specifies a Perl regular expression.  If the uploading  user  name  matches  this
                   regular  expression,  then  an email notification is sent; otherwise, no email is
                   sent.

## FILES
### /var/log/xferlog

## AUTHORS
       ProFTPD is written and maintained by a number  of  people,  full  credits  can  be  found  on
### <http://www.proftpd.org/credits.html>

## SEE ALSO
### [proftpd(8)](https://www.chedong.com/phpMan.php/man/proftpd/8/markdown), [xferlog(5)](https://www.chedong.com/phpMan.php/man/xferlog/5/markdown)

       Full   documentation   on   ProFTPD,  including  configuration  and  FAQs,  is  available  at
### <http://www.proftpd.org/>

       For     help/support,     try     the     ProFTPD     mailing     lists,     detailed      on
### <http://www.proftpd.org/lists.html>

       Report bugs at **<http://bugs.proftpd.org/>**



                                             March 2011                                   [ftpmail(1)](https://www.chedong.com/phpMan.php/man/ftpmail/1/markdown)
