Error sending emails to Office 365 after MailScanner upgrade

Bugs in eFa 4
Post Reply
Glaster
Posts: 11
Joined: 10 Dec 2014 21:29

Error sending emails to Office 365 after MailScanner upgrade

Post by Glaster »

Hi All,
MailScanner and MariaDB were automatically updated today with the result:

Code: Select all

/etc/cron.daily/0yum-daily.cron:

warning: /etc/my.cnf.d/mariadb-server.cnf created as /etc/my.cnf.d/mariadb-server.cnf.rpmnew
warning: /etc/MailScanner/MailScanner.conf created as /etc/MailScanner/MailScanner.conf.rpmnew
Added new: Lockfile Dir = /var/spool/MailScanner/incoming/Locks
Added new: include /etc/MailScanner/conf.d/*

Summary
-------
Read 390 settings from old /etc/MailScanner/MailScanner.conf.original
Used 389 settings from old /etc/MailScanner/MailScanner.conf.original
Used 3 default settings from new /etc/MailScanner/MailScanner.conf.dist


Preparing to update eFa...
checkmodule:  loading policy configuration from /var/eFa/lib/selinux/eFa.te
checkmodule:  policy configuration loaded
checkmodule:  writing binary representation (version 19) to /var/eFa/lib/selinux/eFa.mod ERROR 1292 (22007) at line 46: Incorrect datetime value: '1970-01-01 00:00:01' for column ``.``.`lastsent` at row 1 Update completed successfully!
The following updates will be applied on av01.vyvo.cz:
================================================================================
 Package                Arch        Version                     Repository
                                                                           Size ================================================================================
Installing:
 eFa                    noarch      1:4.0.4-38.eFa.el7          eFa4      125 k
     replacing  mariadb102.x86_64 3:10.2.30-1.el7.ius
     replacing  mariadb102-common.x86_64 3:10.2.30-1.el7.ius
     replacing  mariadb102-errmsg.x86_64 3:10.2.30-1.el7.ius
     replacing  mariadb102-libs.x86_64 3:10.2.30-1.el7.ius
     replacing  mariadb102-server.x86_64 3:10.2.30-1.el7.ius
Updating:
 MailScanner            noarch      5.4.5-1.eFa.el7             eFa4      601 k
 unrar                  x86_64      6.1.7-1.eFa.el7             eFa4      132 k
Installing for dependencies:
 mariadb104             x86_64      3:10.4.17-1.el7.ius         ius       6.2 M
 mariadb104-common      x86_64      3:10.4.17-1.el7.ius         ius        68 k
 mariadb104-errmsg      x86_64      3:10.4.17-1.el7.ius         ius       233 k
 mariadb104-libs        x86_64      3:10.4.17-1.el7.ius         ius       158 k
 mariadb104-server      x86_64      3:10.4.17-1.el7.ius         ius        17 M
 php74-gmp              x86_64      7.4.30-1.el7.ius            ius        78 k

Transaction Summary
================================================================================
Install  1 Package  (+6 Dependent packages) Upgrade  2 Packages The updates were successfully applied
/etc/cron.daily/trim-txrep:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
The issue with connecting to the MySQL server was resolved by restarting the entire VM.
Unfortunately, since then emails are not sent to Office 365 to the destination server: princ-cz.mail.protection.outlook.com
Emails remain in the outgoing queue with an explanation:
(Host or domain name not found. Name service error for name=princ-cz.mail.protection.outlook.com type=A: Host not found, try again)
I've tried via shell nslookup to different servers, also ping and all of them work except for the server mentioned above.
It was working without problems until yesterday.

Where could be the problem that only this DNS entry can't be forwarded/translated??

In /etc/resolv.conf I have:

Code: Select all

nameserver 127.0.0.1
In /etc/MailScanner/spamassasin.conf is:

Code: Select all

dns_available yes
dns_server 127.0.0.1
In /etc/unbound/conf.d/forwarders.conf I have:

Code: Select all

forward-zone:
  name: "."
  forward-addr: 193.17.47.1      # First DNS Server
  forward-addr: 185.43.135.1      # Second DNS Server
  forward-first: yes
Finaly I set NetworkManager:

Code: Select all

nmcli con mod ens192 ipv4.dns "127.0.0.1"
nmcli con mod ens192 ipv4.ignore-auto-dns yes
nmcli con down ens192
nmcli con up ens192

Thanks for any help.
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Error sending emails to Office 365 after MailScanner upgrade

Post by shawniverson »

Make sure unbound is running.

Code: Select all

systemctl status unbound
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Error sending emails to Office 365 after MailScanner upgrade

Post by shawniverson »

You also may want to clear the cache in unbound.

Code: Select all

sudo unbound-control flush_zone outlook.com
sudo unbound-control flush_zone protection.outlook.com
sudo unbound-control flush_zone mail.protection.outlook.com
Glaster
Posts: 11
Joined: 10 Dec 2014 21:29

Re: Error sending emails to Office 365 after MailScanner upgrade

Post by Glaster »

Thank You for quick reply.
unbound is running:

Code: Select all

● unbound.service - Unbound recursive Domain Name Server
   Loaded: loaded (/usr/lib/systemd/system/unbound.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/unbound.service.d
           └─override.conf
   Active: active (running) since Wed 2022-07-06 11:45:36 CEST; 3h 58min ago
  Process: 1921 ExecStartPre=/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem -f /etc/resolv.conf -R (code=exited, status=0/SUCCESS)
  Process: 1866 ExecStartPre=/usr/sbin/unbound-checkconf (code=exited, status=0/SUCCESS)
 Main PID: 2609 (unbound)
   CGroup: /system.slice/unbound.service
           └─2609 /usr/sbin/unbound -d

Jul 06 11:45:18 av01.vyvo.cz systemd[1]: Starting Unbound recursive Domain Name Server...
Jul 06 11:45:18 av01.vyvo.cz unbound-checkconf[1866]: unbound-checkconf: no errors in /etc/unbound/unbound.conf
Jul 06 11:45:36 av01.vyvo.cz systemd[1]: Started Unbound recursive Domain Name Server.
Jul 06 11:45:36 av01.vyvo.cz unbound[2609]: [2609:0] notice: init module 0: ipsecmod
Jul 06 11:45:36 av01.vyvo.cz unbound[2609]: [2609:0] notice: init module 1: validator
Jul 06 11:45:36 av01.vyvo.cz unbound[2609]: [2609:0] notice: init module 2: iterator
Jul 06 11:45:36 av01.vyvo.cz unbound[2609]: [2609:0] info: start of service (unbound 1.11.0).
Jul 06 11:45:46 av01.vyvo.cz unbound[2609]: [2609:3] info: generate keytag query _ta-4f66. NULL IN
Jul 06 14:39:42 av01.vyvo.cz unbound[2609]: [2609:3] info: validation failure dc10.lanmis.local. A IN
Jul 06 14:39:42 av01.vyvo.cz unbound[2609]: [2609:3] info: validation failure dc11.lanmis.local. A IN

I tried clearing the cache in unbound as you suggested, so we'll see if that helps.
I'll let you know.
Glaster
Posts: 11
Joined: 10 Dec 2014 21:29

Re: Error sending emails to Office 365 after MailScanner upgrade

Post by Glaster »

It works.
Many thanks
alshain
Posts: 2
Joined: 26 May 2016 21:38

Re: Error sending emails to Office 365 after MailScanner upgrade

Post by alshain »

Hello,
same issue for me this morning after the auto upgrade.
A test with telnet to the O365's server, returned the message of 'host not found'. The reboot of the system didn't resolve the problem and the 'unbound' service was running.
For the urgency to empty the outbound queue, I added a public nameserver in the file /etc/resolv.conf for temporarily solving the problem.
So, I noticed that into the file there weren't any nameserver directive. I added 'nameserver 127.0.0.1' to solve the problem.

I will try to clear the cache too.

Regards.
Post Reply