Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Email processing.
base64 encoding and MTA case-sensitivity
This is a great feature!
However, I'm running into a problem with it - the MTA (postfix) on our server downcases the username+extension part of the email address. From searching on the internet, I see that this is a pretty common, and even recommended practice for MTAs. This means that replys to emails that go out with a reply to address of, for example: mdl+Bgbkfirstname.lastname@example.org are received by process_email.php with an $address of email@example.com. This change of Bg to bg means that the hash doesn't match, and that the module id can not be identified.
Wouldn't it be easier to create email_pack_encode() and email_unpack_decode() functions that do basically the same thing as the base64 encoding/decoding and pack/unpack functions currently being used - with the difference that they don't use any uppercase letters, than to require people to reconfigure their mail servers (which is not always the easiest thing to do!)?
I see that there are base32_encode/decode() functions in lib/base32.php, which should be usable for case-insensitive en/decoding.