This may be slightly off topic - so I apologise in advance if that is the
case.
I have an alias eximlogs@??? which points to three of our admins,
I've written a simple script which runs the daily logs through exim stats,
rotates the logs and emails the lot to eximlogs@???. The script
is:
/usr/local/exim/bin/eximstats /usr/local/exim/log/exim_mainlog
>/tmp/mail_stats.txt
/bin/mail -s "Bravo Mail Statistics" eximlogs@???
</tmp/mail_stats.txt
rm /tmp/mail_stats.txt
/usr/sbin/logrotate /etc/logrotate.conf
That is set to run by cron daily.
If I send email to eximlogs@??? through any mail server it gets
through, but when it's sent by cron (root) as the local machine I get:
eximlogs@???... User unknown
/root/dead.letter... Saved message in /root/dead.letter
"User unknown" - what a blatant lie! The output from exim -bt -d9 is:
> eximlogs@???
tonymail@???
<-- tonyalias@???
<-- tony@???
<-- eximlogs@???
deliver to tonymail in domain bravo.whitburn.xcalibre.co.uk
director = localuser, transport = local_delivery
pammail@???
<-- pamalias@???
<-- pam@???
<-- eximlogs@???
deliver to pammail in domain bravo.whitburn.xcalibre.co.uk
director = localuser, transport = local_delivery
tony@???
<-- tony@???
<-- tonyalias@???
<-- tony@???
<-- eximlogs@???
deliver to tony@???
router = lookuphost, transport = remote_smtp
host exchange.xcalibre.co.uk [194.201.48.27]
pam@???
<-- pam@???
<-- pamalias@???
<-- pam@???
<-- eximlogs@???
deliver to pam@???
router = lookuphost, transport = remote_smtp
host exchange.xcalibre.co.uk [194.201.48.27]
pam@???
<-- pam@???
<-- pamalias@???
<-- pam@???
<-- eximlogs@???
deliver to pam@???
router = lookuphost, transport = remote_smtp
host exchange.xcalibre.co.uk [194.201.48.27]
o.cook@???
<-- eximlogs@???
deliver to o.cook@???
router = lookuphost, transport = remote_smtp
host mail0.etoncollege.org.uk [195.195.166.9] MX=10
host mail1.etoncollege.org.uk [195.195.167.130] MX=25
host mh1.rhbnc.ac.uk [134.219.102.162] MX=40
o.cook@???
<-- eximlogs@???
deliver to o.cook@???
router = lookuphost, transport = remote_smtp
host mail0.etoncollege.org.uk [195.195.166.9] MX=10
host mail1.etoncollege.org.uk [195.195.167.130] MX=25
host mh1.rhbnc.ac.uk [134.219.102.162] MX=40
Does anyone have any ideas why this should be the case, or what I can do to
remedy it? If you need any further information, please ask!
Ollie