diff --git a/extensions/amavis_quarantine/templates/amavis_quarantine/viewmail.html b/extensions/amavis_quarantine/templates/amavis_quarantine/viewmail.html
deleted file mode 100644
index cf5811a2c..000000000
--- a/extensions/amavis_quarantine/templates/amavis_quarantine/viewmail.html
+++ /dev/null
@@ -1,56 +0,0 @@
-{% extends "nlayout.html" %}
-{% load i18n %}
-{% block html_head %}
-
-
-
-
-{% endblock %}
-{% block middletitle %}{% trans "Mail content" %}{% endblock %}
-{% block menu %}
- {% viewm_menu "" mail_id page_id user %}
-{% endblock %}
-{% block content %}
-
-
-
- | {% trans "Message" %} |
-
- | X-Amavis-Alert | {{ alert }} |
- | From | {{ headers.from }} |
- | To | {{ headers.to }} |
- | Date | {{ headers.date }} |
- | Subject | {{ headers.subject }} |
-
-
-
-{% url extensions.amavis_quarantine.main.getmailcontent mail_id as geturl %}
-
-
-{% endblock %}
diff --git a/lib/email_listing.py b/lib/email_listing.py
index d73f6d86f..6cd5bb0cd 100644
--- a/lib/email_listing.py
+++ b/lib/email_listing.py
@@ -3,7 +3,6 @@ import time
import re
import os
import time, random, hashlib
-from email.header import decode_header
import lxml.html
from lxml import etree
from django.conf import settings
diff --git a/lib/emailutils.py b/lib/emailutils.py
index badaf1f90..3e0c49c3d 100644
--- a/lib/emailutils.py
+++ b/lib/emailutils.py
@@ -1,6 +1,8 @@
# coding: utf-8
+import re
import email
+from email.header import decode_header
import lxml
from django.template import Template, Context
from django.template.loader import render_to_string