ftpmail(1)

πŸ’Œ ftpmail(1) β€” the FIFO-based Perl script that emails you when somebody uploads stuff via proftpd's TransferLog

okay bestie, welcome to the General Commands Manual corner of the internet, this is ftpmail, section 1, and she is a whole vibe πŸŽ€


✨ NAME ✨

ftpmail β€” a 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 πŸ¦‹

so ftpmail is a Perl script whose whole entire job is reading ProFTPD's TransferLog log entries, keeping an eye out for uploads πŸ‘€, and then sending an automatic email notification the second an upload happens. it's giving personal assistant energy, fr fr.

to actually use ftpmail, you set up your proftpd daemon so it writes its TransferLog to a FIFO 🫢. then ftpmail is the FIFO-reading program that sits there and processes all those log messages for you. iconic behavior honestly.


πŸ’… OPTIONS πŸ’…

  • --help β€” shows a short usage description, and yes it lists all the available options too. cute and helpful.
  • --attach-file β€” if you use this, a copy of the uploaded file gets included in the generated email as an attachment πŸ“Ž. surprise! it's the file.
  • --auth smtp-auth-info-file β€” sets the path to a file that holds your SMTP authentication info. the configured file should look exactly like this:
user      username
password  password
  • --fifo fifo-path β€” tells it the path to the FIFO that proftpd is writing its TransferLog to. like, this is the path you used for the TransferLog directive in your proftpd.conf. this parameter is REQUIRED πŸ’€ do not skip her.
  • --from email-address β€” says which email address goes in the From email header. this parameter is REQUIRED πŸ”₯
  • --ignore-users regex-pattern β€” takes a Perl regular expression. if the uploading user name matches this regex, then an email notification is NOT sent πŸ™ˆ. otherwise, an email is sent.
  • --log xferlog-path β€” okay so because this script reads the TransferLog using FIFOs, the actual TransferLog file is not written by default. use this option if you want to write the normal TransferLog file in addition to watching for uploads. two things at once, multitasking queen πŸ‘‘
  • --recipient email-address β€” specifies an email address to send the upload notification to. you can use this option multiple times to specify multiple recipients πŸ’–. AT LEAST ONE recipient is REQUIRED.
  • --smtp-server server-address β€” specifies the SMTP server to send the email to. this parameter is REQUIRED ⭐
  • --subject subject β€” set a custom Subject email header for the email that gets sent. the default Subject is:
User '$user' uploaded file '$file' via FTP
  • --watch-users regex-pattern β€” takes a Perl regular expression. if the uploading user name matches this regex, then an email notification is sent 🌈. otherwise, no email goes out. (yes, she's the mirror-image twin of --ignore-users, iykyk.)

πŸŽ€ 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 πŸ”₯

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/


bestie, that's the whole page πŸ’œ go forth and get your upload notifications, no cap.

this little gem is from March 2011, and it's part of the ProFTPD family β€” so go say hi to the proftpd crew, they made this whole thing happen. mwah, bye 🫢✨

πŸ“¦ where this page comes from