Page 1 of 1

Force Relay information update on mailwatch

Posted: 21 Nov 2020 05:25
by victorburgos
Hi, thanks in advance for your help.
I need to know how can I manually update relay information for my messages.
I need to do this because there is a strange behavior and some messages have relay info and others do not.

This is a message with correct relay info updated after a few minutes when the email has been delivered:
relay information.png
relay information.png (16.39 KiB) Viewed 2979 times
This is another message without relay information that is never updated (message has been delivered correctly):
no relay information.png
no relay information.png (22.25 KiB) Viewed 2979 times
What command should I run to update this section?
I have tried
  • php /usr/bin/mailwatch/tools/Postfix_relay/mailwatch_mailscanner_relay.php --refresh
  • php /usr/bin/mailwatch/tools/Postfix_relay/mailwatch_postfix_relay.php --refresh
I have waited several hours and some are updated but other are never updated and I know the message has been delivered correctly.
Using MailScanner v1.2.15 running on eFa-4.0.3

Re: Force Relay information update on mailwatch

Posted: 21 Nov 2020 14:37
by shawniverson
Those scripts are systemd controlled. Have you tried restarting the services for them instead?

Re: Force Relay information update on mailwatch

Posted: 21 Nov 2020 23:51
by victorburgos
Thanks shawniverson, I found 2 services:
  • postfix_relay
  • milter_relay
I already have relay information.

One additional question:
Is relay information updated in real time by these services or is it done via cron job and how often?
I would like to understand better how this process works and who to speed it up when I need to check if messages have been delivered correctly.
Without that line, I have to ssh to efa, and grep logs which takes a lot of time.

Thanks.

Re: Force Relay information update on mailwatch

Posted: 22 Nov 2020 12:48
by shawniverson
Those both run continuously in the background and monitor the logs for relay information. In cases of high mail volume, it can take time to process the backlogs.

Re: Force Relay information update on mailwatch

Posted: 01 Dec 2020 22:27
by victorburgos
Thanks for your help.
I have been monitoring this issue for a few days and this is what I have found:
Unexpectedly, all relay information stops updating on all messages.
I then restart milter_relay and postfix_relay services and they start working again for a few hours and then relay information stops again.

I notice that there is no sub-process cat /var/log/maillog process when relay information is not updated.
How can I find out why is this sub-process stopping?
relay information problem efa.png
relay information problem efa.png (378.56 KiB) Viewed 2847 times

Re: Force Relay information update on mailwatch

Posted: 02 Dec 2020 21:41
by shawniverson
That is actually supposed to happen, except the not logging part. It cat's the log until it is caught up then it is supposed to follow it from that point forward, so the cat is not longer needed.

Re: Force Relay information update on mailwatch

Posted: 04 Dec 2020 18:54
by victorburgos
Thank you Shawniverson for helping me understand how this process works.
I have been checking that the services are running and it seems to be working fine.

Maybe the service was down while the problem was present and I was not aware of it.