TransWikia.com

Postfix cannot start but dovecot is ok

Unix & Linux Asked by Phan on October 31, 2021

My postfix service cannot start.
Here is message:

Job for postfix.service failed. See 'systemctl status postfix.service' and 'journalctl -xn' for details.

And here is service status:

postfix.service - Postfix Mail Transport Agent
  Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled)
  Active: failed (Result: timeout) since Wed 2015-11-18 16:58:32 ICT; 6min ago
  Process: 40961 ExecStart=/usr/sbin/postfix start (code=killed, signal=TERM)
  Process: 40957 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 40953 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)

Nov 18 16:58:32 cpanel.redsand.vn systemd[1]: postfix.service operation timed out. Terminating.
Nov 18 16:58:32 cpanel.redsand.vn systemd[1]: Failed to start Postfix Mail Transport Agent.
Nov 18 16:58:32 cpanel.redsand.vn systemd[1]: Unit postfix.service entered failed state.

And here is my config:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
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 xxgdb $daemon_directory/$process_name $process_id & sleep 5
delay_warning_time = 4
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 20480000
mydestination = localhost.$mydomain, localhost, $mydomain
mydomain = cpanel.redsand.vn
myhostname = cpanel.redsand.vn
mynetworks = 127.0.0.1, 113.160.170.38
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES
recipient_delimiter = +
relay_domains = proxy:mysql:/etc/sentora/configs/postfix/mysql-relay_domains_maps.cf
sample_directory = /usr/share/doc/postfix-2.2.2/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions =
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions =
smtpd_use_tls = no
soft_bounce = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_alias_maps.cf, regexp:/etc/sentora/configs/postfix/virtual_regexp
virtual_gid_maps = static:12
virtual_mailbox_base = /var/sentora/vmail
virtual_mailbox_domains = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_mailbox_maps.cf
virtual_minimum_uid = 991
virtual_transport = dovecot
virtual_uid_maps = static:991

Please help me solvethis problem, i dont know how to fix it.
Many thanks.

One Answer

I have had the same problem, using configuration that was imported from a previous machine.

Here is how I solved this issue:

$ sudo rm -v /var/lib/postfix/master.lock
$ sudo systemctl start postfix

In my case there were also issues with a postfix process being left from previous attempts, here is the solution:

-- check that postfix is not running:

$ ps faxu | grep -i [p]ostfix
root     12854  0.0  0.2  92004  2236 ?        Ss   07:23   0:00 /usr/libexec/postfix/master -w
postfix  12855  0.0  0.4  98320  4088 ?        S    07:23   0:00  _ pickup -l -t fifo -u
postfix  12856  0.0  0.4  98388  4128 ?        S    07:23   0:00  _ qmgr -l -t fifo -u
postfix  12872  0.0  0.4  98332  4672 ?        S    07:29   0:00  _ tlsmgr -l -t unix -u

-- If you have postfix processes running, kill them all:

$ sudo kill -9 12854 12855 12856 12872

-- after killing all the processes, remove the master.lock file and start postfix with systemctl (see above).

Finally, don't forget that the queue_directory should point to /var/spool/postfix ...

Answered by Master Shuffler on October 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP