TLDR: just read the two sentences underlined in bold and ignore the rest
I can find nothing in the DMG or the PHB that discusses identification of spells. The closest thing in the PHB is the section on Intelligence (Arcana)
and -(Religion) checks, but even those are wiffle-waffley and say only that they, among other things, apply to "your ability to recall lore about [spells/rituals]." I'm not knocking the vagueness, just noting that it exists in its typically vague 5e manner.
Similarly, the closest analog in the DMG is the section on traps, which gives a detect trap Intelligence (Arcana) DC 20 for a magic trap that relies on sphere of annihilation. That was, literally, the only mention of an "interact with magic and be able to identify it" thing I could find in the entire DMG. Checked the index, the ToC, and then read carefully several sections within relevant chapters, and...nothing.
I conclude that 5e left it up to DMs to adjudicate such identification. So here's what I want to do. If the spell is a racial cantrip/spell, or is a spell that appears on your spell list, and is of a level you can cast, you automatically identify the spell. E.g., a drow would automatically recognize dancing lights; a 3rd-level cleric would automatically recognize silence (but not feign death, because feign death is a 3rd-level cleric spell; a 2nd level sorcerer who knows detect magic, expeditious retreat, and sleep would automatically recognize color spray but not darkness, since color spray is a 1st-level spell but darkness is a 2nd-level spell). One time this gets sketchy is, for example, whether a rock gnome would automatically know minor illusion without even having to interact with the illusion. Happily, at the moment that's a moot point since we neither have a rock gnome nor have encountered one. If we ever encounter one, I reserve the right to adjudicate on a case-by-case basis whether an Intelligence check applies for such identification (leaning heavily toward yes since otherwise would seriously nerf the minor illusion spell).
Absent a spell being a racial cantrip/spell, or the spell appearing on your spell list of a level you can cast, spellcasters may make either an Intelligence (Arcana) or Intelligence (Religion) check, DC 12 + spell level, to identify the spell. Additionally, non-spellcasters generally may not make a roll to identify a spell (I won't say never, because in rare circumstances I can envision it being reasonable for a fighter or rogue, for example, to get such a roll).
I toyed with but ultimately rejected the idea of requiring no Intelligence roll at all to identify all spells, because that seemed to steal much of the aura of suspense and mystery that I think all (most? some?) of us prize. I also toyed with but rejected a more complex approach that granted automatic identification to casters like clerics, druids, and paladins but denied the same to bards, sorcerers, and wizards absent the spell being a known spell. I had this fastidiously elegant rule all typed out, then I re-read it, and ditched it as being too complex and contrary to the spirit of 5e. Besides which, this is PbP, so mo' simple = mo' bettah.