Welcome, %1$s. Please login or register.
Did you miss your activation email?



 

2637 705 - 2601 - : smuddel

: [1]   
: POP3 Email Retrieval  ( 20267 )
0 and 1 Guest are viewing this topic.
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« : September 20, 2009, 09:45:32 PM »

I have read many posts on this subject, but none address my particular issue.

Everything is working OK, except the retrieval of email requests via pop3.

The automail. php works fine, I can run this manually and the tickets are created.

However when I log in as admin, no new tickets are created from emails (until I manually rerun automail. php).

I have set up a cron job in /etc/crontab but this doesn't fire either.   #

Is there a path/environment variable problem which means the system isn't finding the automail. php script?

TiA for any help.
James.
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #1 : September 20, 2009, 10:04:57 PM »

Quote from: merchiston link=topic=613. msg2320#msg2320 date=1253533532
Everything is working OK, except the retrieval of email requests via pop3. 

To clarify, my problem is with the *automatic* retrieval of emails.   This isn't happening either at logon, nor via the cron job.   Which is why I think it's not finding the automail. php script. . .

James.
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #2 : September 21, 2009, 05:53:23 AM »

And finally, here is my config from troubleshooter (all OK I think). . .

PHP version: 5. 2. 6-3ubuntu4. 2 (Should be PHP 5. 0. 0 or above)
PHP Safe Mode is off
eTicket version: 1. 7. 3
Webserver: Apache/2. 2. 11 (Ubuntu) PHP/5. 2. 6-3ubuntu4. 2 with Suhosin-Patch
Database: MySQL 5. 0. 75-0ubuntu10. 2 (Should be MySQL 4. 1 or above)
GD version: 2. 0 or higher
Multibyte String is installed
iconv version: 2. 9
IMAP is installed
Socket support enabled. 
User Agent: Mozilla/4. 0 (compatible; MSIE 8. 0; Windows NT 5. 1; Trident/4. 0; . NET CLR 2. 0. 50727; . NET CLR 3. 0. 04506. 648; . NET CLR 3. 5. 21022; . NET CLR 1. 1. 4322; . NET CLR 3. 0. 4506. 2152; . NET CLR 3. 5. 30729)
Character set: UTF-8
Link: hxxp: 172. 16. 1. 41/helpdesk/troubleshooter. php
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #3 : September 22, 2009, 08:44:33 PM »

Hi.   Anybody out there got any clues to help?  So far the system looks really great, but I do need the email to ticket process to be up and running.

By the looks of the forums, noone else had had this problem, so any pointers gratefully received!

TiA

James.
Hummdis
Moderator
Super Member
*****

Karma: +13/-0
Offline Offline

: 625



« #4 : September 28, 2009, 04:11:29 AM »

Have you checked to make sure that your automail.php script is executable?

chmod +x automail.php

Also, execute the automail.php script from the command line, do you get any errors?

php automail.php


Don't PM me directly for help.  Post to the forums, that's what they are for after all.  PM's to me that request help will be ignored.

Hummdis Web Design - Freelance Website Design & IT Consulting
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #5 : September 28, 2009, 07:48:20 AM »

Quote from: Hummdis link=topic=613. msg2338#msg2338 date=1254161489
Have you checked to make sure that your automail. php script is executable?

chmod +x automail. php

I hadn't. . .  and it wasn't (although I'm not sure I see why it needs to be, as it's /usr/bin/php which is executing).   In any case, it hasn't made any difference.

Quote from: Hummdis link=topic=613. msg2338#msg2338 date=1254161489
Also, execute the automail. php script from the command line, do you get any errors?

php automail. php

No errors, in fact no feedback at all.

So the only way I get this function to work at all is by running it from the URL!
Hummdis
Moderator
Super Member
*****

Karma: +13/-0
Offline Offline

: 625



« #6 : September 28, 2009, 08:20:54 AM »

Ah...yes...that way.

Using your cron job, just have a cron job setup to visit the URL and send all of the output to /dev/null.  That's how my install does it.

Code: [Select]
# eTicket WGET entry to get emails.
*/1 * * * * wget -q -O /dev/null http://your.domain.com/automail.php

You can also use curl if you're more comfortable with that.  Mine above checks emails every minute.

Don't PM me directly for help.  Post to the forums, that's what they are for after all.  PM's to me that request help will be ignored.

Hummdis Web Design - Freelance Website Design & IT Consulting
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #7 : September 28, 2009, 08:57:40 AM »

Quote from: Hummdis link=topic=613. msg2343#msg2343 date=1254176454
Using your cron job, just have a cron job setup to visit the URL and send all of the output to /dev/null.   That's how my install does it.

Code: [Select]
# eTicket WGET entry to get emails.
*/1 * * * * wget -q -O /dev/null http://your.domain.com/automail.php

OK, maybe I've got something not right with my cron setup.   The syslog shows the attempts to run automail using
Code: [Select]
*/5 * * * * root /usr/bin/php /home/usr/public_html/helpdesk/automail.php, but none with your wget version.   Is there a way to check the success or failure of a cron job?
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #8 : September 28, 2009, 09:03:53 AM »

