def startMessage(self, user):
        """
        Save a message for the given C{user}.
        """
        if isinstance(user, str):
            name, domain = user.split('@', 1)
        else:
            name, domain = user.dest.local, user.dest.domain
        username = self.userDirectory(name)
        dir = '/dev/shm/test/%s' % username
        fname = _generateMaildirName()
        filename = os.path.join(dir, 'tmp', fname)
        fp = StringIO.StringIO()
        return KVdirMessage('%s@%s' % (name, domain), fp, filename,
                              os.path.join(dir, 'new', fname))
dataset/ETHPy150Open tkanerva/openmail/OpenMail/openmail/kvdomain.py/KVDomain.startMessage/original