Merge Mail Wizard hangs - How to debug?

I’m trying to use the Merge Mail Wizard on LO

Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: nl-BE (nl_BE.UTF-8); UI: nl-NL
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3
Calc: threaded 
Linux Mint 21.1 Cinnamon

The Wizard starts with processing the documents and shows that the connection with server is established. But the number of e-mails sent remains zero. After a while I get a notification that LO is not responsive. It looks that LO is hanging. Is there a way to debug the sequence in order to find out what is causing the problem? I noticed a message in the system log audit: type=1400 audit(1686505668.427:52): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/etc/ssl/openssl.cnf" pid=6536 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 but I don’t have a clue what that means.

I guess you can ignore this one. You/Your distribution uses a security-setting named AppArmor. This “ALLOWED” LibreOffice to read (requested_mask=“r”) a file ( /etc/ssl/openssl.cnf )
.
As access was allowed you may assume this as not troubling the process.
.
One additional hint: IMHO it is not necessary to use the wizard, but without knowing what is the problem, we can’t know, if this approach would work around the problem, or fail as well. If only sending mails is the problem I guess both methods will fail at the same point.

Mailmerge actual communication is implemented using a python script scripting/source/pyprov/mailmerge.py, which you may find in your installation directory, and then edit to debug.

  1. There’s a dbg variable (ln. 51), set to false by default. Change to true to enable pre-defined debug output to console.
  2. You may of course add more points of output if needed.

Thank you. I found the script in /lib/libreoffice/program. The logging ends with

PyMailSMTPService isConnected
XSL Vendor: ‘libxslt’

I don’t see who is generating “XSL Vendor: ‘libxslt’”. I was expecting to have a log of getCurrentConnectionContext(self) or even sendMailMessage(self, xMailMessage):

I also notice that the dialog is stealing focus while hanging. The logging doesn’t bring me any further. It confirms that the connection is established.

No. It only tells that isConnected method was called, and doesn’t tell which result it returned.

opendoc2xhtml.xsl (revision d2e8705c) - OpenGrok cross reference for /core/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl - indicates that a conversion happens from ODF to HTML, using XSLT - and that could take huge time… I remember issues like tdf#65980.

I’d suggest to experiment, if options how to send the document make any difference.

1 Like

I think that the connection is ok

reply: b’235 2.0.0 OK Authenticated\r\n’
reply: retcode (235); Msg: b’2.0.0 OK Authenticated’
PyMailSMTPService isConnected
XSL Vendor: ‘libxslt’

2yz is a positive SMTP returncode
2yz (Positive Completion Reply): The requested action has been successfully completed.

The file to be converted is only 2 lines long. It is a test to see how the Merge Mail is working. The personalized files are generated nearly instantaneously. I’ll try another distribution to check if this behaviour is distro-related. Anyhow I have the same problem on 2 different LinuxMint-computers.

I installed Ubuntu 23.04 and Merge Mail Wizard works fine! So this is a problem related to Linux Mint 21.1 Cinnamon