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

I increased the mysqld memory to test…

I only mentioned mysqld because that problem just popped up and that’s where I first saw the oom-killer. You might want to stop a few things and see if postfix starts.

There has been no change and Postfix keeps falling…

I’ve gone as far as I can take this. I’ve just confirmed what oom-kill is. Maybe this link will help if no one else has anything to offer.

It would help if you posted your systems properties.

Typically, a process fails like that because you are out of memory. How much physical memory and virtual memory do you have? Have you checked your usage lately? Is it running rather high or close to maximum? How much disc space is available? Are you at or near the max?

If so, that’s the problem.

That would only make the matter worse if you’re running low on physical memory or disc space.

2 Likes

Memory RAM 8Gb
4.72 GiB used / 822.81 MiB cached / 7.75 GiB total
Virtual Memory 0
Mysqld 4Gb
Disk Space : 12% busy

Have you rebooted the vps?

yes, that’s certainly !!!

@li9-hst_web-services,

Is your system running “antivirus”? The error noted in one of your posts “oom-kill” means your system is running out of memory, hence it’s killing off processes…

8GB of RAM should generally be enough, as long as you don’t have memory hungry processes running and/or depending on what you are running on your system including but not limited to how many domains you have and what they are using or needing for resources.

Good morning to all !!!
I disabled ClamAV, reduced SpamAssassin to the standalone version, and yet, Postfix does not remain active. I disabled SpamAssassin and nothing has changed. In all these phases executed, the reboot was made.
The investigation continues.
I’m thinking of uninstalling and reinstalling Postfix, would it be a correct action?

Are you sure clamav is stopped … on one of my servers it kept restarting on reboot after being disabled

Nope. It’s not postfix that’s the problem.

This is the current :

/$ postconf -n
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
meta_directory = /etc/postfix
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix/README_FILES
resolve_dequoted_address = no
sample_directory = /usr/share/doc/postfix/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
shlib_directory = /usr/lib64/postfix
smtp_dns_support_level = dnssec
smtp_host_lookup = dns
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_CApath = /etc/pki/tls/certs
smtp_tls_security_level = dane
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_relay_restrictions = ${{$compatibility_level} < {1} ? {} : {permit_mynetworks permit_sasl_authenticated defer_unauth_destination}}
smtpd_sasl_auth_enable = yes
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
smtpd_tls_cert_file = /etc/pki/tls/certs/postfix.pem
smtpd_tls_key_file = /etc/pki/tls/private/postfix.key
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_security_level = may
tls_server_sni_maps = hash:/etc/postfix/sni_map
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual

Can we confirm that we still have the same problem and aren’t chasing a new one?

Just before starting postfix:

free -h

After starting:

systemctl status postfix

The memory usage you show above would mean postfix needs over 3G of memory to start. That just doesn’t seem plausible.

Did you save a backup of your last main.cf before you added the new entries?
Please read this page: https://www.postfix.org/SMTPD_ACCESS_README.html

The relay parameter has a very strange setting? Can you elaborate on it?

The warning also states undefined parameters.

/$ 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.

1 Like