Page 1 of 1

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

Posted: Tue Jul 27, 2021 10:08 am
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

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

Posted: Tue Jul 27, 2021 11:53 pm
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

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

Posted: Wed Jul 28, 2021 10:24 am
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

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

Posted: Wed Jul 28, 2021 2:08 pm
by cdambrosio
Hi ud,
I confirm that your change to the code works perfectly also in our environment.

Thank you.

Regards,

Carlo

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

Posted: Thu Jul 29, 2021 3:28 pm
by maschoff
Thnaks for your confirmation! 21.04.000.118 will be available via OMT update within the next hour.