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, 2018 at 9:48

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .