'Compute the default bounce address.
The default bounce address is used to set the envelop address if no
envelop address is provided in the message.  It is formed by properly
joining the parameters "mail.catchall.alias" and
"mail.catchall.domain".
If "mail.catchall.alias" is not set it defaults to "postmaster-odoo".
If "mail.catchall.domain" is not set, return None.'

@api.model
def _get_default_bounce_address(self):

    get_param = self.env['ir.config_parameter'].sudo().get_param
    postmaster = get_param('mail.bounce.alias', default='postmaster-odoo')
    domain = get_param('mail.catchall.domain')
    if (postmaster and domain):
        return ('%s@%s' % (postmaster, domain))
