Allow outbound mail delivery from localhost

sych

Verified User
Joined
Jul 6, 2008
Messages
14
Hi,
OS is CentOS 6, just installed DirectAdminl, and when I try to send an e-mail to an external domain (not served by this installation), I get "550 authentication required".

What I need, is to give my users an option to send e-mail by connecting from PHP scripts to localhost, and send outbound e-mail without SMTP authentication.

I have already tried adding accept domains = /etc/virtual/relay_ips etc., but it did not help.

Thank you for help.
 
What I need, is to give my users an option to send e-mail by connecting from PHP scripts to localhost, and send outbound e-mail without SMTP authentication.

That's very insecure, but if you really need it, then rdit the file

/etc/exim.conf


Find the code:

Code:
hostlist relay_hosts = net-lsearch;/etc/virtual/pophosts


and change it to be:

Code:
hostlist relay_hosts = net-lsearch;/etc/virtual/pophosts : 127.0.0.1

New installations do not have 127.0.0.1 there.
 
Thank you zEitEr, I tried that, but that does not seem to change anything.

Maybe you know a way to run some diagnostics and check if the option is effective at all?
 
And how do your PHP scripts try to send emails with PHP mail() or use sockets to connect to 127.0.0.1 :25? If the second try to use port 587.
 
Yes, scripts connect to sockets, localhost:25. I tried 587, but the result was the same.

In the end what solved the problem was: changed script to connect to from localhost to 127.0.0.1 and it worked. This is weird... Any idea why this happens?
 
Back
Top