Sendmail /etc/mail/mailertable and /etc/mail/relay-domains continuously updated by bav-update3.py

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

cdambrosio
Posts: 35
Joined: Thu Oct 08, 2020 5:40 pm

Sendmail /etc/mail/mailertable and /etc/mail/relay-domains continuously updated by bav-update3.py

Post by cdambrosio »

Hi,
we have a problem with OpenEMM version 21.04.000.116.

We've configured everithing just like our configuration of version 20.10, but the files /etc/mail/mailertable and /etc/mail/relay-domains are continuously updated by bav-update3.py, that inserts many times the same domain.

Example of /etc/mail/mailertable:
ourdomain.domain.org procmail:/home/openemm/lib/bav.rc
ourdomain.domain.org procmail:/home/openemm/lib/bav.rc
ourdomain.domain.org procmail:/home/openemm/lib/bav.rc

Example of our /etc/mail/relay-domains
ourdomain.domain.org
ourdomain.domain.org
ourdomain.domain.org

It seems that bav-update3.py doesn't recognize the domain ourdomain.domain.org as already inserted and continue to insert it (for now three times, but it inserts a new row every three minutes...).

Could you please help us to solve this problem?

Thank you.

Regards,

Carlo
cdambrosio
Posts: 35
Joined: Thu Oct 08, 2020 5:40 pm

Re: Sendmail /etc/mail/mailertable and /etc/mail/relay-domains continuously updated by bav-update3.py

Post by cdambrosio »

Hi all,
I've checked the file bav-update3.py and I've made the following changes.

I've inserted the following piece of code between rows 493 and 494, at the same level of indentation of the next if statement (if new_domains:...):

Code: Select all

			#
			for domain in new_domains.copy():
				if domain in self.mtdom:
					del new_domains[domain]

In this way, the domain isn't added, more than one time, in files /etc/mail/mailertable and /etc/mail/relay-domains.

Let me know what do you think of this solution.

Thank you.

Regards,

Carlo
ud
Posts: 154
Joined: Thu Aug 17, 2006 9:56 am
Location: Munich, Germany
Contact:

Re: Sendmail /etc/mail/mailertable and /etc/mail/relay-domains continuously updated by bav-update3.py

Post by ud »

Hello Carlo,

thank you for your report, investigation and solution. This is a bug and it will be fixed in version 21.04.000.118. As your solution seems to work, but "heals the symptom", I changed the code to fix the real problem for this case. If you wish you can apply the change by yourself and check, if it really fixes the problem for you as well (at least in our test system it worked). In line 342

Code: Select all

seen_domains.add (domain)
you should just remove one tab at the beginning of the line to move the code from the scope of the if block to the for loop.

-- ud
cdambrosio
Posts: 35
Joined: Thu Oct 08, 2020 5:40 pm

Re: Sendmail /etc/mail/mailertable and /etc/mail/relay-domains continuously updated by bav-update3.py

Post by cdambrosio »

Hi ud,
I confirm that your change to the code works perfectly also in our environment.

Thank you.

Regards,

Carlo
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Sendmail /etc/mail/mailertable and /etc/mail/relay-domains continuously updated by bav-update3.py

Post by maschoff »

Thnaks for your confirmation! 21.04.000.118 will be available via OMT update within the next hour.
OpenEMM Maintainer
Post Reply