nextcloud / nextcloud/mail

Don't check MX records for autoconfig

Open
#2,265 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Expected behavior

It should query the autoconfig server for the domain of the email address.

Actual behavior

The MX record of the domain is queries and then autoconfig.MX is queried which is wrong.
The MX record is only for other mail SERVERS. It has absolute no meaning for mail clients. The server for mail clients can be a total different server in a different domain. A mail client should not care at all about the MX record.
The correct address would be autoconfig.domain. See https://wiki.mozilla.org/Thunderbird:Autoconfiguration
The actual implementation might work for some bogous setups. I have here especially Cpanel administrated domians in mind. In most setups Cpanel is setting the MX record to the domain name which is wrong. According to the SMTP RFC the MX record has to be a full qualified hostname and not a domain name.

Mail app

Mail app version: 0.18.1

Mailserver or service: Own setup with postfix and dovecot spread over 4 servers and 3 domains.

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache 2.4

Database: MariaDB

PHP version: 7.2

Nextcloud Version: 17.0.1


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the mail autoconfiguration lookup and the code that queries the domain's MX record. Confirm how the email domain is converted into the autoconfig server address. Done means the client queries autoconfig.domain directly without first querying the domain's MX record.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.