diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 373d76aa..e3893711 100644 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -172,7 +172,7 @@ def ticket_from_message(message, queue, quiet): return False return True - matchobj = re.match(r"^\[(?P[-A-Za-z0-9]+)-(?P\d+)\]", subject) + matchobj = re.match(r".*\["+queue.slug+"-(?P\d+)\]", subject) if matchobj: # This is a reply or forward. ticket = matchobj.group('id')