The postfix service not active, I try to activate the service but drops

/$ free -h
total used free shared buff/cache available
Mem: 7.8Gi 4.4Gi 3.0Gi 138Mi 721Mi 3.3Gi
Swap: 0B 0B 0B

/$ systemctl status postfix
× postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: failed (Result: oom-kill) since Wed 2023-03-29 18:20:58 CEST; 3min 59s ago
Duration: 27.652s
Process: 10394 ExecStartPre=/usr/sbin/restorecon -R /var/spool/postfix/pid/master.pid (code=exited, status=0/SUCCESS)
Process: 10395 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
Process: 10397 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
Process: 10398 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
Process: 10744 ExecStop=/usr/sbin/postfix stop (code=exited, status=0/SUCCESS)
Main PID: 10479 (code=killed, signal=TERM)
CPU: 1min 21.368s

Mar 29 18:20:58 System hostname postfix[10750]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
Mar 29 18:20:58 System hostname postfix[10750]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
Mar 29 18:20:58 System hostname postfix[10750]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
Mar 29 18:20:58 System hostname postfix[10750]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
Mar 29 18:20:58 System hostname postfix[10750]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
Mar 29 18:20:58 System hostname postfix[10750]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
Mar 29 18:20:58 System hostname postfix/postfix-script[10753]: stopping the Postfix mail system
Mar 29 18:20:58 System hostname postfix/master[10479]: terminating on signal 15
Mar 29 18:20:58 System hostname systemd[1]: postfix.service: Failed with result ‘oom-kill’.
Mar 29 18:20:58 System hostname systemd[1]: postfix.service: Consumed 1min 21.368s CPU time.

Copied just to format it.

You did something to your master.cf can you not see the Warnings? always good to do a backup of config files before messing around with them.

Whatever you did to your master.cf is sending it in a loop. Fix your parameters and it will go away and allow your postfix to start.

Yeah. I’m not familiar with the code but starting with 3Gi head room, no way this should run out of memory. And the warnings are new? They don’t appear in the output above.

@joe might be able to tell you a safe reinstall path. I can’t.

Is this procmail command correct? It could also interfere with the action of the postfix.
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

Looked right. I only know because I had a problem with it so I double checked. That’s what mine is.

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

And I made some changes recommended by Postfix SMTP relay and access control.
Thank you for your information.

Considering this time when everyone helped me to try to find the problem but, as it continues to make it impossible to read and receive the emails, I will reinstall Webmin / Virtualmin and the 06 active domains.
My thanks to all.

With the withdrawal of the external command in Postfix Mail Server - Local Delivery 
 /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
I’m getting the emails normally. The submission is not yet resolved.

I don’t know what you mean by “withdrawal of”. Do you mean you switched back to the default Postfix deliver agent?

If so, you’re losing all the Virtualmin mail handling features (spam/AV scanning, forwarding, auto-responders, etc.).

Are you on an ARM system? ARM is not a supported architecture, we don’t have repos ARM, so if you installed on ARM, you’re missing procmail-wrapper. Though Ilia has posted a procmail-wrapper package for ARM a couple of times in the forum.

I deleted the external command line from Postfix and the local emails (system) started to arrive.

I disabled that I could to try to find the problem, including disabling the vm’s of the websites. Now, after reactivating, I only have clamAV disabled. The external procmail command is active. POSTFIX is and remains enabled.

That doesn’t reduce anything. It makes it much more resource intensive on a server that processes more than a few mails a day.

I don’t think you’ve posted any logs. We have to see logs to know why something is failing.

/var/log/maillog and possibly journalctl -fu postfix (you have to start tailing the journal before you try to restart postfix, so we see whatever is relevant to it starting and shutting down).

$ journalctl -fu postfix
Mar 31 13:20:53 ss0.li9.com.br postfix/smtpd[22908]: connect from unknown[46.148.40.145]
Mar 31 13:20:54 ss0.li9.com.br postfix/smtpd[22909]: connect from unknown[20.243.250.20]
Mar 31 13:20:58 ss0.li9.com.br postfix/smtpd[22909]: warning: unknown[20.243.250.20]: SASL LOGIN authentication failed: authentication failure
Mar 31 13:20:58 ss0.li9.com.br postfix/smtpd[22909]: disconnect from unknown[20.243.250.20] ehlo=1 auth=0/1 quit=1 commands=2/3
Mar 31 13:20:59 ss0.li9.com.br postfix/smtpd[22649]: connect from unknown[46.148.40.114]
Mar 31 13:21:02 ss0.li9.com.br postfix/smtpd[22909]: connect from unknown[46.148.40.198]
Mar 31 13:21:02 ss0.li9.com.br postfix/smtpd[22649]: warning: unknown[46.148.40.114]: SASL LOGIN authentication failed: authentication failure
Mar 31 13:21:03 ss0.li9.com.br postfix/smtpd[22649]: lost connection after AUTH from unknown[46.148.40.114]
Mar 31 13:21:03 ss0.li9.com.br postfix/smtpd[22649]: disconnect from unknown[46.148.40.114] ehlo=1 auth=0/1 rset=1 commands=2/3
Mar 31 13:21:07 ss0.li9.com.br postfix/smtpd[22908]: warning: unknown[46.148.40.145]: SASL LOGIN authentication failed: authentication failure
Mar 31 13:21:09 ss0.li9.com.br postfix/smtpd[22908]: lost connection after AUTH from unknown[46.148.40.145]
Mar 31 13:21:09 ss0.li9.com.br postfix/smtpd[22908]: disconnect from unknown[46.148.40.145] ehlo=1 auth=0/1 rset=1 commands=2/3
Mar 31 13:21:13 ss0.li9.com.br postfix/smtpd[22649]: connect from unknown[46.148.40.140]
Mar 31 13:21:14 ss0.li9.com.br postfix/smtpd[22909]: warning: unknown[46.148.40.198]: SASL LOGIN authentication failed: authentication failure
Mar 31 13:21:17 ss0.li9.com.br postfix/smtpd[22909]: lost connection after AUTH from unknown[46.148.40.198]
Mar 31 13:21:17 ss0.li9.com.br postfix/smtpd[22909]: disconnect from unknown[46.148.40.198] ehlo=1 auth=0/1 rset=1 commands=2/3
Mar 31 13:21:23 ss0.li9.com.br postfix/smtpd[22649]: warning: unknown[46.148.40.140]: SASL LOGIN authentication failed: authentication failure
Mar 31 13:21:25 ss0.li9.com.br postfix/smtpd[22649]: lost connection after AUTH from unknown[46.148.40.140]
Mar 31 13:21:25 ss0.li9.com.br postfix/smtpd[22649]: disconnect from unknown[46.148.40.140] ehlo=1 auth=0/1 rset=1 commands=2/3

I really appreciate the effort to solve this problem but, I go to my ISP to reinstall the webmin that for me is very complete and deserves my fight. Hopefully at some point in the future I’ll find out where the error occurred. So I can start the new week with all the websites and emails active.
Best regards.
Sergio Siqueira