Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

just installed Harald's helpdesk contribution... PLEASE HELP


Guest

Recommended Posts

Hi,

 

just installed Harald's helpdesk contribution... well timed as i was having problems configuring some of the others.

 

Problem -- setting up the email side.

 

#####

Mail Alias Entry (Sendmail Example)

#####

 

In order to insert incoming emails into the database, a mail alias entry is needed

to pass the email content to the osc_mail2db.php script.

 

Each department the helpdesk has should have its own email address. Each

address should be entered in the mail aliases file.

 

An example mail alias entry for a "sales" department (email = sales@server.com) is:

 

sales: a_backup@email_address.com, "|/path/to/php -q /path/to/osc_mail2db.php config=/path/to/admin/includes/configure.php"

 

The mail aliases file may exist in /etc/mail/aliases - when it has been

modified the linux command "newaliases" needs to be executed.

 

The backup email address part should be a real email address which

emails are forwarded to. This is a backup incase the php script fails.

 

It is important to use the Administration Tool configuration file and not

the Catalog configuration file, as access is needed to the

mime_decode.php class via the DIR_FS_ADMIN parameter.

 

Qmail Example (.qmail-sales)

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

 

"|/path/to/php -q /path/to/osc_mail2db.php config=/path/to/admin/includes/configure.php"

 

Proc Mail Example

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

 

:0

* (^To:|^CC:|^Cc:) .*sales@server.com

"|/path/to/php -q /path/to/osc_mail2db.php config=/path/to/admin/includes/configure.php"

 

is ther any chance of expanding on this to make it EASY :D to understand for a moderate coder...

 

Thanks

 

Richard

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

I think this is the bit its refering to..

 

  if ($config_file == false) {

   echo "n" .

        'osCommerce 2.2 Mail2Database Script' . "n" .

        'Copyright (c) 2002 osCommerce' . "nn" .

        'Release under the GNU General Public License' . "nn" .

        'Usage: osc_mail2db.php config=<path to config file>' . "nn" .

        'The config file parameter is used to retrieve the database' . "n" .

        'connection parameters.' . "nn" .

        'Example /etc/mail/aliases entry:' . "nn" .

        'helpdesk: "| /home/site/scripts/osc_mail2db.php config=/home/site/osCommerce/includes/configure.php"' . "nn";

   exit;

 }

Link to comment
Share on other sites

I am not sure if its that bit its referring to...

 

This has to do with your server setting to forward emails sent to the specific address to the script osc_mail2db.php

 

I am still having trouble configuring it....having my hosting guys look at it..

 

Once you create an email address you have to set this

 

:0

* (^To:|^CC:|^Cc:) .*sales@server.com

"|/path/to/php -q /path/to/osc_mail2db.php config=/path/to/admin/includes/configure.php"

 

in that particular mail boxes setting so that messages are forwarded to that script..

 

I am still not able to get it working..

Link to comment
Share on other sites

2003-01-04 22:53:02 18Ux2Q-0001lY-00 Neither the system_aliases director nor the address_pipe transport set a uid for local delivery of |/home/siosis.com/siosis/public_html/fcgi-bin/php -q /home/siosis.com/siosis/public_html/hns/osc_mail2db.php config=/home/siosis.com/siosis/public_html/hns/admin/includes/configure.php

 

Everything installs fine and have edited the aliases file for exim, however it doesnt seem to move the emails to the database.

 

I get the above error sent to the cron daemon. i am using zeus webserver, exim, debian, and snapshot from november. Could the age of my snapshot be the problem?

 

Also when i click on the Contact Us link, i just get a blank page :(

Link to comment
Share on other sites

A bit over my head and i think we need some documentation on this!

 

The set up was fine, i got the contact us page configured to my design and all seems ok but it doesn't add the ticket to the database, I presume this is because the email side isn't set up correctly.

The admin side is also fine except obviously there are no tickets to view.

Link to comment
Share on other sites

surely harald should be able to answer these q's.

 

I have the script working fine with sendmail - for the other methods its best to read up on its documentation to see how its done.

 

This is what I have in my /etc/mail/aliases file (Gentoo Linux):

 

help: "|/usr/bin/php -q /<path to>/osc_mail2db.php config=/<path to>/configure.php

 

<path to> = the path to the respesctive file.

 

As mentioned in the installation text, don't forget to run "newaliases" after modifications to the aliases file has been made.

 

I know on Pair servers that adding aliases entries is done over a html interface, and must wait 10 minutes before it is active.

 

This ofcourse differs on hosting servers - the best thing to do is to ask your hosting provider administrators.

 

To make sure that the paths and scripts are working fine, run the following in your shell:

 

/usr/bin/php -q /<path to>/osc_mail2db.php config=/<path to>/configure.php

 

You will need to fix any errors that show up - otherwise press ctrl-c to kill the process as its not going to do anything.

 

##

 

It will be of great help if people could reply with how they got it working on their servers, so that appropriate documentation can be put together.

:heart:, osCommerce

Link to comment
Share on other sites

PHP Notice: Undefined variable: argv in /home/siosis.com/siosis/public_html/hns/osc_mail2db.php on line 69

 

osCommerce 2.2 Mail2Database Script

Copyright © 2002 osCommerce

 

Release under the GNU General Public License

 

Usage: osc_mail2db.php config=<path to config file>

 

The config file parameter is used to retrieve the database

connection parameters.

 

Example /etc/mail/aliases entry:

 

helpdesk: "| /home/site/scripts/osc_mail2db.php config=/home/site/osCommerce/includes/configure.php"

 

 

 

 

Thats the output i have, which makes no sense because line 69 is commented out.

Link to comment
Share on other sites

You will need to either recompile a newer php binary version, or edit the osc_mail2db.php script so that the configuration file from osCommerce is included directly - and remove the argv logic so that it is bypassed.

 

The problem is, your php binary does not for some reason accept arguments.

:heart:, osCommerce

Link to comment
Share on other sites

As mentioned in the installation text, don't forget to run "newaliases" after modifications to the aliases file has been made.

 

how do you do that (local)?

Link to comment
Share on other sites

I ran that in my shell...and I got no errors..

 

So i can only guess that the script works fine? (am I correct in this assumption?)

 

the only other possiblity is that the emails are not being forwarded to the script properly..

 

When I solve this I will certainly reply with the solution so others can use it..ie..documentation..

 

Thanks hpdl

Link to comment
Share on other sites

As mentioned in the installation text, don't forget to run "newaliases" after modifications to the aliases file has been made.

 

how do you do that (local)?

 

shell> which newaliases

/usr/bin/newaliases

shell> newaliases

 

###

 

qmail users might need "fastforward", for more information:

 

http://cr.yp.to/fastforward.html

 

Again, read the appropriate documentation and report back with the results so that documentation for the contribution can be written :)

:heart:, osCommerce

Link to comment
Share on other sites

I ran that in my shell...and I got no errors..

 

So i can only guess that the script works fine? (am I correct in this assumption?)

 

That's correct.

 

the only other possiblity is that the emails are not being forwarded to the script properly..

 

Try forwarding the incoming email to another email account.

 

I mean, following the contribution installation text, just use the backup email address to see if that part works.

:heart:, osCommerce

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...