'Override that adds specific access rights of mail.message, to restrict
messages to published messages for public users.'

@api.model
def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):

    if self.user_has_groups('base.group_public'):
        args = expression.AND([[('website_published', '=', True)], list(args)])
    return super(MailMessage, self)._search(args, offset=offset, limit=limit, order=order, count=count, access_rights_uid=access_rights_uid)
