Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Got this error after install and config of exim4-daemon-light and mailutils packages on Debian Squeeze. This package is aimed to send automatic messages from websites, like email confirmation and stuff.

Configuration after package install:

dpkg-reconfigure exim4-config

You'll be presented with a welcome screen, followed by a screen asking what type mail delivery you'd like to support. Choose the option for "internet site" and select "Ok" to continue.

After many configuration sceens you can test mail with:

echo "test message" | mail -s "test message" user@domain.com

Here is the response:

root@server:/etc# echo "test message" | mail -s "test message" user@domain.com
2011-03-02 20:34:59 1PuxRT-0001Aj-T9 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=101 egid=103
2011-03-02 20:34:59 1PuxRT-0001Aj-T9 <= root@debian U=root P=local S=331
2011-03-02 20:34:59 1PuxRT-0001Aj-T9 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=101 egid=103 exim: could not open panic log - aborting: see message(s) above Can't send mail: sendmail process failed with error code 1

There is no /var/log/exim4 directory on my server. I tried to create it, but it didn't work.

Please, can someone help me?

Best regards, Fernando

share|improve this question

4 Answers 4

up vote 2 down vote accepted

Make sure that /var/log/exim4 is owned an writable by Debian-exim:

chmod -R u+rw /var/log/exim4
chown -R Debian-exim /var/log/exim4
share|improve this answer

This appears to be an issue with the linode base deployment images:


which they indicate they have now fixed (and which Fernando has probably seen by now, as the previous forum poster.)

share|improve this answer

And don't forget to

sudo chown -R Debian-exim:adm /var/log/exim4
share|improve this answer

try to 'touch' that file thats missing.

mkdir -p /var/log/exim4

touch /var/log/exim4/mainlog

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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