ftpmail1
Fifo-based perl script for sending email based on proftpd transferlog
Usage
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]
Overview
ftpmail is a Perl script designed to read ProFTPD's TransferLog log entries, watching for uploads, 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 attachment, in the generated email.
--authsmtp-auth-info-file-
Configures the path to a file containing SMTP authentication information. The configured file should look like this:
user-
username
password-
password
--fifofifo-path-
Indicates the path to the FIFO to which
proftpdis writing itsTransferLog. That is, this is the path that you used for theTransferLogdirective in your proftpd.conf. This parameter is REQUIRED.
--fromemail-address-
Specifies the email address to use in the From email header. This parameter is REQUIRED.
--ignore-usersregex-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.
--logxferlog-path-
Since this script reads the
TransferLogusing FIFOs, the actualTransferLogfile is not written by default. Use this option to write the normalTransferLogfile, in addition to watching for uploads.
--recipientemail-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-serverserver-address-
Specifies the SMTP server to which to send the email. This parameter is REQUIRED.
--subjectsubject-
Specify a custom Subject email header for the email sent. The default Subject is:
- User '$user' uploaded file '$file' via FTP
--watch-usersregex-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
Releases
Unchanged in 7 releases since Debian 7 (Wheezy).