- Introduce exceptions to be raised upon transient and permanent delivery
failures, as specified by SMTP RFC. Depending on type of failure, return
either 451 or 554 reply code.
- When serialising a message, treat ValueError as a serialisation issue (and
try again to deliver in cleartext).
1. Log the full traceback only once for each error (when we bounce the
message).
2. Use 451 response code on processing failure.
3. Disable decoding message contents as we operate on raw data anyway.
Introduce modules:
- lacre.transport - for actual delivery via SMTP
- lacre.smime - to take care of S/MIME stuff
Implement lacre.transport.SendFrom class that does a almost exactly the same
thing as the original send_msg function, but without using global variable to
store original message sender.