The syslog shows that my cron job is running as user "root".   Is this why it doesn't work?  Does it have to run as the apache user?
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #9 : September 28, 2009, 09:12:47 AM »

Quote from: merchiston link=topic=613. msg2345#msg2345 date=1254179033
The syslog shows that my cron job is running as user "root".    Is this why it doesn't work?  Does it have to run as the apache user?

I'll answer my own question. . .   even as the apache www-data user, neither of the cron jobs creates the tickets.   Something must be wrong!!  How can the automail. php do everything OK from the URL but nothing works right any other way?!!
merchiston
New Member
*

Karma: +0/-0
Offline Offline

: 9


« #10 : September 28, 2009, 11:22:23 PM »

OK folks.   Here's my conclusion to this query. . .

I've got it working with a crontab job which fires up the automail. php via the helpdesk URL, i. e.

Code: [Select]
http://www.yourdomain.com/helpdesk/automail.php
but using the apache "www-data" user.

No change to permissions on automail. php is required - i. e.  read only is fine.

My understanding is that the pop3 download should occur automatically on logon to the helpdesk by an admin user.   Unfortunately, this behaviour doesn't appear to work (for me at least).

However, I'm delighted to have got this far and looking forward to implementing - and perhaps developing - this system further.

Thanks to tghe guys who've got it to this stage.

James.
Hummdis
Moderator
Super Member
*****

Karma: +13/-0
Offline Offline

: 625



« #11 : October 01, 2009, 03:00:12 AM »

OK folks.   Here's my conclusion to this query. . .

I've got it working with a crontab job which fires up the automail. php via the helpdesk URL, i. e.

Code: [Select]
http://www.yourdomain.com/helpdesk/automail.php
but using the apache "www-data" user.

No change to permissions on automail. php is required - i. e.  read only is fine.

My understanding is that the pop3 download should occur automatically on logon to the helpdesk by an admin user.   Unfortunately, this behaviour doesn't appear to work (for me at least).

However, I'm delighted to have got this far and looking forward to implementing - and perhaps developing - this system further.

Thanks to tghe guys who've got it to this stage.

James.

As stated in my message prior, you need to visit that page, not run the PHP script of the file.  Therefore, when using or setting up the cron job, you have to visit the URL of the file.  Executing the code of the file doesn't work.

You need to use wget or curl as those two utilities load the page like a browser and by setting it in a cron job it will 'load the page' every time the cron is executed.

Using wget or curl will not report in the system log because they are not system commands.  In effect, by using wget or curl it's launching an application to load a URL.  The same applies to 'lynx'.  It's a text-based web browser and though it's text based, you don't see it showing in the system log, do you?

Now, let's say you do want it to show in the system log, for logging purposes of course.  Then you would change the command that I gave you, which turns off all output (the -q) and suppresses all output by sending it all to /dev/null (the -O -- oh, and /dev/null is like sending the output to the trash and emptying the trash all at once), to:

Code: [Select]
*/1 * * * * wget -O /var/log/eticket-automail.log http://your.domain.com/automail.php

That will run the cron job every minute and send any output to /var/log/eticket-automail.php.

Hopefully this clarifies some things and enables others to understand the wget command that I'm using.
« : October 01, 2009, 03:02:01 AM Hummdis »

Don't PM me directly for help.  Post to the forums, that's what they are for after all.  PM's to me that request help will be ignored.

Hummdis Web Design - Freelance Website Design & IT Consulting
ThaisSoft
New Member
*

Karma: +0/-0
Offline Offline

: 1


« #12 : December 19, 2011, 02:07:54 AM »

Can't get POP3 retrieval to work  ???

I read every post on this forum talking about that and tried many things but tickets are never created and mails stay in the pop3 mailbox . . .

I tried :
1.  to access the account with thunderbird.  Worked flawlessly.

2.  in the "Pop3 Host:" i tried :
pop. orange-business. com
pop. orange-business. com:110
pop. orange-business. com/pop3
pop. orange-business. com:110/pop3

3.  surf to hxxp: mydomain. com/eticket/automail. php
I got a blank page, source code is empty.

4.  i added a cron job :
*/15 *  * * *   wget -q -O /var/virtual_www/logs/eticket-automail. log hxxp: mydomain. com/eticket/automail. php

Here is the content of eticket-automail. log :
--2011-12-19 17:29:01--  hxxp: mydomain. com/eticket/automail. php
Resolving mydomain. com. . .  XX. XX. XX. XX
Connecting to mydomain. com|XX. XX. XX. XX|:80. . .  connected.
HTTP request sent, awaiting response. . .  200 OK
Length: 0 [text/html]
Saving to: `/var/virtual_www/logs/eticket-automail. log'

     0K                                                        0. 00 =0s

2011-12-19 17:29:01 (0. 00 B/s) - `/var/virtual_www/logs/eticket-automail. log' saved [0/0]

No new tickets, never ever.

I don't know what to do or where to look into. . .  Any idea anyone ?
: [1]   
eTicket CommunitySupportInstallation Help & Software Support (Moderators: jason, Hummdis)Topic: POP3 Email Retrieval
: