S
S
Sergey Pugovkin2016-09-21 13:42:31
PHP
Sergey Pugovkin, 2016-09-21 13:42:31

PHP, sendmail, exim, mailing to remote domains not supported, wtf?

I already wrote here - Mail is not sent (neither via php mail(), nor via swiftmail (yii2)). Why? - about problems with sending mail. Unexpectedly, this happened again with another host. Everywhere - VPS. I don't send spam.
Angry. Began to dig logs. The log that has at least something to do with mail is just this: /var/log/exim4/mainlog
Here is an excerpt from there:

2016-09-21 13:09:07 1bmeSh-0008Hs-DG <= [email protected] U=www-data P=local S=562
2016-09-21 13:09:07 1bmeSh-0008Hs-DG ** [email protected] R=nonlocal: Mailing to remote domains not supported
2016-09-21 13:09:07 1bmeSh-0008Hw-F0 <= <> R=1bmeSh-0008Hs-DG U=Debian-exim P=local S=1463
2016-09-21 13:09:07 1bmeSh-0008Hs-DG Completed
2016-09-21 13:09:07 1bmeSh-0008Hw-F0 => www-data <[email protected]> R=local_user T=mail_spool
2016-09-21 13:09:07 1bmeSh-0008Hw-F0 Completed
2016-09-21 13:15:23 Start queue run: pid=31908
2016-09-21 13:15:23 1bmUQw-0007gn-L9 Message is frozen
2016-09-21 13:15:23 End queue run: pid=31908

Googling led here: https://wiki.debian.org/PkgExim4UserFAQ#I_get_the_...
In connection with which many questions arose.
1. And what about exim4, if the php mail() function works through sendmail, and phpinfo() shows the actual path to sendmail?
2. Do I understand correctly that if you remove exim4, then the mail() function will stop working? Is there anything else that won't fall off? And what will become of sendmail?
3. Googling on the issue of "Mailing to remote domains not supported" led me to a bunch of rewritten articles of one:
you need to reconfigure exim, everything is simple there, but be careful - you will open a hole for spammers

What hole are you talking about? Damn, can this thing be configured so that it only sends mail only through my only php script? I need it for the feedback form on the site. That's it, I don't need anything more from the "mailer" on the server.
swiftmail that comes with yii2 by default doesn't work either. On that server, the matter was resolved by setting it up to work via Yandex smtp. But here it will be redundant, because. it turns out I need to connect to my mailbox and send a message to myself through it. Crazy, but possible. But I would like answers to these 3 questions.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question