I'm working on a project which requires us developing our own intermediate SMTP relay to handle some outgoing mail so that it abides by certain rules. For the most part, I have everything functioning but I am having an odd issue that does not seem to be addressed by the SMTP spec. I'm not super familiar with sockets, either, so that isn't helping.
According to SMTP spec, every 'line' of data that's transmitted should be terminated by a \r\n
and that's it. Unfortunately, when some clients connect to the relay server, they seem to terminate the line with an =\r\n. I'm not familiar with this at all, and I'm worried about simply truncating the = lest I accidentally lose some data. Is there some way to know when I should be truncating this and when I should not be? Why is it there if it's not in the SMTP spec? What do I do about it?