Guest Posted January 4, 2003 Share Posted January 4, 2003 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 More sharing options...
Guest Posted January 4, 2003 Share Posted January 4, 2003 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 More sharing options...
markthe5th@hotmail.com Posted January 4, 2003 Share Posted January 4, 2003 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 More sharing options...
Guest Posted January 4, 2003 Share Posted January 4, 2003 I am working locally at present... don't know if that will make things harder! Link to comment Share on other sites More sharing options...
edsiosis Posted January 4, 2003 Share Posted January 4, 2003 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 More sharing options...
Guest Posted January 4, 2003 Share Posted January 4, 2003 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 More sharing options...
edsiosis Posted January 4, 2003 Share Posted January 4, 2003 it just doesnt seem to call php to execute the code, and thus not actually making it to the database. are you using a bang up to date snapshot? Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2003 Share Posted January 4, 2003 mid december Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 4, 2003 Share Posted January 4, 2003 I am still having the same problem! - I really cant tell if the email is a) not making it to the script B) making it to the script but the script is not working God knows.. I'll let you guys know as soon as I have it solved.. Mark Link to comment Share on other sites More sharing options...
edsiosis Posted January 4, 2003 Share Posted January 4, 2003 i am fairly convinced its a problem with the aliases settings. What MTA are you using? Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2003 Share Posted January 4, 2003 surely harald should be able to answer these q's. Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 4, 2003 Share Posted January 4, 2003 hehe..whats an mta?? My server is Unix/apache..using procmail... I changed the settings in .procmailic but.....nothings happening... My server guys are trying to help me with it.... Hope they can fix it.. Mark Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 4, 2003 Share Posted January 4, 2003 I sure hope so.. But I'm going to keep pluggin away here.... hopefully we can get it going ourselves and let others know.. I'm sure he's got enough crap to deal with as it is.. Mark Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted January 5, 2003 Share Posted January 5, 2003 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. , osCommerce Link to comment Share on other sites More sharing options...
edsiosis Posted January 5, 2003 Share Posted January 5, 2003 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 More sharing options...
edsiosis Posted January 5, 2003 Share Posted January 5, 2003 actually its not commented out, it claims there is an error here. for ($i=0; $i<sizeof($argv); $i++) { Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted January 5, 2003 Share Posted January 5, 2003 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. , osCommerce Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2003 Share Posted January 5, 2003 can this work on a local because i cant get the ordinary email to work... anyideas on that? :) Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2003 Share Posted January 5, 2003 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 More sharing options...
edsiosis Posted January 5, 2003 Share Posted January 5, 2003 any idea as to what argument i need to compile php with then? Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 5, 2003 Share Posted January 5, 2003 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 More sharing options...
Harald Ponce de Leon Posted January 5, 2003 Share Posted January 5, 2003 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 :) , osCommerce Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted January 5, 2003 Share Posted January 5, 2003 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. , osCommerce Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted January 5, 2003 Share Posted January 5, 2003 any idea as to what argument i need to compile php with then? shell> ./configure --with-mysql shell> make should be enough to produce a php binary. , osCommerce Link to comment Share on other sites More sharing options...
edsiosis Posted January 5, 2003 Share Posted January 5, 2003 i have it compiled with fastcgi and mysql, still doesnt like it :( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.