0

If - for example - cron jobs output to stdout, which is the process collecting the output and writing to these directories ?

/var/spool/clientmqueue /var/spool/mqueue /var/spool/mail

Where can I find docs on the inner details (pipe, rpc, ...) of the "redirection" from stdout to mail files ?

If I send an email whith sendmail, does it do the same routing as above ? docs ?

1
  • If you run any mta process than it will write the mailboxes. Sep 16 '18 at 9:48
0

I rename the sendmail true executable

/usr/sbin/sendmail

and replaced it with this bash script :

#!/bin/bash

LOGFILE=/var/log/sendmail_calledby.log
date >> $LOGFILE
cat /proc/$PPID/cmdline | tr '\0' ' ' >> $LOGFILE
echo >> $LOGFILE
echo $* >> $LOGFILE

The first fish caught in the net is CROND

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.