IMAP Fetching - Printable Version +- HelpDeskZ Community (http://community.helpdeskz.com) +-- Forum: HelpDeskZ 2 (http://community.helpdeskz.com/forum-3.html) +--- Forum: Support (http://community.helpdeskz.com/forum-5.html) +--- Thread: IMAP Fetching (/thread-2444.html) Pages:
1
2
|
IMAP Fetching - Corsari - 02-16-2023 Hello I'm seting up I have IMAP on my ubuntu server with accounts tested with thunderbird client I'm tryin to setup the second email for the HelpDeskZ But when I click save I get the following error/warning (follows below the screenshot) can you hint what is this? Thank you also this is a test environment on a virtual machine where I connect from my laptop. So I have not setup any POP3S or IMAPS , I have only POP3 and IMAP mean I have no encryption in my dovecot mail server (e.g. in thunderbird I have set security to "none" and password transmitted normally then in the Outgoing tab you have the option to select "none" but as soon you try to save it gives error "The SMTP Encryption field must be one of: ssl,tls." this seems to be a sort of bug. Any hint is welcome Though currently the main issue is that I cannot add a second email for IMAP fetching for new tickets and or tickets replies via email RE: IMAP Fetching - Corsari - 02-16-2023 Ok after some time I have understood the error message and the logic Added a new private department and called it "emails" I successfully enabled the IMAP and noticed not SSL is needed then created the cron with the command told in the https://docs.helpdeskz.com/en/latest/configuration/email_imap/ Code: /usr/local/bin/php /var/www/helpdesk/index.php imap_fetcher then in the root mail I get the mails from the cron daemon the content of the cron mail for the root is the HTML I got running the same command in the terminal it is this HelpDeskZ page : RE: IMAP Fetching - cord.schneider - 02-17-2023 (02-16-2023, 10:05 PM)Corsari Wrote: OkI had some trouble when I initially set this up. The problem was how I was referencing index.php and passing in the imap_fetcher argument. I'm not sure if it will help you, but this is what I currently have set up on my hosted server, and it's working fine: Code: MAILTO="[email protected]" RE: IMAP Fetching - Corsari - 02-17-2023 Hello thank you for the time you dedicate to reply and support Maybe better to say that Ubuntu server 22.04 ships with php 8.2 I have successfully created a ticket from the user page and the staff pages are working, so looks like urls are setup correctly Though the imap_fetch command must work from the Linux console and something looks wrong and I mean that a normal Linux Cron, rely on the command line commands or eventually in a bash script (which again contains terminal commands) So that command string, in some manner , should be written in the Linux terminal and work. Also for the sending of emails. E.g. as staff, if I reply to the ticket I have created and I have setup some three emails in the admin panel.. which is the email that will send the notification to the user? Do you know? And: do you use phpmail() or SMTP Thank you RE: IMAP Fetching - cord.schneider - 02-17-2023 (02-17-2023, 06:42 AM)Corsari Wrote: Hello thank you for the time you dedicate to reply and supportI'm afraid that, since this project has been largely abandoned, there isn't much activity here - or very much of a lively community. However, I'll do what I can to help. (02-17-2023, 06:42 AM)Corsari Wrote: Maybe better to say that Ubuntu server 22.04 ships with php 8.2I'm surprised that you've had success with running HelpDeskZ on PHP 8+. As far as I know, it's only been tested with PHP 7.3, and most users who have tried PHP 8+ haven't been successful. It could be that you've been lucky with the user and staff pages but unlucky with the imap_fetcher. (02-17-2023, 06:42 AM)Corsari Wrote: Though the imap_fetch command must work from the Linux console and something looks wrongWhen I run it on the command line, I don't get any output to the console. I added the '-v' flag and can definitely confirm that PHP is doing something. I suggest that you have a look in hdz/writable/logs/ to see if anything is being added to the log. (02-17-2023, 06:42 AM)Corsari Wrote: Also for the sending of emails. E.g. as staff, if I reply to the ticket I have created and I have setup some three emails in the admin panel.. which is the email that will send the notification to the user? Do you know?I checked some of my own email threads, and it looks like the email will be sent from the default email address that was set up in Settings> Email addresses unless you have set up an address for a specific department. In which case, that email address will be used. (02-17-2023, 06:42 AM)Corsari Wrote: And: do you use phpmail() or SMTPphpmail() for outgoing emails and IMAP for incoming. RE: IMAP Fetching - Corsari - 02-17-2023 I've seen it has abandoned guessed from the dates and from the fact the owner logged in into this forum last time long time ago I also have seen that there are two HelpDeskZ, what it looks the original one, was abandoned even years previously But the whole code is a good base where to start from and also it is good to learn more pro features of CodeIgniter I'll manage to switch the PHP version to 7.4.x and see what happen Do you code in PHP? Do you know CodeIgniter? Thank you RE: IMAP Fetching - cord.schneider - 02-18-2023 (02-17-2023, 12:25 PM)Corsari Wrote: I've seen it has abandoned Yeah, it's been a while. :-( (02-17-2023, 12:25 PM)Corsari Wrote: I also have seen that there are two HelpDeskZ, what it looks the original one, was abandoned even years previously Correct. Andres forked the original one and then did a whole lot of work on it. Really added some much-needed polish. Such a shame that life has taken him on a different path and he no longer has the time to dedicate to the project. (02-17-2023, 12:25 PM)Corsari Wrote: I'll manage to switch the PHP version to 7.4.x and see what happen Good luck - let me know if it resolves the issue. (02-17-2023, 12:25 PM)Corsari Wrote: Do you code in PHP? Do you know CodeIgniter? I'm quite well-versed in PHP, but I last used CodeIgnitor about 2 decades ago - so I would say that I'm very rusty. Mostly do mobile development now... RE: IMAP Fetching - Corsari - 02-19-2023 One kind confirmation Pipe is for creating new tickets from incoming mails (did you set it up?) Fetch is for parsing income emails for ticket replies Well, how does HelpDeskZ manages the pipe process? I suppose a specific email address is needed eg [email protected] then: is some specific subject needed in the incoming mail? Or more generically, any email sent to [email protected] will create a ticket? and what about eventual SPAM? (That is why some specific string in the subject would help so much) Thank you for sharing what you know about this these topics RE: IMAP Fetching - cord.schneider - 02-20-2023 (02-19-2023, 09:30 AM)Corsari Wrote: Pipe is for creating new tickets from incoming mails (did you set it up?) From what I understand, you will use either pipe or IMAP fetch. They essentially do exactly the same thing but in different ways and are intended to give users a choice depending on their deployment environments. Some environments might be more locked down than others and therefore using pipe isn't an option and they will need to use fetch instead. However, both pipe and fetch will create new tickets, and process replies to existing tickets (provided certain information has been retained in the replies). Because I'm in a hosted environment, I opted for IMAP fetch because it meant less messing around in Linux and getting permissions right, etc. As a result, I've never tried using pipe. (02-19-2023, 09:30 AM)Corsari Wrote: Well, how does HelpDeskZ manages the pipe process? pipe processes emails in the same way as fetch except it looks directly at the mailbox files rather than going through an interface like IMAP. So yes, it would act on a specific email address and process all emails sent to that mailbox (email address). Have a look at parseToTicket() in MailFetcher.php. It calls getTicketFromEmail() in Tickets.php and uses preg_match() to search the subject for a string that starts with a left square bracket (\[), followed by a pound sign (#), and then one or more digits ([0-9]+). The string must end with a right square bracket (]). If it finds this, it assumes it to be a ticket ID and adds the email to the ticket's messages. If not, it creates a new ticket. (02-19-2023, 09:30 AM)Corsari Wrote: and what about eventual SPAM? (That is why some specific string in the subject would help so much) All SPAM will end up as a new ticket, and so will email bounces and out-of-office replies. HDZ doesn't have any way of filtering 'junk' emails. RE: IMAP Fetching - Corsari - 02-21-2023 Thank you for the clarification, yes pipe and fetch now make sense to provide same results Thank you for helping and explaining so much |