annotate docs/oem-option @ 304:d5ce2ba71e7b

manual formating of Received: hdrs; changed hdr for local receival Now the Received: headers are much friendlier to read. About folding: We must fold any line at 998 chars before transfer. We should fold the lines we produce at 78 chars. That is what RFC 2821 requests. We should think about it, somewhen. The header for locally (i.e. non-SMTP) received mail is changed to the format postfix uses. This matches RFC 2821 better. The `from' clause should contain a domain or IP, not a user name. Also, the `with' clause should contain a registered standard protocol name, which ``local'' is not.
author markus schnalke <meillo@marmaro.de>
date Thu, 09 Dec 2010 18:28:11 -0300
parents 05fa719b7002
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
258
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
1 -oem
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
2 ====
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
3
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
4 This document explains what I found out about the -oem/-oee options. It
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
5 is intended as a knowledge base for further development on this topic.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
6 In version 0.3.0 (2010-11), masqmail's implementation of -oem is
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
7 considered broken and -oee is not implemented.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
8
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
9 Following is the behavior masqmail actually had:
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
10
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
11 If -oi/-i is given, -oem is ignored.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
12 If no -oi/-i is given, always return with a non-zero return code.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
13
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
14 This current behavior is not like it should be.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
15
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
16
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
17 The desired behavior
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
18 --------------------
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
19
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
20 It had been difficult to identify good explanations. The problem, as
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
21 often, is that sendmail's source would be the definitive definition.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
22 But in which version and what if common behavior differs from sendmail's
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
23 (maybe as a result of misunderstanding)? Exim's documentation has proven
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
24 to be a valuable resource.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
25
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
26 In exim the behavior is such:
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
27
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
28 If an error is detected while a non-SMTP message is being received
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
29 (for example, a malformed address), the error is reported to
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
30 the sender in a mail message. Exim exits with a non-zero return
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
31 code then, no matter if the error message was successful or not.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
32 (In exim, -oee is similar but exim returns successful if the error
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
33 message had been sent successful.)
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
34
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
35 The mutt wiki writes about ``sendmail -oi -oem'':
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
36
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
37 The mail server (in this case sendmail) will receive the message
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
38 in input, and will parse it. In case of a malformed message,
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
39 it will send an error message to the user to whom belongs the
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
40 MUA trasmitting the message (e.g. user@localhost.localdomain),
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
41 and it will exit with a non zero exit code: the -oem flag forces
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
42 the returning of a non zero exit code even in the case the error
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
43 message has been successfully sent to the local server.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
44
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
45
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
46 What does it mean for masqmail?
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
47 -------------------------------
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
48
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
49 Masqmail does not send error messages on malformed addresses. It does
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
50 not much check for syntax. It detects general errors (unexpected EOF,
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
51 no recipients, max message size exceeded) (see masqmail.c:mode_accept())
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
52 but simply prints a message to stderr and exits non-zero. I think that
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
53 currently it is not of need to add some elaborate error handling in
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
54 this area. Hence, for the implementing of -oem and -oee would do assume
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
55 that sending the error message does always fail (because we never send
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
56 any such message) and hence we exit non-zero on error. This is the
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
57 similar behavior of both options.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
58
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
59 From 0.3.1 on masqmail will not recognize -oem anymore and thus ignore
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
60 it like any unknown -oXXX option. It's behavior is then as if error
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
61 message sending fails.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
62
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
63 Remind that all this affects only the case of accepting non-SMTP messages
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
64 on stdin.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
65
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
66
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
67 On the relationship of -oi and -oem
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
68 -----------------------------------
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
69
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
70 It seems as if the two options should not affect each other; in contrast
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
71 to the behavior in masqmail before 0.3.1. Their relationship is just
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
72 that -oem does only affect non-SMTP messages on stdin, which is the
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
73 typical use case of -oi.
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
74
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
75
05fa719b7002 fixed -oem by removing it ;-)
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
76 meillo