Bug 148338 - Writer Mail Merge Failure with one-letter domain names
Summary: Writer Mail Merge Failure with one-letter domain names
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL: https://ask.libreoffice.org/t/mail-me...
Whiteboard: target:7.4.0 target:7.3.3
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2022-04-03 16:56 UTC by Erik Fjerstad
Modified: 2022-04-08 14:40 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Fjerstad 2022-04-03 16:56:29 UTC
Description:
7.4.0.0 April 2 dev version successfully mail merges and emails, but fails to send email for single letter domain names such as "@q.com".  Further, the email function quickly flashes through the process without pausing upon completion to show statistics on how many emails were sent, how many failed, with a detail list of the email address used (as open office used to for same function).

Steps to Reproduce:
1. Create email database with at least one address with q.com as the mail server.  You can use erikfjer@q.com as I confirm this address does not exist on q.com
2. Create a document with the email field visible
3. Process the mail merge, note correct email address (with q.com) in document
4. Select the email function, identifying the email field
5. Observe mail process to apparently finish correctly, without any reported error.
6. Manually using an email client, send an email to the q.com address used in the mail merge.  Note the quick response from q.com for "address not found", yet note that no such message was received for the mail merged process.

In the "open office" version, this would have resulted in an error reported in the mail merge email dialogue as "invalid email address".  Libre Office Writer provides no such warning.  The workaround I discovered and used in Open OFfice was to place a space after the single letter domain, which somehow Open Office accepted and successfully sent.  In the example "erikfjer@q .com" was processed successfully by open office writer mail merge.  This workaround does not seem to work with Libre Office Writer Mail Merge, as the q.com server didn't respond with an error and Libre Office didn't report any issues either. 

Actual Results:
No reported errors, email to q.com domain failed.

Expected Results:
Some form of warning about an invalid email address, at least what Libre Office (and open office before it) considered invalid - an address with a single letter domain name.  Single letter domain names, while rare, are legal and should be accepted.  Also, the email process should provide statistics on how many emails were sent and how many failed.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Previously reported for open office
https://bz.apache.org/ooo/show_bug.cgi?id=98153
Comment 1 Mike Kaganski 2022-04-03 17:06:17 UTC
https://gerrit.libreoffice.org/c/core/+/132482
Comment 2 Commit Notification 2022-04-03 18:49:39 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1ea95f05ee8ec496c628bd11750d23cc012c7fe4

tdf#148338: allow single-letter lowest-level domain

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2022-04-04 11:13:52 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/9e889c39feef8bc8da0adc498f9ad7f5bad4542d

tdf#148338: allow single-letter lowest-level domain

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Mike Kaganski 2022-04-04 11:35:07 UTC
(In reply to Erik Fjerstad from comment #0)
> Further, the
> email function quickly flashes through the process without pausing upon
> completion to show statistics on how many emails were sent, how many failed,
> with a detail list of the email address used (as open office used to for
> same function).
> 
> ...
> 
> Expected Results:
> Some form of warning about an invalid email address, at least what Libre
> Office (and open office before it) considered invalid - an address with a
> single letter domain name.  ....  Also, the email process should provide
> statistics on how many emails were sent and how many failed.

Please report the missing statistics issue separately. This one is devoted to the one-character domain name support (as per its title), and is fixed now :-)
Comment 5 Erik Fjerstad 2022-04-07 17:59:07 UTC
I tested the daily win64 7.4.0.0 for both 5 and 7 April versions and both failed my objective test for single letter domain email merge.  I used my email address (@gmail.com) and a modified one with @gmail.com replaced with @q.com   When emailing to that address (via gmail) with q.com I get a prompt error of "no such address" returned by the q.com mail server.  When sending to these two domains (gmail.com and q.com) via LO email mail merge, the gmail.com message promptly goes through, but there is no response (error message) introduced by the q.com address.  My conclusion is that the mail merge process didn't send that message to the q.com server.  The dialog flashes by too quickly to see exactly what is happening (another bug under review), but appears to suggest the 2 messages were sent correctly as far as LO is concerned.
Comment 6 Mike Kaganski 2022-04-07 20:19:46 UTC
(In reply to Erik Fjerstad from comment #5)

It definitely sends the mail to 1-char domain. I tested it, and I get bounces consistently. It goes from LibreOffice, reaches SMTP server, and then it's out of LibreOffice's responsibility.

You need to debug this locally to find out what might be wrong.
Comment 7 Mike Kaganski 2022-04-07 20:31:59 UTC
(In reply to Erik Fjerstad from comment #5)
The dialog
> flashes by too quickly to see exactly what is happening (another bug under
> review)

Note that the dialog is fixed to stay *on errors*. I don't think it needs to stay to say that everything went OK. So it is fine that it just flashes when there's no errors.
Comment 8 Erik Fjerstad 2022-04-08 14:40:26 UTC
Further research confirms the single-letter domain now works.  The bounce-back from the server (wne using LO mail merge) due to "no such address" was getting filtered into my spam folder whereas testing the single letter domain email address via my gmail client would bounce back into my primary folder.  Such bounce-backs from mail merge (using my available SMTP server) previously weren't treated as spam, so I hadn't been looking there.
Thanks for fixing this!
Erik