masqmail

diff docs/oem-option @ 258:05fa719b7002

fixed -oem by removing it ;-) The implemenation of -oem had been very weird. docs/oem-option explains the situation and the fix.
author markus schnalke <meillo@marmaro.de>
date Wed, 01 Dec 2010 18:27:46 -0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/oem-option	Wed Dec 01 18:27:46 2010 -0300
     1.3 @@ -0,0 +1,76 @@
     1.4 +-oem
     1.5 +====
     1.6 +
     1.7 +This document explains what I found out about the -oem/-oee options. It
     1.8 +is intended as a knowledge base for further development on this topic.
     1.9 +In version 0.3.0 (2010-11), masqmail's implementation of -oem is
    1.10 +considered broken and -oee is not implemented.
    1.11 +
    1.12 +Following is the behavior masqmail actually had:
    1.13 +
    1.14 +    If -oi/-i is given, -oem is ignored.
    1.15 +    If no -oi/-i is given, always return with a non-zero return code.
    1.16 +
    1.17 +This current behavior is not like it should be.
    1.18 +
    1.19 +
    1.20 +The desired behavior
    1.21 +--------------------
    1.22 +
    1.23 +It had been difficult to identify good explanations.  The problem, as
    1.24 +often, is that sendmail's source would be the definitive definition.
    1.25 +But in which version and what if common behavior differs from sendmail's
    1.26 +(maybe as a result of misunderstanding)?  Exim's documentation has proven
    1.27 +to be a valuable resource.
    1.28 +
    1.29 +In exim the behavior is such:
    1.30 +
    1.31 +    If an error is detected while a non-SMTP message is being received
    1.32 +    (for example, a malformed address), the error is reported to
    1.33 +    the sender in a mail message.  Exim exits with a non-zero return
    1.34 +    code then, no matter if the error message was successful or not.
    1.35 +    (In exim, -oee is similar but exim returns successful if the error
    1.36 +    message had been sent successful.)
    1.37 +
    1.38 +The mutt wiki writes about ``sendmail -oi -oem'':
    1.39 +
    1.40 +    The mail server (in this case sendmail) will receive the message
    1.41 +    in input, and will parse it. In case of a malformed message,
    1.42 +    it will send an error message to the user to whom belongs the
    1.43 +    MUA trasmitting the message (e.g. user@localhost.localdomain),
    1.44 +    and it will exit with a non zero exit code: the -oem flag forces
    1.45 +    the returning of a non zero exit code even in the case the error
    1.46 +    message has been successfully sent to the local server.
    1.47 +
    1.48 +
    1.49 +What does it mean for masqmail?
    1.50 +-------------------------------
    1.51 +
    1.52 +Masqmail does not send error messages on malformed addresses.  It does
    1.53 +not much check for syntax.  It detects general errors (unexpected EOF,
    1.54 +no recipients, max message size exceeded) (see masqmail.c:mode_accept())
    1.55 +but simply prints a message to stderr and exits non-zero.  I think that
    1.56 +currently it is not of need to add some elaborate error handling in
    1.57 +this area.  Hence, for the implementing of -oem and -oee would do assume
    1.58 +that sending the error message does always fail (because we never send
    1.59 +any such message) and hence we exit non-zero on error.  This is the
    1.60 +similar behavior of both options.
    1.61 +
    1.62 +From 0.3.1 on masqmail will not recognize -oem anymore and thus ignore
    1.63 +it like any unknown -oXXX option. It's behavior is then as if error
    1.64 +message sending fails.
    1.65 +
    1.66 +Remind that all this affects only the case of accepting non-SMTP messages
    1.67 +on stdin.
    1.68 +
    1.69 +
    1.70 +On the relationship of -oi and -oem
    1.71 +-----------------------------------
    1.72 +
    1.73 +It seems as if the two options should not affect each other; in contrast
    1.74 +to the behavior in masqmail before 0.3.1.  Their relationship is just
    1.75 +that -oem does only affect non-SMTP messages on stdin, which is the
    1.76 +typical use case of -oi.
    1.77 +
    1.78 +
    1.79 +meillo