Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Email confirmation when email used to open ticket?

Hi all,

I'm likely missing a setting somewhere. I just can't find it.

I've got email piping set up and working (using postfix and apache), example from my aliases file:

helpdesk:               "|/usr/bin/php -f /home/{virtualdir}/website/public/requests/api/pipe.php > /dev/null 2>&1"

This works, no problem. It opens a ticket and I get an email passed through my exchange server indicating that a new ticket exists. In fact, I get two emails... one to my webadmin@ address, and one to my address since I'm on the team that belongs to the ticket dispatch group. I'd love to stop the webadmin@ emails, but honestly two emails is better than no emails. And yes, I've tried turning off this in Admin -> Settings -> Alerts and Notices. Again, not really the real problem for this discussion. :-)

It's telling me I'm over the limit for the body size of the thread, so I'll post details in a reply below. :-)

Tagged:

Comments

  • edited March 2015
    SymptomsIf a customer goes to the public side of the request portal and puts in a ticket, I get an email notice, and so do they. However, if a customer emails their ticket to helpdesk@[domain.com], I get an email notice, but they do not get a confirmation email, leading them to call and ask if we got it. :-/

    I've checked the exchange server logs and I can see where my emails are sent to me, but their emails are not sent to them.

    Pertinent details, as requested:

    osTicket version: 1.8-git (?) (I installed from a Git Clone as suggested in the README.txt document a week or so ago, so it should be 1.9.5.1)

    PHP Error log entries or displayed errors. (you of course may remove any identifying information):
    I sent an email to helpdesk@[domain.com] from a customer email address. From the time I hit send on their end to the time I received an email in my inbox here (~ 1 min), I observed no errors in error.log. It is however throwing this error whenever an agent goes to /scp/tickets.php:
    [Mon Mar 09 16:14:22 2015] [error] [client {MyInsideIP}] PHP Fatal error:  Uncaught exception 'Exception' with message 'hasSpecialSearch: Call to undefined function' in {webroot}/requests/include/class.forms.php:454\nStack trace:\n#0 {webroot}/requests/include/staff/tickets.inc.php(665): FormField->__call('hasSpecialSearc...', Array)\n#1 {webroot}/requests/include/staff/tickets.inc.php(665): TextboxField->hasSpecialSearch()\n#2 {webroot}/requests/scp/tickets.php(492): require_once('{webroot}...')\n#3 {main}\n  thrown in {webroot}/requests/include/class.forms.php on line 454, referer: http://{website}/requests/scp/index.php


    Mail Sending: phpMail functions or SMTPI'm using an internal, anonymous SMTP relay into my exchange server, as I understand Microsoft is doing something funny with Base64 encoding that causes Base64 encoded emails to appear blank if it isn't the original mail handler.

    Mail Fetching/ReceivingMail fetching is enabled under Admin -> Settings -> Emails, but Fetch on auto-cron is unchecked. Again, I'm using the pipe method to receive emails.

    PHP versionHere's direct from the CLI:
    PHP 5.3.3 (cli) (built: Oct 30 2014 20:12:53)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
        with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies


    Operating SystemCentOS v6 64-bit running kernel 2.6.32-504.8.1

    Client or Staff side of the UIClient side, as in, my customers are who notice the issue.

    The location - the url or what your clicking on that is causing the problemThis only happens when customers email their request in.


  • I'd recommend that you start by going to osticket.com/downloads and downloading the install archive and using that to replace your current code base (and it will fix the version number that your displaying too).

    As far as the actual problem that you are citing, I would try changing from phpmail to SMTP and see if that fixes your issue.  Also what are your settings at Admin panel -> Settings -> Autoresponder?
  • Attached are some screenshots that may help those more knowledgeable than I on this issue. :-)
    admin-settings-emails.jpg
    847 x 494 - 136K
    admin-settings-autoresponder.jpg
    850 x 267 - 65K
    admin-settings-alerts_notices.jpg
    659 x 776 - 125K
    admin-agents-departments-default-Ticket-Dispatch-department.jpg
    661 x 777 - 128K
  • edited March 2015
    Looks like our comments crossed paths over the interwebz. See the above comment I posted for screenshots and let me know if that gives you any other clues as to where the problem could be?
  • ntozier,

    Ok, I went to osticket.com/downloads and grabbed 1.9.5.1, backed up my requests directory, and then replaced code. I think I ended up rolling back (?) because a few things are now missing that used to be there. Regardless, I should be on the official, stable 1.9.5.1 version now.

    Also, I'm already using SMTP instead of PHPMail. See attached. :-)

    Thanks in advance! :-)
    admin-dashboard-information.jpg
    805 x 595 - 148K
    admin-emails-emails-onlyentry.jpg
    584 x 889 - 129K
  • Now that you've replaced the code, have you tested to make sure that you still have the problem?
  • Hi ntozier,

    Sorry, but it appears the problem still exists. Here's what I did this morning to test it:

    I'm at a customer site today, so I opened up email on their administrator account and sent an email to helpdesk@[ourdomain.com] at 10:08 AM. Then I walked away to work on an issue here.

    When I came back, I had no reply message in the administrator inbox here, but looking at my email account ([user1]@[ourdomain.com] in the logs) I had two messages: One sent to the administrator account on osTicket, and the other sent to me because I'm a member of the support team for the "Ticket Dispatch" department.

    This prompted me to go look at the Exchange message tracking logs. Since osTicket sends direct via SMTP to the exchange server and does not send via phpMail through postfix on the web server, this is the only place this should be tracked. For reference, I used the following Exchange PowerShell command to locate any instances of the email going out:

    [PS] C:\>get-messagetrackinglog -EventID SEND -Sender "helpdesk@[ourdomain.com]" -Start "3/11/2015 9:50:00" -End "3/11/2015 23:59:59" -resultsize unlimited -MessageSubject "962614"| select-object sender, timestamp, messagesubject, {$_.recipients} | export-csv "c:\sentmail.csv"

    The ticket number generated was 962614, which is why I'm filtering for that above.

    Below is the output of the csv file that came back. It appears that it never sent an email back to the originating email address.
    #TYPE Selected.Microsoft.Exchange.Management.TransportLogSearchTasks.MessageTrackingEvent
    "Sender","Timestamp","MessageSubject","$_.recipients"
    "helpdesk@[ourdomain.com]","3/11/2015 10:11:02 AM","Support #962614 Created | Cust: Ticket Dispatch | User: Administrator | Subj: Test at 1008","[user1]@[ourdomain.com] [user2]@[ourdomain.com]"
    "helpdesk@[ourdomain.com]","3/11/2015 10:11:02 AM","Support #962614 Created | Cust: Ticket Dispatch | User: Administrator | Subj: Test at 1008","[user3]@[ourdomain.com]"
    "helpdesk@[ourdomain.com]","3/11/2015 10:11:02 AM","Support #962614 Created | Cust: Ticket Dispatch | User: Administrator | Subj: Test at 1008","[user2]@[ourdomain.com]"
    "helpdesk@[ourdomain.com]","3/11/2015 10:11:02 AM","Support #962614 Created | Cust: Ticket Dispatch | User: Administrator | Subj: Test at 1008","[user4]@[ourdomain.com]"
    "helpdesk@[ourdomain.com]","3/11/2015 10:11:02 AM","Support #962614 Created | Cust: Ticket Dispatch | User: Administrator | Subj: Test at 1008","[user1]@[ourdomain.com]"

    Thoughts? Is this a bug in the pipe.php (or other) code?

    Thanks in advance!
  • edited March 2015
    I'll pass this along to the devs to take a look.
    Are you using an distribution group anywhere in this by chance?

    Q: Is this a bug in the pipe.php (or other) code?
    A: pipe.php is for incoming mail from an MTA and doesn't really have anything to do with outgoing mail.
  • I see you are also an Exchange user. Did you by any chance configured the helpdesk address as a exchange contact or alias? 
    Maybe the answer of the problem is in the incoming message itself. I've seen that Exchange originated messages mess up the From and Reply-To headers. So maybe osTicket is replying but not to the expected address. 

    In your CentOS installation you should be able to diagnose this in the /var/log/maillog.
  • ericstrelow,

    That was the winner! It was exchange, and your suggestion to tail out /var/log/maillog led me right to it.

    To answer your question, YES, I was using a distribution group on the exchange server that forwarded internally to an alias on the web server, referencing pipe.php in the /etc/aliases file.

    Looking in maillog, the message would come in as being from helpdesk@[domain.com] instead of the original email address it was sent from.

    So, to fix this, I created a mailbox on the exchange server for helpdesk@[domain.com] and enabled the IMAP auto-fetch via a cron job. I tested it and voila, a response email comes back to the original person sending the message.

    I'm a little bummed that I don't get to use pipe.php, because, well, that's ingenious. But it's a small price to pay for having a working solution!

    Thanks to both you and ntozier for all your help!

Sign In or Register to comment.