MaMpf-HD / mampf

MaMpf (Mathematical Media Platform) — an E-Learning platform for mathematics featuring a media player & editor. Developed & deployed at Heidelberg University.
https://mampf.mathi.uni-heidelberg.de/
MIT License
27 stars 10 forks source link

User cleaner does not detect all bounces correctly #410

Open fosterfarrell9 opened 1 year ago

fosterfarrell9 commented 1 year ago

The UserCleaner worker which is run periodically to autodetect users who have mail adresses that are no longer valid does not detect many of the bounces.

zebleck commented 1 year ago

possibly solved through #414

Splines commented 1 year ago

@fosterfarrell9 Has this been fixed by #414?

Splines commented 2 months ago

Overview

The procedure for cleaning old users should be as follows:

Intricacies

Helpful links for bounce detection via VERP

So far, the UserCleaner relies on certain body messages sent in bounced emails and parses them via regular expressions. This seems very fragile (there is no standard for such body messages, or at least not a standard that is widely adopted). Let's instead try to find an approach that is more robust.

The only real disadvantage Wikipedia lists for this approach is the following_

Another problem with VERP (and with any automatic bounce handling scheme) is that there are MTAs on the Internet that fail to follow basic SMTP standards. VERP depends on the recipients' MTAs following the rule that bounces are sent to the envelope sender. This has been a standard requirement since the dawn of SMTP in 1982 (see RFC 821), but still there are MTAs that get it wrong, usually by bouncing to the address in the From: header.

I feel like we don't have to deal with yet another annoying case like this one. If the mail bounces AND the email server does not adhere to the SMPT standard, then I think it's not our fault and nobody can complain we didn't handle that case. We tried our best. It's goodwill from our side that we even consider resending the bounced mail again after 1 day, e.g. when the mail quota of the recipient is reached or when a mail server is down for some reason. We even send 3 mails in total before deleting the user enitrely.