fix(GODT-3041): Fix Invalid Or Missing message signature during send
If we update the address after determining the sender address is different, we also need to refresh the identity state in order to use the right encryption keys.
This commit is contained in:
parent
1c385d5c9b
commit
b8a33b9618
|
@ -95,6 +95,11 @@ func (s *Service) smtpSendMail(ctx context.Context, authID string, from string,
|
|||
// If the message contains a sender, use it instead of the one from the return path.
|
||||
if sender, ok := getMessageSender(parser); ok {
|
||||
from = sender
|
||||
fromAddr, err = s.identityState.GetAddr(from)
|
||||
if err != nil {
|
||||
logrus.WithError(err).Errorf("Failed to get identity from sender address %v", sender)
|
||||
return ErrInvalidReturnPath
|
||||
}
|
||||
}
|
||||
|
||||
// Load the user's mail settings.
|
||||
|
|
Loading…
Reference in New Issue