Jump to content


Photo
- - - - -

IP resolution problems in email functions


  • Please log in to reply
7 replies to this topic

#1 christobal

christobal

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 12 November 2004 - 03:19 PM

Have noticed that the newsletter campaign when using 4.7 on windows machine with php and apache generates a e-mail (port 25) procedure using IP 127.0.0.1 instead of using SMTP Server IP address as configured in PHP.INI .
The campaign registers itself as successful but alas nothing is sent to recipients from UDT_mynewsletter table.

Also when using "e-mail this page to a friend". The process successfully sends the e-mail to the requested recipient but alas the link supplied in the mail message is of the format http://localhost.xxx.xxx instead of the the resolution of the server address http://christobal.xxxx.xxx

Any thoughts how this problem be overcome
To steal ideas from one person is plagiarism; to steal from many is research!

#2 Cameron Allen

Cameron Allen

    Senior Member

  • Administrators
  • 671 posts

Posted 13 November 2004 - 02:22 AM

Christobal,
I am currently out of town and don't have the resources to approach this problem. I will be back tomorrow night and will get back to you then. Could you send me an email of the exact error in the meantime?
Cameron Allen
Director of Technical Services
Soholaunch.com Inc ...Website Building Made Easy

#3 Cameron Allen

Cameron Allen

    Senior Member

  • Administrators
  • 671 posts

Posted 15 November 2004 - 04:49 PM

Check your email.
Cameron Allen
Director of Technical Services
Soholaunch.com Inc ...Website Building Made Easy

#4 christobal

christobal

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 15 November 2004 - 08:12 PM

Have read mail and have altered suggested code. It now seems to be fine.

The IP Resolution was an oversight on my part of the variable $Servername. I assumed you used the variable this_ip which is defined in the isp.conf.php file. After checking the result of the $servername variable from the phpinfo script result I realised that my http.conf file was using the value "localhost", after a quick edit and restart of Apache server all is behaving as should.

Thanks for the help
To steal ideas from one person is plagiarism; to steal from many is research!

#5 Ruben

Ruben

    www.Sohotemplates.com

  • Moderators
  • 584 posts

Posted 15 November 2004 - 09:29 PM

thats indeed an easy solution for christobal cameron, but WE don't want to and can not change the server settings to something else than localhost as we have more customers running on that server.
Ruben
Visit www.sohotemplates.com for your Soholaunch templates
High Quality StockPhoto's ! www.microstockphoto.com
Looking for High Quality Flash files? check Flashden!

#6 Mike Morrison

Mike Morrison

    Administrator

  • Administrators
  • 10 posts

Posted 15 November 2004 - 11:25 PM

Hi Guys,

Cristobal and Ruben really hit on the main problems we've seen in terms of running soho on Win boxes, namely: global environment variables and mail sends to localhost. Based on our communications with you and some of our other Win users, here's what we're planning in terms of solutions:

Email Return Address/Link
Fortunately, this should just be a matter of modifying the headers we send out. As Cristobal mentioned, I think the answer here is to make sure to use the this_ip value everywhere (except licensing), rather than pulling the global var. My question is: Would you rather we pull this_ip for the return address header, or should we pull from the address stored in the site_specs table via Global Settings? The this_ip route would probably be a bit more riliable, while the site_specs route would allow for a bit more control.

SMTP Mail Sends
Due to the expressed need for separate email servers, we're currently planning to modify our send routines so that the smtp server itself is flexible, independant of the site url, etc...like we do with the database server. As with the db, the smtp server would default to localhost, but allow for an alternate server to be specified.

What do you think? Assuming that the other directory path issues will also be taken care of, would these changes do the trick for Win servers?

#7 Ruben

Ruben

    www.Sohotemplates.com

  • Moderators
  • 584 posts

Posted 16 November 2004 - 12:11 AM

I have personally nothing against the ip route, but experience sometimes the the From: mail address (don't know yet with SL) is our localhost instead of the users email address, so all returned 'failed to deliver' email end up in my mailbox instead of the users, because the returnpath of the user did not work.
maybe im not hitting it on its head here, and maybe even does not have to does with this, ... your choice.

smtp: localhost is ok for me. (but who am i)
Ruben
Visit www.sohotemplates.com for your Soholaunch templates
High Quality StockPhoto's ! www.microstockphoto.com
Looking for High Quality Flash files? check Flashden!

#8 christobal

christobal

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 16 November 2004 - 05:33 PM

Based on

Fortunately, this should just be a matter of modifying the headers we send out. As Cristobal mentioned, I think the answer here is to make sure to use the this_ip value everywhere (except licensing), rather than pulling the global var. My question is: Would you rather we pull this_ip for the return address header, or should we pull from the address stored in the site_specs table via Global Settings? The this_ip route would probably be a bit more riliable, while the site_specs route would allow for a bit more control.



The variable "this_ip" relates to the DNS hostname which is the main problem for remote mail servers due to the fact that the email address "list@$this_ip is not part of the mail domain and would require additional configuration on the remote mail server. This is not always available.
The use of site_specs would allow a more flexible procedure, for example. The mail generated by "list@$this_ip could be configured to be sent to a mailbox which could be dedicated to sohoadmin related functions and then be seperately managed and monitored.

With regards to SMTP Mail Sends

Due to the expressed need for separate email servers, we're currently planning to modify our send routines so that the smtp server itself is flexible, independant of the site url, etc...like we do with the database server. As with the db, the smtp server would default to localhost, but allow for an alternate server to be specified.



would this take into account the need for remote authentication parameters to be configured as most mail servers require at least this feature so to avoid "mail relaying"

I would like to see the most flexible option adopted but humbly request that any changes be posted to the forums (maybe we'll see the return of File Exchange Forum)
Anyway was very glad to see such dynamic response to this issue
Keep up the good work
To steal ideas from one person is plagiarism; to steal from many is research!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users