add comment about not verifying Sender for submissions

This commit is contained in:
Mechiel Lukkien 2023-08-10 12:18:05 +02:00
parent 6b68920a3a
commit 7cceb3d834
No known key found for this signature in database

View file

@ -1659,6 +1659,8 @@ func (c *conn) submit(ctx context.Context, recvHdrFor func(string) string, msgWr
// Check that user is only sending email as one of its configured identities. Not
// for other users.
// We don't check the Sender field, there is no expectation of verification, ../rfc/7489:2948
// and with Resent headers it seems valid to have someone else as Sender. ../rfc/5322:1578
msgFrom, header, err := message.From(dataFile)
if err != nil {
metricSubmission.WithLabelValues("badmessage").Inc()