Topic: Problem sending mails with PHP
Hi,
I have a strange problem at the moment, and don't know where to look.
Got a PHP script on one of my sites, which should send an email.
PHP is running as www-data, a local system user.
However, when PHP tries to send the email, I get this:
Mar 28 17:57:28 mail postfix/smtpd[3175]: connect from derchris.eu[94.23.1.26]
Mar 28 17:57:28 mail postfix/smtpd[3175]: NOQUEUE: reject: RCPT from derchris.eu[94.23.1.26] 550 5.1.0 <www-data@derchris.eu>: Sender address rejected: User unknown in virtual mailbox table; from=<www-data@derchris.eu> to=<frontpage@myserverstats.eu> proto=ESMTP helo=<derchris.eu>
Mar 28 17:57:28 mail postfix/smtpd[3175]: disconnect from derchris.eu[94.23.1.26]
So I created the www-data Mailbox, when I now get this error:
Mar 28 17:52:58 mail postfix/smtpd[3100]: connect from derchris.eu[94.23.1.26]
Mar 28 17:52:58 mail postfix/smtpd[3100]: NOQUEUE: reject: RCPT from derchris.eu[94.23.1.26] 553 5.7.1 <www-data@derchris.eu>: Sender address rejected: not logged in; from=<www-data@derchris.eu> to=<frontpage@myserverstats.eu> proto=ESMTP helo=<derchris.eu>
Mar 28 17:52:58 mail postfix/smtpd[3100]: disconnect from derchris.eu[94.23.1.26]
What is funny is, when I login to Roundcube, and send a mail from there, it is working fine.
Now, I don't really want to have a Mailbox for the www-data user.
Anyone knows how I could get this to work, so that local users, like www-data, can send mails?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.