If the incoming message contains no From: header or it's From: header can't be parsed into a display name and email address, the DMARC mitigation actions that try to put the From: address in Reply-To: fail to do so.
In these cases and also in the non-compliant case where there are multiple From: addresses, just take the sender address from Mailman's get_sender() message method and use that in liu of the From address.
If the incoming message contains no From: header or it's From: header can't be parsed into a display name and email address, the DMARC mitigation actions that try to put the From: address in Reply-To: fail to do so.
In these cases and also in the non-compliant case where there are multiple From: addresses, just take the sender address from Mailman's get_sender() message method and use that in liu of the From address.