Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Rename 2 methods: Headers -> EOH, Body -> EOM #25

Open
iredmail opened this issue Aug 22, 2022 · 4 comments
Open

Suggestion: Rename 2 methods: Headers -> EOH, Body -> EOM #25

iredmail opened this issue Aug 22, 2022 · 4 comments

Comments

@iredmail
Copy link

iredmail commented Aug 22, 2022

Dear all,

After read the Sendmail Milter document, i think 2 interface methods are not clear enough and i suggest renaming them:

  • Headers() -> EOH() (End of Headers)
  • Body() -> EOM() (End of Message)

Both Sendmail and Postfix documents use "EOH" and "EOM", and their meanings are clearer.
If this suggestion is accepted, i will send a new PR to rename them.

@emersion
Copy link
Owner

These 3-letter codes are pretty cryptic TBH. Maybe EndOfHeader/EndOfMessage would be more appropriate...

@iredmail
Copy link
Author

iredmail commented Aug 22, 2022

These 3-letter codes are pretty cryptic TBH.

Agree. But since this library is all about milter, and "EOH", "EOM" are used by milter doc, it should be clear enough in our situation.

But i'm ok with EndOfHeader and EndOfMessage too. Just give me the final decision. :)
By the way, we should use EndOfHeaders (ends with a s) instead of EndOfHeader.

@emersion
Copy link
Owner

By the way, we should use EndOfHeaders (ends with a s) instead of EndOfHeader.

The RFC folks say that it's an abuse to use "headers" (plural) when referring to a single message. Each message has exactly one header and multiple header fields.

@tdewolff
Copy link

Agreed with renaming the methods, it was confusing when reading about milters in other places.

Another confusion is that you can't modify headers from the HeaderField (currently Header) nor EndOfHeader (currently Headers) functions, but they do supply a Modifier argument, why? Same for Connect, Helo, RcptTo, MailFrom, and BodyChunk functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants