| 1 |
.TH ftpmail 1 "March 2011" |
| 2 |
.\" Process with |
| 3 |
.\" groff -man -Tascii ftpmail.1 |
| 4 |
.\" |
| 5 |
.SH NAME |
| 6 |
ftpmail \- FIFO-based Perl script for sending email based on proftpd TransferLog |
| 7 |
.SH SYNOPSIS |
| 8 |
.B ftpmail |
| 9 |
[ |
| 10 |
.B \--help |
| 11 |
] [ |
| 12 |
.B \--fifo |
| 13 |
.I "fifo-path" |
| 14 |
] [ |
| 15 |
.B \--from |
| 16 |
.I "email-address" |
| 17 |
] [ |
| 18 |
.B \--log |
| 19 |
.I "xferlog-file" |
| 20 |
] [ |
| 21 |
.B \--recipient |
| 22 |
.I "email-address" |
| 23 |
] [ |
| 24 |
.B \--subject |
| 25 |
.I "email-subject" |
| 26 |
] [ |
| 27 |
.B \--smtp-server |
| 28 |
.I "server-address" |
| 29 |
] [ |
| 30 |
.B \--attach-file |
| 31 |
] [ |
| 32 |
.B \--auth |
| 33 |
.I "smtp-auth-info-file" |
| 34 |
] [ |
| 35 |
.B \--ignore-users |
| 36 |
.I "regex-pattern" |
| 37 |
] [ |
| 38 |
.B \--watch-users |
| 39 |
.I "regex-pattern" |
| 40 |
] |
| 41 |
.SH DESCRIPTION |
| 42 |
.B ftpmail |
| 43 |
is a Perl script designed to read ProFTPD's \fITransferLog\fP log entries, |
| 44 |
watching for uploads, and to send an automatic email notification when uploads |
| 45 |
occur. To use |
| 46 |
.B ftpmail |
| 47 |
, you configure your |
| 48 |
.B proftpd |
| 49 |
daemon to write its \fITransferLog\fP to a FIFO; the |
| 50 |
.B ftpmail |
| 51 |
program is a FIFO reading program which then processes those log messages. |
| 52 |
.SH OPTIONS |
| 53 |
.TP 12 |
| 54 |
.B \--help |
| 55 |
Display a short usage description, including all available options. |
| 56 |
.TP |
| 57 |
.B \--attach-file |
| 58 |
If used, this will cause a copy of the uploaded file to be included, as an |
| 59 |
attachment, in the generated email. |
| 60 |
.TP |
| 61 |
.BI \--auth " smtp-auth-info-file" |
| 62 |
Configures the path to a file containing SMTP authentication information. |
| 63 |
The configured file should look like this: |
| 64 |
.RS |
| 65 |
.RS |
| 66 |
.PD 0 |
| 67 |
.TP 10 |
| 68 |
.B user |
| 69 |
username |
| 70 |
.TP |
| 71 |
.B password |
| 72 |
password |
| 73 |
.PD |
| 74 |
.RE |
| 75 |
.RE |
| 76 |
.TP |
| 77 |
.BI \--fifo " fifo-path" |
| 78 |
Indicates the path to the FIFO to which |
| 79 |
.B proftpd |
| 80 |
is writing its \fBTransferLog\fP. That is, this is the path that you used for |
| 81 |
the \fBTransferLog\fP directive in your \fIproftpd.conf\fP. This parameter is |
| 82 |
.B REQUIRED. |
| 83 |
.TP |
| 84 |
.BI \--from " email-address" |
| 85 |
Specifies the email address to use in the |
| 86 |
.I From |
| 87 |
email header. This parameter is |
| 88 |
.B REQUIRED. |
| 89 |
.TP |
| 90 |
.BI \--ignore-users " regex-pattern" |
| 91 |
Specifies a Perl regular expression. If the uploading user name matches this |
| 92 |
regular expression, then an email notification is \fBNOT\fP sent; otherwise, |
| 93 |
an email is sent. |
| 94 |
.TP |
| 95 |
.BI \--log " xferlog-path" |
| 96 |
Since this script reads the \fBTransferLog\fP using FIFOs, the actual |
| 97 |
\fBTransferLog\fP file is not written by default. Use this option to write the |
| 98 |
normal \fBTransferLog\fP file, in addition to watching for uploads. |
| 99 |
.TP |
| 100 |
.BI \--recipient " email-address" |
| 101 |
Specifies an email address to which to send an email notification of the upload. |
| 102 |
This option can be used multiple times to specify multiple recipients. |
| 103 |
.B AT LEAST ONE |
| 104 |
recipient is |
| 105 |
.B REQUIRED. |
| 106 |
.TP |
| 107 |
.BI \--smtp-server " server-address" |
| 108 |
Specifies the SMTP server to which to send the email. This parameter is |
| 109 |
.B REQUIRED. |
| 110 |
.TP |
| 111 |
.BI \--subject " subject" |
| 112 |
Specify a custom \fISubject\fP email header for the email sent. The default |
| 113 |
\fISubject\fP is: |
| 114 |
.RS |
| 115 |
.RS |
| 116 |
.PD 0 |
| 117 |
.TP 10 |
| 118 |
User '\fI$user\fP' uploaded file '\fI$file\fP' via FTP |
| 119 |
.PD |
| 120 |
.RE |
| 121 |
.RE |
| 122 |
.TP |
| 123 |
.BI \--watch-users " regex-pattern" |
| 124 |
Specifies a Perl regular expression. If the uploading user name matches this |
| 125 |
regular expression, then an email notification is sent; otherwise, no email is |
| 126 |
sent. |
| 127 |
.SH FILES |
| 128 |
.PD 0 |
| 129 |
.B /var/log/xferlog |
| 130 |
.PD |
| 131 |
.SH AUTHORS |
| 132 |
.PP |
| 133 |
ProFTPD is written and maintained by a number of people, full credits |
| 134 |
can be found on |
| 135 |
.BR http://www.proftpd.org/credits.html |
| 136 |
.PD |
| 137 |
.SH SEE ALSO |
| 138 |
.BR proftpd(8), |
| 139 |
.BR xferlog(5) |
| 140 |
.PP |
| 141 |
Full documentation on ProFTPD, including configuration and FAQs, is available at |
| 142 |
.BR http://www.proftpd.org/ |
| 143 |
.PP |
| 144 |
For help/support, try the ProFTPD mailing lists, detailed on |
| 145 |
.BR http://www.proftpd.org/lists.html |
| 146 |
.PP |
| 147 |
Report bugs at |
| 148 |
.BR http://bugs.proftpd.org/ |