Weblog Archive

Mailserver notes

Tue, 24 Jan 2006 at 16:32 • Chetan • Filed under Self, Server side

I was getting this error every time I tried adding a new user in Textpattern in a localhost / intranet installation:

Warning: mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:\Program Files\..\textpattern\lib\txplib_misc.php on line 793

The problem has been that a typical installation of XAMPP has way too many php.ini files. The right one to edit is the one under xampp/apache/bin . If you’re behind a proxy server, you’d want to set SMTP to the proxy address that most likely works as SMTP server (it did for me).

So, the edit would look like:

SMTP = your_proxy_server_ip;
smtp_port = 25;

Mail function is pretty important to add new users (Textpattern generates random password and sends email to the user) and also to reset the password. There is no way you can access those passwords, even if you dig under the MySQL table, because they’re encrypted. And you’re a sitting duck if the mail function does not work in Textpattern to be a truly collaborative effort.

On an unrelated topic, if you want to get Mercury mailserver running from behind the firewall, you’ve got to change a default:

In Mercury/32 console, go to Configuration > Protocol modules.. uncheck MercuryE SMTP end-to-end delivery client and then check MercuryC SMTP relaying client (screenshot 1), then restart Mercury mailserver (screenshot 2). This was enough for me to send email through the proxy.

Update: I forgot to mention that under MercuryC SMTP Relay Client Configuration, the smart host name should be the SMTP address keyed-in (again the proxy server in my case).

[ Ads ]

Related posts

Following list is auto-generated, based on this post's context as possibly related. You may, however, occasionally find some in this list unrelated, but nevertheless, we sincerely hope that you'll enjoy them too.

Respond privately

Comments are closed, but you may respond privately to “Mailserver notes.” (Your response will not be published.)