Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

unable to send e-mails as www-data user with Docker-PHP 7 and Exim4

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
maciejsidor
Posts: 1
Joined: 2021-10-07 14:41

unable to send e-mails as www-data user with Docker-PHP 7 and Exim4

#1 Post by maciejsidor »

Hi there,

I'm struggling to configure my PHP application based on php:7.4.19-apache docker image to send e-mails. Everything works well when I execute the PHP script as root (or Debian-exim). However executing with www-data user fails. I've tried to execute directly the "sendmail" command exactly as it is configured in my PHP config file;

Code: Select all

/usr/sbin/sendmail -t -i test@test.com </dev/null
It works perfectly with root and Debian-exim users but with www-data user I've the following error message

Code: Select all

1mYU0T-0000km-J2 Failed setting ownership on spool file /var/spool/exim4//input//1mYU0T-0000km-J2-D: Operation not permitted
Here are the details of my exim install :

Code: Select all

ii  exim4-base                    4.92-8+deb10u6              amd64        support files for all Exim MTA (v4) packages
ii  exim4-config                  4.92-8+deb10u6              all          configuration for the Exim MTA (v4)
ii  exim4-daemon-light            4.92-8+deb10u6              amd64        lightweight Exim MTA (v4) daemon
...and current permisions on spool directory :

Code: Select all

7247151 drwxrwxrwx 1 Debian-exim Debian-exim 4096 Oct  7 14:39 .
7247148 drwxrwxrwx 1 Debian-exim Debian-exim 4096 Oct  7 13:33 ..
6451326 -rw-r----- 1 www-data    www-data       0 Oct  7 14:04 1mYU0T-0000km-J2-D
6451457 -rw-r----- 1 www-data    www-data       0 Oct  7 14:32 1mYURK-0000l9-BL-D
6451459 -rw-r----- 1 www-data    www-data       0 Oct  7 14:33 1mYUSr-0000lN-Lt-D
6451454 -rw-r----- 1 www-data    www-data       0 Oct  7 14:37 1mYUWc-0000tz-UA-D
Please help...

Post Reply