-
Notifications
You must be signed in to change notification settings - Fork 30
qmail-remote: remove flagcname, deprecated feature #121
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
Conversation
|
At first glance looks good. If you change the interface of a function please convert it to C89 style. |
1e565b6 to
3e80936
Compare
|
If someone knows about the idea behind |
3e80936 to
544013c
Compare
|
In general I think this is correct. I have not really looked into the code, i.e. what it is actually doing, and I don't want this in 1.08 if we don't agree on that on a broader scope. So, no +1 for me for the moment, but it will likely happen. |
|
Sure, this has been wrong since 2008 so one release more or less doesn't matter. ;) |
What is .pref and where is it taking its data from?In The position, preference and IP of the MX record are passed through static global variables to For each result, What is the effect of comparing prefme with each ip[].ix.pref from DNS?Just below Just above That filters out all the MX entries that have a lower preference than qmail's own IPs. That looks like having the effect of capturing the mail in case qmail-remote has to send it out, but the server it send it to has the same IP (in other words: send a mail to myself through IP). It is still possible to send a mail to another mail server among the MX entries, even if there is an IP of the local interface in the pool of MX responses : with a lower MX than the one that match our IPs. This looks like a safeguard against misconfiguration: a mail for a same IP as one of which qmail listen on needs to be send through Why a high value for prefme in some cases?When the mail server needs to relay everything to somewhere (special case), or for these addrmangle cases (tricky cases), Why 500000, why not 5725 or 42?No idea! Debugging purposes? https://tools.ietf.org/html/rfc1035#section-3.3.9 says int16, so it maxes out to 65536. A A note on anycast BGPIn some situations, a public address might be at the same time on the interface onto which qmail listens, and another remote host, all that legitimately: Anycast BGP, for which the same IP is announced at multiple places, and the routing will make it go to the closest available. The safeguard mechanism will still match the semantics of anycast BGP: if it reached any of that host with the one IP declared in DNS, the mail is home. If there is something more to do (like backup to master mx transfer), a lower priority has can be setup, and the mail will never be stuck on a relay, even if the same IP is on multiple hosts ("weird setups"). [EDIT: is there any place where we may document the working of qmail? On the wiki/website, in the repo on text files? That could help with consolidating/checking what we understand of qmail, and help newcomers (that I still am) to understand the context of what they touch] |
|
The purpose of the prefme loop is to always forward mail to a higher-priority (= lower number) MX; if we are a relayhost, any MX is good. But why the special case for flagallaliases? |
|
I am not sure. I imagine it is so that it is actually sent out, even if it is to the same server, so that it goes through the whole chain with the new domain name, in case it behaves differently |
|
I'm not sure either, as from all I can see there can never be a pref > 0xffff. It is set in dns_mxip() to the 16 bit value from the DNS, or in dns_ip() to 0. It feels a bit like body-stripping, let it rest in pieces. |
544013c to
d2e6815
Compare
|
I have looked around a bit, and not even the SPF patch uses This also needs a changelog entry and the corresponding sections from the FAQ should be removed. |
|
On Fri, 1 May 2020 at 16:10, Rolf Eike Beer ***@***.***> wrote:
I have looked around a bit, and not even the SPF patch uses dns_cname(),
so I guess there is no use for it anymore.
This also needs a changelog entry and the corresponding sections from the
FAQ should be removed.
There is one more target in Makefile - dnscname.c. It uses dns_cname() and
it gets compiled and linked but doesn't get installed as it is not in
hier.c. So this code is just lying there without any real use. This too
needs to be removed.
|
|
This is already gone in master, I think: |
|
From my feeling the last two patches should be squashed into the first one, which actually removed that feature. The other ones could optionally be squashed in or just kept as they are. |
| } | ||
| if (!stralloc_copys(&canonbox,s)) temp_nomem(); | ||
| canonbox.len = j; | ||
| /* box has to be quoted */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems clear enough already from the following line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see now this was the still-relevant part of the comment from old line 279. I’m okay keeping or getting rid of it, either way.
f176b64 to
6f9fa93
Compare
6f9fa93 to
956fbbf
Compare
| } | ||
| if (!stralloc_copys(&canonbox,s)) temp_nomem(); | ||
| canonbox.len = j; | ||
| /* box has to be quoted */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see now this was the still-relevant part of the comment from old line 279. I’m okay keeping or getting rid of it, either way.
qmail-remote used to rewrite the RCPT TO: domain when it was a CNAME, as it was common before 2001. RFC 5321 (from 2008), Section 5.1 clearly specifies what MTA should do today: The lookup first attempts to locate an MX record associated with the name. If a CNAME record is found, the resulting name is processed as if it were the initial name. djb wrote in https://cr.yp.to/im/cname.html: Most implementors agree that this feature is not worth the implementation costs. I recommend that, before January 2001, sites stop relying on client-side CNAME translation, so that implementors can safely remove the feature at that time. Fixes notqmail#120.
956fbbf to
8182595
Compare
qmail-remote used to rewrite the RCPT TO: domain when it was a CNAME,
as it was common before 2001.
RFC 5321 (from 2008), Section 5.1 clearly specifies what MTA should do
today:
djb wrote in https://cr.yp.to/im/cname.html:
Fixes #120.