Wrapper to sign and encrypt cron(8) output and errors with PGP/MIME before sending them to the MAILTO destination.

$ crontab -l

0 1 * * *  croncrypt rsync /home/tom/important-file /home/backups

The main design goal is simplicity; just whack croncrypt in front of all your crontab(5) entries, provided they don’t use pipes or stderr/stdout redirects, in which case you should consider putting it all into a script file anyway.

Don’t use your own GPG key for signing! I recommend you create a dedicated key just for Croncrypt, and sign it locally with gpg --lsign so that your software trusts it locally.


Put the croncrypt binary somewhere in your crontab’s PATH, and install the following Perl modules:

  • Carp
  • IPC::Run3
  • Mail::GnuPG
  • MIME::Entity

On Debian-derived systems, this should do the trick:

# aptitude install perl-base perl-modules libmail-gnupg-perl \
    libmime-tools-perl libipc-run3-perl


Copyright (c) Tom Ryder. Distributed under Artistic License 2.0.