Hello,I've made some modifications in osTicket's code, so my unresponded mail's automagically closed after 7 days of inactivity, but hey! let's start from the beggining...First of all - I'm an administrator of a helpdesk system based on osTicket (originally). Now the code has been modified by me, that it doesn't even remind the old osTicket ;) The problem is that the company is quite small (~40 employees), but has a lot of customers and four persons from hepdesk department has to deal with hudge amount of tickets. In my case - tickets marked as 'waiting for response' couldn't been hanging together with opened tickets, cause it was causing one big hell of a mess.1. Status 'waiting for response'As I've said above - there was no space fo tickets with status 'waiting for response' hanging together with opened tickets. That's why I went to ticket statuses dictionary and I've create a status 'waiting for response' as substatus of 'closed'. That caused that the tickets marked with this status were moved to 'closed tickets'. And that was fine for about one month. After that I've realised that I haven't cleaned up this mess, but I've only moved it somewhere else. That caused the need of create auto-cron for cleaning up this mess, so I've decided to do the job basing on 'mark as overdue' mechanism.2. Main function.If we'll go to /include/class.cron.php file - we'll see a function 'TicketMonitor()' which calls function 'checkOverdue()' in Ticket class. So I've opened up file /include/class.ticket.php and found 'checkOverdue()' function. It's just a simple SQL query that fetches tickets ids and are older than some time defined in SLA table.What I've done was just to copy and paste this function with different name, right under 'checkOverdue()' function:function checkResponseRequested() { $sql='SELECT ticket_id FROM '.TICKET_TABLE.' WHERE status_id = 8 AND DATEDIFF(now(), updated) > 7 LIMIT 50'; if(($res=db_query($sql)) && db_num_rows($res)) { while(list($id)=db_fetch_row($res)) { if($ticket=Ticket:($id)) && $ticket->markClosedWithoutResponse()) $ticket->logActivity(_S('Ticket closed due to response timeout'), _S("Ticket has been closed by the system as nobody has responded in 7 days.')); } }}Don't forget to replace the status ID with your own ID and no. of days as well.3. Dependant functionAs the original function 'checkOverdue()' marks overdue tickets using 'markOverdue()' function - I've copied that function as well and named it as shown above - 'markClosedWithoutResponse()'.function markClosedWithoutResponse() { global $cfg; $sql='UPDATE '.TICKET_TABLE.' SET status_id=3, closed=NOW() ' .' WHERE ticket_id='.db_input($this->getId()); if(!db_query($sql) || !db_affected_rows()) return false; $this->logEvent('closed'); return true;}4. Back to the beginning.The last thing to do that has left is to run the function with function, so we need to go back to /include/class.cron.php file add the following line, right behind the one that checks overdue tickets: Ticket:(); //Marks ticket as closed due long response waiting periodAnd that would be all I think. If you'd have any further questions - feel free to contact me.