vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Howto: Enable SMTP for vB 3.0.2/3 (https://vborg.vbsupport.ru/showthread.php?t=67294)

zaon 03-22-2005 09:39 PM

Thanks, Rex. Although I'm on an apache/Linux server. So hmmmm.

You mentioned getting it to work... which real email provider you get it to function with?

And, for example, does this hack only work accounts that use the "my outgoing server requires authentication" or does it only work with those accounts that specifically do not require that feature?

Ok, I had someone set up a basic SMTP account with no restrictions as a test.

Getting this error now:
Fatal error: Call to undefined function: errormessage() in /home/sites/www/zaon.org/includes/mail.php on line 202

Which points to a different, yet similar line as before, in this case:
return errorMessage("Authorization to the SMTP server failed");

Any clues on what's so fussy here?

Starsurfer 05-10-2005 01:20 PM

When I run it i get the error Parse error: parse error, unexpected '@', expecting ',' or ';' in /home/star/public_html/includes/mail.php on line 96
What could be wrong?

ALcorn 05-10-2005 01:27 PM

Quote:

Originally Posted by Starsurfer
When I run it i get the error Parse error: parse error, unexpected '@', expecting ',' or ';' in /home/star/public_html/includes/mail.php on line 96
What could be wrong?

Read the topic again... You should write the following line with quotes
Code:

var $smtpUser = "user@domain.com";

Starsurfer 05-10-2005 01:31 PM

yeah I noticed that after, I now get the error Warning: fsockopen(): unable to connect to mail.domain.com:25 in /includes/mail.php on line 183

Fatal error: Call to undefined function: errormessage() in /home/star/public_html/includes/mail.php on line 248

ALcorn 05-10-2005 01:35 PM

Quote:

Originally Posted by Starsurfer
yeah I noticed that after, I now get the error Warning: fsockopen(): unable to connect to mail.domain.com:25 in /includes/mail.php on line 183

Fatal error: Call to undefined function: errormessage() in /home/star/public_html/includes/mail.php on line 248

Probably, It's the same problem, write the following line with quotes:
Code:

var $smtpHost = "mail.domain.com";

Starsurfer 05-10-2005 01:36 PM

It is already that way.

ALcorn 05-10-2005 01:40 PM

Quote:

Originally Posted by Starsurfer
It is already that way.

Are you sure you wrote all informations correctly ?

Starsurfer 05-10-2005 01:43 PM

yeah positive.

SMTP: localhost
sendmail_from: None
sendmail_path: /usr/sbin/sendmail -t -i

Is that normal for 3.0.7?

Starsurfer 05-11-2005 01:55 PM

Anyone?

code-frog 05-11-2005 03:30 PM

Quote:

Originally Posted by zaon
Thanks, Rex. Although I'm on an apache/Linux server. So hmmmm.

You mentioned getting it to work... which real email provider you get it to function with?

And, for example, does this hack only work accounts that use the "my outgoing server requires authentication" or does it only work with those accounts that specifically do not require that feature?

Ok, I had someone set up a basic SMTP account with no restrictions as a test.

Getting this error now:
Fatal error: Call to undefined function: errormessage() in /home/sites/www/zaon.org/includes/mail.php on line 202

Which points to a different, yet similar line as before, in this case:
return errorMessage("Authorization to the SMTP server failed");

Any clues on what's so fussy here?

Holy CRUD!!! This thread fired up and I didn't know about it. Let me see...

So I've got a Linux box running this message board and it's email functions are rock solid. (I have a Windows and a Linux server hosted by Burst.) The only thing I can say to you is make sure that your mail functions point to: 127.0.0.1 instead of localhost (in Linux make sure that's defined it should be, a simple ping to that IP would tell you). Then all you need is to make sure that the SMTP account sending the emails is a real account on a real domain on the server. You can get some good feedback using the diagnostic email in the admin panel. It's under "Import & Maintenance" down at the bottom of the panel. Click "Diagnostics" then send email. You'll get some useful output.

I'll watch for your replies so let me know.

Quote:

Originally Posted by Starsurfer
yeah positive.

SMTP: localhost
sendmail_from: None
sendmail_path: /usr/sbin/sendmail -t -i


Is that normal for 3.0.7?

Nope that's wrong.

SMTP: 127.0.0.1
sendmail_from: realuser@realdomainonthisserver.com
sendmail_path: // This looks okay.

Are you on Linux/Windows ehem Winblows? Let me know... I mentioned earlier I'm running this on Windows and Linux. The Linux is so bulletproof I don't even check it. The windows I have to have 9 secret service agents watching around the clock.

Starsurfer 05-11-2005 04:15 PM

Linux, so I need to change the smtp to 127..0.0.1?

code-frog 05-11-2005 04:20 PM

Quote:

Originally Posted by Starsurfer
Linux, so I need to change the smtp to 127..0.0.1?

Well depending on which version of Linux you are using and how apache is setup you may not have localhost defined even if you do phpmail may not see it. So what I started doing was to first make a backup copy of the file before I did anything. Then I used the diagnostic email to test.

If I were you I'd open the CLI and ping 127.0.0.1 and ping localhost make sure both respond. If only 127.0.0.1 does then there you go.

Anyway, yeah change it to 127.0.0.1 (this is called your loopback interface). Give that a try. If that does not work then I'll ask more questions.

Now you do have public domains on this box that are able to use SMTP mail right? In other words you know for a fact that sendmail or whatever you are using for SMTP/POP is working correctly. Right?

Starsurfer 05-11-2005 04:24 PM

Do you have aim msn we coudl talk on? This is a bit too much for moi!

code-frog 05-11-2005 04:27 PM

Quote:

Originally Posted by Starsurfer
Do you have aim msn we coudl talk on? This is a bit too much for moi!

Give me your address so I know to allow you. Mine is MSN: admin@wouldntsomespammerliketohaveit.com

Once you have contacted me I'll be deleting my address so do it quickly.

Starsurfer 05-11-2005 04:28 PM

spammers@sick.com

zaon 05-13-2005 06:29 AM

Quote:

Originally Posted by code-frog
...Then all you need is to make sure that the SMTP account sending the emails is a real account on a real domain on the server.

That's the problem. In today's world it's not feasible to host your own mail server because of how modern spam filters have become so discriminating the vast bulk of mail outbound from my server is categorized as 'spam' despite not being on any IP blacklists.

In short, "Real Email" in my book refers to very professional mail such as yahoo, gmail, and the like. I really prefer outbound vbulletin mail to come from gmail or perhaps yahoo. But have kinda given up because of the SSH requirement for gmail since apparently this vbulletin beta smtp module doesn't support it? Hmm...

code-frog 05-13-2005 03:06 PM

Quote:

Originally Posted by zaon
That's the problem. In today's world it's not feasible to host your own mail server because of how modern spam filters have become so discriminating the vast bulk of mail outbound from my server is categorized as 'spam' despite not being on any IP blacklists.

In short, "Real Email" in my book refers to very professional mail such as yahoo, gmail, and the like. I really prefer outbound vbulletin mail to come from gmail or perhaps yahoo. But have kinda given up because of the SSH requirement for gmail since apparently this vbulletin beta smtp module doesn't support it? Hmm...

If you have reverse DNS on your mail server, domain, etc and you have an SPF record you can email the president without trouble. There's nothing mysterious about email. You are either blacklisted or you are not. I've had my own email on several custom domains with reverse DNS and SPF records and never had any trouble. SPF is not a strict requirement but it makes your mail server fully compliant with the current standards.

zaon 05-22-2005 03:14 AM

Quote:

Originally Posted by code-frog
If you have reverse DNS on your mail server

That's part of the problem right there. Sharing an IP among several dot coms. Nothing wrong with that, yet according to spam filters it's "highly suspect" lol.

Also, the other direction is the hardest part.. keeping up with all the spam filtering updates, etc.

code-frog 05-22-2005 03:24 AM

Quote:

Originally Posted by zaon
That's part of the problem right there. Sharing an IP among several dot coms. Nothing wrong with that, yet according to spam filters it's "highly suspect" lol.

Also, the other direction is the hardest part.. keeping up with all the spam filtering updates, etc.

Yup. I've split out all my domains on to static IP's so I could get reverse DNS and SPF records set up. It's a PITA.

|Jordan| 11-29-2005 06:59 PM

I've tried everything on this thread and nothing works.

My mail settings:

var $smtpHost = "mail.gamers-union.net";
var $smtpPort = 25;
var $smtpUser = "admin+gamers-union.net";
var $smtpPass = ***************;
var $smtpSocket = null;

Ive tried single quotes, double quotes, without quotes, 127.0.0.1, localhost and Illuvatar's fix

My mail server requires Authentication too. Server is linux fedora core 3 (i think).

code-frog 11-29-2005 07:12 PM

Quote:

Originally Posted by MyIS_Jordan
My mail server requires Authentication too. Server is linux fedora core 3 (i think).

Do you buy chance know which mail server you are using and if it's configured properly to receive relay requests?

What type of server is vBulletin running on?

I've built up 3 new Windows 2003 servers and 2 Linux servers for clients (not my licenses for vB but client licenses) and it's worked like a charm.

Can you relay to this server using Outlook for example?

I'll try to help best I can... This is a rather mysterious issue though...

|Jordan| 11-29-2005 07:20 PM

Nevermind!

I fixed it!

I looked at the forum of a friend who has the fix working. I looked at his files, tried something and it worked.

Here's what i did:

Code:

In functions.php

Find:

if (true) // will eventually use $vboptions to determine this

Change To:

if (false) // will eventually use $vboptions to determine this

I know the instructions of the smtp fix say it should be the other way around, but this worked for me (and my friends forum which has extremely heavy traffic).

Zachery 11-29-2005 07:37 PM

Quote:

Originally Posted by MyIS_Jordan
Nevermind!

I fixed it!

I looked at the forum of a friend who has the fix working. I looked at his files, tried something and it worked.

Here's what i did:

Code:

In functions.php

Find:

if (true) // will eventually use $vboptions to determine this

Change To:

if (false) // will eventually use $vboptions to determine this

I know the instructions of the smtp fix say it should be the other way around, but this worked for me (and my friends forum which has extremely heavy traffic).

Could just upgrade to 3.5 ;)

|Jordan| 11-29-2005 08:14 PM

Not going to happen.

My forum is hacked to death (90+ hacks), and unless all those hacks are ported over to 3.5, i wont upgrade.

Zachery 11-29-2005 08:50 PM

I'd hate to be your webhost.

|Jordan| 11-30-2005 03:22 AM

Why?

The forum isint that slow, its not slower than phpbb. Also 70% of the hacks i installed are administrative/optimization.

GrowReport 06-12-2008 04:43 PM

will this work for 3.7?

The terms you say to look for are not part of the functions.php in that version.

mail.php is class_mail.php in my new version.

is it safe to assume that those are the same pages just different names? the code was in the mail page and I could modify as described.

But for the function.php page there was nothing like what everyone says to search for?

"if (false) // will eventually use $vboptions to determine this" This search phrase is not in functions.php

Anyone know what the phrase was changed to?

ALcorn 06-12-2008 05:57 PM

Quote:

Originally Posted by GrowReport (Post 1547799)
will this work for 3.7?

Why do you need this hack? vBulletin v.3.7.x support SMTP natively.

GrowReport 06-12-2008 06:10 PM

Quote:

Originally Posted by ALcorn (Post 1547836)
Why do you need this hack? vBulletin v.3.7.x support SMTP natively.


I was looking for something that worked.

because it's not working right now.

I get this error message:
"Warning: 501 Unexpected response from SMTP server during FROM address transmission in [path]/includes/class_mail.php on line 586"

--------------- Added [DATE]1213297902[/DATE] at [TIME]1213297902[/TIME] ---------------

I get that from the Diagnostics under Maintance to test SMTP.

I know the settings are correct because my Outlook can connect with the same settings and send mail.

ALcorn 06-12-2008 06:25 PM

GrowReport, why not posting your question to the official VB support?

Zachery 06-14-2008 04:19 PM

Alcorn is right, post at vBulletin.com for actual support reuqest.

GrowReport 06-14-2008 04:31 PM

I figured it out, thanks everyone.

I did post a support ticket but they just said it was the hosts fault.

it turned out to be an extra mailto: tag in the source code when an email is sent and the name is generated it came across to the mail server as mailto:name@dot.com and of course that is not the proper format.


All times are GMT. The time now is 09:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01586 seconds
  • Memory Usage 1,822KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (32)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete