Mail binding showing warning


after upgrading vom OpenHAB 2.4 to 2.5 I needed to switch from the mail action to the mail binding.

I have set up the code according to the documentation of the binding. SendMail is working, but a debug log entry is written every time:

[WARN ] [javax.mail ] - expected resource not found: /META-INF/

I am aware that there are other threads for similar topics, in this community and on GitHub. However, none of them contains an actual solution.

There is no “actual solution”. The distribution’s default logging configuration suppresses this message.

1 Like

I get the same warning but when I look in org.ops4j.pax.logging.cfg there are no filters of javaxmail.
I found a file with the name “org.ops4j.pax.logging.cfg.dpkg-dist” which contains the filter.
The date of this file is the same as the release date of openhab 2.5.0, 2019-12-15.
Is it recommended to replace the old file?
I’m not very good on Linux so I found the following instructions in another thread,

cd /var/lib/openhab2/etc
sudo mv org.ops4j.pax.logging.cfg org.ops4j.pax.logging.cfg.old
sudo mv org.ops4j.pax.logging.cfg.dpkg-dist org.ops4j.pax.logging.cfg 

Is this OK?

I’m not sure. I’d suggest you do a diff of the two files to see what’s different.

diff org.ops4j.pax.logging.cfg org.ops4j.pax.logging.cfg.dpkg-dist

Alternatively, you could just edit org.ops4j.pax.logging.cfg to add the following lines.

# Filters known issues of javax.mail, see
# = javax.mail
log4j2.logger.javaxmail.level = ERROR

Either way you go, I’d suggest you shut down OH before making the changes.

I have the same problem but the content of the file within OH 3.1.x is


I guess this refers the log4j2.xml in the same directory.

This contains the following entry

 <!-- Filters known issues of javax.mail, see -->
 <!-- -->
 <Logger level="ERROR" name="javax.mail"/>```

Somehow it seems it is not suppressing the warning.