Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSCommerce fails to email "external" addresses


marting

Recommended Posts

Hi,

 

I'm setting up an OSCommerce 2.1 shop installed on a webhost provider, and am having troubles with emailing customers.

 

Would anyone be able to provide me with some assistance as to what is going wrong (or what next to check) and ultimately what can be done to fix it?

 

If a customer has a local email address, OSCommerce successfully sends an email. But for those customers with "external" email addresses, the email is not received.

 

Using an SSH/telnet session, I successfully sent an email to these "external" email addresses using /usr/sbin/sendmail -i -t. (On this server, sendmail is actually an alias for Exim)

 

This says to me that the sendmail/exim bit is working OK, and that the problem lies "above", i.e. PHP or OSCommerce.

 

One thing that looked a bit strange, but not sure if it is relevant - in /usr/local/lib/php.ini the sendmail_path line has been commented out. (However, clicking on the OSCommerce Tools | Server Info, OSCommerce shows that the sendmail_path variable has indeed been set to "/usr/sbin/sendmail -i -t".) Could be a red herring, but worth mentioning.

 

The setup is as follows:

 

OSCommerce Email Options

---------------------------------

Email Transport Method: sendmail

Email Linefeeds: LF

Use MIME HTML when sending emails: False

Verify E-Mail addresses through DNS: True

Send E-Mails: True



Server Setup

---------------

Server OS: Linux 2.4.18-14smp

Apache 1.3.27

PHP 4.3.1

MySQL 4.0.12



PHP Variables

--------------------------

Configuration File (php.ini) path: /usr/local/lib/php.ini

sendmail_from: [email protected]

sendmail_path: /usr/sbin/sendmail -i -t

SMTP: localhost

smtp_port: 25

 

Thanks in advance

 

Martin

Link to comment
Share on other sites

Someone suggested turning off DNS verification in another thread.

 

You might want to consider writing a script that looks like this:

#!/bin/sh



echo "/usr/sbin/sendmail $@" >> sendmail.output

and change the line in your configuration file that says "/usr/sbin/sendmail -i -t" to say the name of the script instead (you can leave the -i -t if you want). Remember to make the script executable. This will allow you to see how sendmail is being called.

 

You also might want to try changing the sendmail_from from [email protected] to whatever ends up being sent by the commandline version (probably something like [email protected]). Perhaps a relay setting is tripping you up. The more I think about this, the more likely it seems. You might want to try this first. This would explain the behavior that you are seeing. Exim is supposed to deliver mail to local senders. External senders are only supposed to get mail from authorized local senders. If [email protected] doesn't meet their parameters, it won't send mail out from it.

 

If you have root access, you could check the mail logs and see what you can find. A combination of grep -in and less (using / to search) might be revealing. If not, you might want to ask the host if they can take a look.

 

Hope this helps,

Matt

I love deadlines. I like the whooshing sound they make as they fly by. ---Douglas Adams

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...