/usr/share/pyshared/mailer/management/commands/send_mail.py is in python-django-mailer 0.2a1.dev3-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import logging
from django.conf import settings
from django.core.management.base import NoArgsCommand
from mailer.engine import send_all
# allow a sysadmin to pause the sending of mail temporarily.
PAUSE_SEND = getattr(settings, "MAILER_PAUSE_SEND", False)
class Command(NoArgsCommand):
help = "Do one pass through the mail queue, attempting to send all mail."
def handle_noargs(self, **options):
logging.basicConfig(level=logging.DEBUG, format="%(message)s")
logging.info("-" * 72)
# if PAUSE_SEND is turned on don't do anything.
if not PAUSE_SEND:
send_all()
else:
logging.info("sending is paused, quitting.")
|