Debian Squeeze and exim4: cannot send mail

13,854

Solution 1

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

Solution 2

try to 'touch' that file thats missing.

mkdir -p /var/log/exim4

touch /var/log/exim4/mainlog

Share:
13,854
Fernando Campos
Author by

Fernando Campos

Updated on September 17, 2022

Comments

  • Fernando Campos
    Fernando Campos almost 2 years

    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" [email protected]

    Here is the response:

    root@server:/etc# echo "test message" | mail -s "test message" [email protected]
    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