View Full Version : Can't get dedicated mail server to work with vB
deltahawk5
03-08-2013, 08:41 PM
Hi,
I've setup my dedicated ubuntu server with Postfix, I've gotten it to the point where SMTP-AUTH, SASL and TLS are working and I can send emails externally (Gmail, etc, etc) via SSH.
However, I cannot get my vBulletin forum to work together with it.
No matter what I've tried, I always end up with this error.
Warning: fsockopen() [function.fsockopen]: unable to connect to tcp://199.188.72.9:25 (Connection refused) in [path]/includes/class_mail.php on line 747
Warning: Unable to connect to SMTP server in [path]/includes/class_mail.php on line 713
I'm hoping maybe someone here has tried doing something similar and knows a way to get this working.
Before anyone ask, I know 100% that my email settings in vBulletin are correct.
and please, if they only thing you have to say is "hur dur, this isn't a vBulletin issue", please don't say anything at all.
I've been trying to get this to work for almost three days now, no luck.
This probably won't help a lot, but I think that error means that the server isn't listening on that port, or else possibly a firewall is blocking it. Are you sure you've got it listening on port 25?
deltahawk5
03-08-2013, 09:16 PM
This probably won't help a lot, but I think that error means that the server isn't listening on that port, or else possibly a firewall is blocking it. Are you sure you've got it listening on port 25?
Apparently Ubuntu is listening on port 25, but Postfix isn't. :\
root@dc02r01ds24:~# netstat -anltp | grep "LISTEN"
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 439/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 659/sendmail: MTA:
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 659/sendmail: MTA:
tcp6 0 0 :::22 :::* LISTEN 439/sshd
tcp6 0 0 :::80 :::* LISTEN 692/apache2
nhawk
03-08-2013, 09:33 PM
From SSH enter this...
telnet localhost 25
After you have a connection, enter this...
ehlo localhost
To exit the connect type quit.
What is the full output you get from those commands?
EDIT: Also, I see from your output that sendmail is running. Sendmail should have been uninstalled or prevented from starting before installing Postfix.
deltahawk5
03-08-2013, 09:40 PM
From SSH enter this...
telnet localhost 25
After you have a connection, enter this...
ehlo localhost
To exit the connect type quit.
What is the full output you get from those commands?
EDIT: Also, I see from your output that sendmail is running. Sendmail should have been uninstalled before installing Postfix.
I just tried re-installing postfix.
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
nhawk
03-08-2013, 09:44 PM
From the looks of it, postfix isn't properly installed.
You should have the server name in there, amongst other things, 250-STARTTLS and 250-AUTH being the other most important ones.
Stop sendmail and prevent it from starting, then re-install postfix. This guide might help...
https://help.ubuntu.com/community/Postfix
deltahawk5
03-08-2013, 10:20 PM
From the looks of it, postfix isn't properly installed.
You should have the server name in there, amongst other things, 250-STARTTLS and 250-AUTH being the other most important ones.
Stop sendmail and prevent it from starting, then re-install postfix. This guide might help...
https://help.ubuntu.com/community/Postfix
[snip]
AUTH, TLS and SASL is all fixed,
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 610/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 5781/master
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 5781/master
tcp6 0 0 :::80 :::* LISTEN 869/apache2
tcp6 0 0 :::22 :::* LISTEN 610/sshd
tcp6 0 0 :::25 :::* LISTEN 5781/master
tcp6 0 0 :::587 :::* LISTEN 5781/master
But I'm still getting the error with vBulletin.
Warning: fsockopen() [function.fsockopen]: unable to connect to tcp://xxx.xxx.xxx.xxx:25 (Connection refused) in [path]/includes/class_mail.php on line 747
Warning: Unable to connect to SMTP server in [path]/includes/class_mail.php on line 713
--------------- Added 1362803093 at 1362803093 ---------------
running more test
OK SMTP TLS OK - Supports TLS.
OK SMTP Connection Time 1.903 seconds - Good on Connection time
OK SMTP Open Relay OK - Not an open relay.
OK SMTP Transaction Time 2.278 seconds - Good on Transaction Time
--------------- Added 1362806221 at 1362806221 ---------------
interestingly enough, it's rejecting the MX tools I'm using and showing the log of rejecting, but shows no log of rejecting vBulletin at all.
NOQUEUE: reject: RCPT from mxtb-pws3.mxtoolbox.com[64.20.227.133]: 554 5.7.1 <test@example.com>: Relay access denied; from=<supertool@mxtoolbox.com> to=<test@example.com> proto=ESMTP helo=<please-read-policy.mxtoolbox.com>
disconnect from mxtb-pws3.mxtoolbox.com[64.20.227.133]
--------------- Added 1362807320 at 1362807320 ---------------
SMTP Reverse Banner Check failing wouldn't have anything to do with not being able to send messages? Right?
--------------- Added 1362808451 at 1362808451 ---------------
Changing the smtp listening port to 587 did absolutely nothing...
nhawk
03-09-2013, 11:36 AM
Have you set your username and password in the mail server itself?
If you have this type of error in the server mail log...
Mar 3 17:52:41 servername postfix/smtpd[914]: warning: unknown[xx.xx.xxx.xxx]: SASL LOGIN authentication failed: authentication failure
You don't.
Also, check that your mail port on the mail server is set to accept connections from the vB server's IP address. It looks like the connection is being refused at the firewall level.
And the one you didn't want to hear, is the mail server info set properly in ACP->Settings->Options->Email Options (at the bottom of the page). HINT: the mail server address for Postfix is almost always mail.domain.name.
deltahawk5
03-09-2013, 04:12 PM
Have you set your username and password in the mail server itself?
If you have this type of error in the server mail log...
You don't.
Also, check that your mail port on the mail server is set to accept connections from the vB server's IP address. It looks like the connection is being refused at the firewall level.
And the one you didn't want to hear, is the mail server info set properly in ACP->Settings->Options->Email Options (at the bottom of the page). HINT: the mail server address for Postfix is almost always mail.domain.name.
Yeah.
I've added the forum's IP address to the list of mynetworks under Postfix, the log still shows NO trace at ALL of the forums connecting to it.
As for the name, I just have the IP, which is what the AdminCP apparently recommends for SMTP servers. All the tools I've been using are having no trouble reaching the mail server.
NOQUEUE: reject: RCPT from mxtb-pws3.mxtoolbox.com[64.20.227.133]: 554 5.7.1 <test@example.com>: Relay access denied; from=<supertool@mxtoolbox.com> to=<test@example.com> proto=ESMTP helo=<please-read-policy.mxtoolbox.com>
Which makes me wonder where the connection is getting cut...because even though the testing tools are NOT listed in the settings as allowed, they can still connect (and get denied) but vBulletin isn't connecting AT ALL!
GoDaddy...
nhawk
03-09-2013, 05:15 PM
Wait a second..
that last word 'GoDaddy' explains it all.
GoDaddy blocks outgoing mail ports.
There's a ton of info about workarounds on the internet. Google 'godaddy block port 25'
deltahawk5
03-09-2013, 06:23 PM
Yeah, I just talked to them and they confirmed it.
We're switching hosting servers to HostGator....right about now. I was tired of GoDaddy anyways.
nhawk
03-09-2013, 06:46 PM
You'll be glad you changed. ;)
Gamelobby
03-09-2013, 08:38 PM
Now that you got that worked out i wanted to add a question that maybe is similer.?
(i dont have GoDaddy)
But i have been trying to send an email thru the site vB4.2 & it goes thru the list so fast that i know it is not sending to everyone, but i dont get any errors.?
None of my members have got the email, but i got it on my acct email.?
Is there something, or someway to see what the problem is.?
I see the number 1,100 something, but no way did it send to 1000 people. I've used the email system prior to 4.2 & seen it take a few minutes to send it to all, but this went so fast i could barely see the 1000+ number at the end.
I even did it again to make sure the settings were correct (all usergroups except banned, even if they declined emails) still took less than a second to finish & no users claiming they received it still.
Any ideas.?
Thanks
Bluemax712
03-10-2013, 03:00 AM
You'll be glad you changed. ;)
Excellent troubleshooting in this thread nhawk :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.