pmg-smtp-filter stopping [error]

thiagotgc

Well-Known Member
Dec 17, 2019
152
22
58
37
Was using without problems, with the previous version ...

After doing the update I started having these errors:

Code:
Jun 17 09:10:17 pmg.server.cloud pmg-smtp-filter[21771]: 2020/06/17-09:10:17 CONNECT TCP Peer: "[127.0.0.1]:60956" Local: "[127.0.0.1]:10024"
Jun 17 09:10:17 pmg.server.cloud pmg-smtp-filter[21771]: 406965EEA08294EDC8: new mail message-id=<CADWjxE3KffB5YGj79jB=64XQOoq1uWO2yud8c6qKSxZ6adM4jw@mail.gmail.com>
Jun 17 09:10:17 pmg.server.cloud pmg-smtp-filter[21771]: 406965EEA08294EDC8: can't exec clamdscan: Cannot allocate memory : ERROR at /usr/share/perl5/PMG/Utils.pm line 402.
Jun 17 09:10:18 pmg.server.cloud pmg-smtp-filter[20959]: 406AF5EEA08079ED64: SA score=0/5 time=34.198 bayes=undefined autolearn=unavailable autolearn_force=no hits=AWL(-0.261),DKIM_SIGNED(0.1),DKIM_VALID(-1),DKIM_VALID_AU(-0.1),DKIM_VALID_EF(-0.1),HTML_MESSAGE(0.001),RCVD_IN_DNSWL_LOW(-0.7),SPF_HELO_PASS(-0.001),SPF_SOFTFAIL(1),SUBJ_ALL_CAPS(0.2),URIBL_BLOCKED(0.001)
Jun 17 09:10:19 pmg.server.cloud pmg-smtp-filter[20894]: 409065EEA081F6DFD4: SA score=0/5 time=11.125 bayes=undefined autolearn=no autolearn_force=no hits=AWL(-0.142),DKIM_SIGNED(0.1),DKIM_VALID(-1),HTML_MESSAGE(0.001),KAM_MANYTO(0.2),KAM_NUMSUBJECT(0.5),RCVD_IN_DNSWL_LOW(-0.7),SPF_HELO_PASS(-0.001),SPF_SOFTFAIL(1),URIBL_BLOCKED(0.001)
Jun 17 09:10:19 pmg.server.cloud pmg-smtp-filter[20959]: 406AF5EEA08079ED64: accept mail to <user@domain.com> (E40369FF15) (rule: default-accept)
Jun 17 09:10:19 pmg.server.cloud pmg-smtp-filter[20959]: 406AF5EEA08079ED64: processing time: 35.623 seconds (34.198, 0.144, 0)
Jun 17 09:10:19 pmg.server.cloud pmg-smtp-filter[21800]: 2020/06/17-09:10:19 CONNECT TCP Peer: "[127.0.0.1]:60976" Local: "[127.0.0.1]:10024"
Jun 17 09:10:19 pmg.server.cloud pmg-smtp-filter[20681]: Starting "1" children
Jun 17 09:10:19 pmg.server.cloud pmg-smtp-filter[20681]: 2020/06/17-09:10:19 Bad fork [Cannot allocate memory]
                                                             at line 167 in file /usr/share/perl5/Net/pmg/PreFork.pm
Jun 17 09:10:19 pmg.server.cloud pmg-smtp-filter[21228]: WARNING: dns: select failed: Interrupted system call

No configuration or parameter has been changed.

Now, I need to restart the service every time I have new messages stopped in the queue

Currently free physical memory is 40%
 
* In what enviroment ist PMG running (container/VM/bare metal)?
* from the loglines it does look like a memory shortage - do you have some graphing of the PMG's resources?
* please post the output of:
Code:
free -m
ps auxwf
when the error occurs - also attaching strace to pmg-smtp-filter before this happens (and following all childs) should shed some light where the problem is.
 
  • Like
Reactions: thiagotgc
* In what enviroment ist PMG running (container/VM/bare metal)?
* from the loglines it does look like a memory shortage - do you have some graphing of the PMG's resources?
* please post the output of:
Code:
free -m
ps auxwf
when the error occurs - also attaching strace to pmg-smtp-filter before this happens (and following all childs) should shed some light where the problem is.


Thank you for your help.

At the time I was reporting about 40% free ram, disk with 30% free, CPU 60% free ...

Apparently there was no bottleneck.

However, I restarted the server, and so far it is working normally.

NOTE: I am suspicious that there were many pmg-smtp-filter processes open, and every time it stopped, it continued with an open session ...

I'll monitor, and post here
 
  • Like
Reactions: Stoiko Ivanov
I am no longer having trouble stopping services.

But I often get these messages.

pmg-smtp-filter[3212]: WARNING: Use of uninitialized value $ip in pattern match (m//) at /usr/share/perl5/PMG/RuleCache.pm line 245.
 
hmm - please post the output of `pmgversion -v` - thanks!
 
root@pmg:~# pmgversion -v
Code:
proxmox-mailgateway: not correctly installed (API: 6.2-5/05a7829e, running kernel: 4.9.182-mainline-rev1)
pmg-api: 6.2-5
pmg-gui: 2.2-2
clamav-daemon: 0.102.3+dfsg-0+deb10u1
libarchive-perl: 3.3.3-1
libjs-extjs: 6.0.1-10
libjs-framework7: 4.4.7-1
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-3
libpve-http-server-perl: 3.0-5
libxdgmime-perl: 0.01-5
lvm2: 2.03.02-3
pmg-docs: 6.2-2
pmg-log-tracker: 2.1.6-1
postgresql-11: 11.7-0+deb10u1
proxmox-mini-journalreader: 1.1-1
proxmox-spamassassin: 3.4.4-2
proxmox-widget-toolkit: 2.2-7
pve-xtermjs: 4.3.0-1
 
hmm - could not directly reproduce it but may be a small glitch in the source - please open a bug-report over at https://bugzilla.proxmox.com (referencing this thread) - thanks!

on another note - it seems that you don't have a pve-kernel installed (most likely unrelated to the issue) - is that planned and wanted?

thanks!
 
  • Like
Reactions: thiagotgc
hmm - could not directly reproduce it but may be a small glitch in the source - please open a bug-report over at https://bugzilla.proxmox.com (referencing this thread) - thanks!

on another note - it seems that you don't have a pve-kernel installed (most likely unrelated to the issue) - is that planned and wanted?

thanks!

OK, I'll open the ticket!

Yes, I am using this kernel to test my hosting due to the network problem.

Code:
root@pmg:~# pmgversion -v
proxmox-mailgateway: not correctly installed (API: 6.2-5/05a7829e, running kernel: 5.4.44-2-pve)
pmg-api: 6.2-5
pmg-gui: 2.2-2
pve-kernel-5.4: 6.2-4
pve-kernel-5.4.44-2-pve: 5.4.44-2
clamav-daemon: 0.102.3+dfsg-0+deb10u1
libarchive-perl: 3.3.3-1
libjs-extjs: 6.0.1-10
libjs-framework7: 4.4.7-1
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-3
libpve-http-server-perl: 3.0-5
libxdgmime-perl: 0.01-5
lvm2: 2.03.02-3
pmg-docs: 6.2-2
pmg-log-tracker: 2.1.6-1
postgresql-11: 11.7-0+deb10u1
proxmox-mini-journalreader: 1.1-1
proxmox-spamassassin: 3.4.4-2
proxmox-widget-toolkit: 2.2-7
pve-firmware: 3.1-1
pve-xtermjs: 4.3.0-1
 
Last edited: