Mercurial > masqmail
comparison 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 |
comparison
equal
deleted
inserted
replaced
257:8cca5305e4f0 | 258:05fa719b7002 |
---|---|
1 -oem | |
2 ==== | |
3 | |
4 This document explains what I found out about the -oem/-oee options. It | |
5 is intended as a knowledge base for further development on this topic. | |
6 In version 0.3.0 (2010-11), masqmail's implementation of -oem is | |
7 considered broken and -oee is not implemented. | |
8 | |
9 Following is the behavior masqmail actually had: | |
10 | |
11 If -oi/-i is given, -oem is ignored. | |
12 If no -oi/-i is given, always return with a non-zero return code. | |
13 | |
14 This current behavior is not like it should be. | |
15 | |
16 | |
17 The desired behavior | |
18 -------------------- | |
19 | |
20 It had been difficult to identify good explanations. The problem, as | |
21 often, is that sendmail's source would be the definitive definition. | |
22 But in which version and what if common behavior differs from sendmail's | |
23 (maybe as a result of misunderstanding)? Exim's documentation has proven | |
24 to be a valuable resource. | |
25 | |
26 In exim the behavior is such: | |
27 | |
28 If an error is detected while a non-SMTP message is being received | |
29 (for example, a malformed address), the error is reported to | |
30 the sender in a mail message. Exim exits with a non-zero return | |
31 code then, no matter if the error message was successful or not. | |
32 (In exim, -oee is similar but exim returns successful if the error | |
33 message had been sent successful.) | |
34 | |
35 The mutt wiki writes about ``sendmail -oi -oem'': | |
36 | |
37 The mail server (in this case sendmail) will receive the message | |
38 in input, and will parse it. In case of a malformed message, | |
39 it will send an error message to the user to whom belongs the | |
40 MUA trasmitting the message (e.g. user@localhost.localdomain), | |
41 and it will exit with a non zero exit code: the -oem flag forces | |
42 the returning of a non zero exit code even in the case the error | |
43 message has been successfully sent to the local server. | |
44 | |
45 | |
46 What does it mean for masqmail? | |
47 ------------------------------- | |
48 | |
49 Masqmail does not send error messages on malformed addresses. It does | |
50 not much check for syntax. It detects general errors (unexpected EOF, | |
51 no recipients, max message size exceeded) (see masqmail.c:mode_accept()) | |
52 but simply prints a message to stderr and exits non-zero. I think that | |
53 currently it is not of need to add some elaborate error handling in | |
54 this area. Hence, for the implementing of -oem and -oee would do assume | |
55 that sending the error message does always fail (because we never send | |
56 any such message) and hence we exit non-zero on error. This is the | |
57 similar behavior of both options. | |
58 | |
59 From 0.3.1 on masqmail will not recognize -oem anymore and thus ignore | |
60 it like any unknown -oXXX option. It's behavior is then as if error | |
61 message sending fails. | |
62 | |
63 Remind that all this affects only the case of accepting non-SMTP messages | |
64 on stdin. | |
65 | |
66 | |
67 On the relationship of -oi and -oem | |
68 ----------------------------------- | |
69 | |
70 It seems as if the two options should not affect each other; in contrast | |
71 to the behavior in masqmail before 0.3.1. Their relationship is just | |
72 that -oem does only affect non-SMTP messages on stdin, which is the | |
73 typical use case of -oi. | |
74 | |
75 | |
76 meillo |