'Format a message and blindly write to self._file.'

def _install_message(self, message):

    from_line = None
    if (isinstance(message, str) and message.startswith('From    ')):
        newline = message.find('\n')
        if (newline != (-1)):
            from_line = message[:newline]
            message = message[(newline + 1):]
        else:
            from_line = message
            message = ''
    elif isinstance(message, _mboxMMDFMessage):
        from_line = ('From    ' + message.get_from())
    elif isinstance(message, email.message.Message):
        from_line = message.get_unixfrom()
    if (from_line is None):
        from_line = ('From    MAILER-DAEMON    %s' % time.asctime(time.gmtime()))
    start = self._file.tell()
    self._file.write((from_line + os.linesep))
    self._dump_message(message, self._file, self._mangle_from_)
    stop = self._file.tell()
    return (start, stop)
