can't get server to start postfix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

can't get server to start postfix

Fazzina, Angelo

Hi,

All of a sudden postfix won’t load ?  where should I look next ?  thanks.

 

I tried

[root@mail2 postfix]# service postfix start

Starting postfix:                                          [  OK  ]

 

 

Logs show

Sep  7 16:50:47 mail2 postfix/postfix-script[3214]: starting the Postfix mail system

Sep  7 16:50:47 mail2 postfix/master[3215]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied

 

[root@mail2 postfix]# ls -l /var/lib/postfix/

total 0

-rw-r--r--. 1 postfix postfix 0 Sep  7 16:07 master.lock

 

 

 

[root@mail2 postfix]# postconf -n

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

html_directory = no

inet_interfaces = all

inet_protocols = all

mail_owner = postfix

mailbox_size_limit = 512000000

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

mydestination = $myhostname, localhost.$mydomain, localhost, appmail.uconn.edu

myhostname = mail2.uits.uconn.edu

mynetworks = 10.4.40.194 10.4.40.193 10.4.40.189 137.99.80.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

newaliases_path = /usr/bin/newaliases.postfix

queue_directory = /var/spool/postfix

readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES

relay_domains = adm.uconn.edu $mydestination

sample_directory = /usr/share/doc/postfix-2.6.6/samples

sendmail_path = /usr/sbin/sendmail.postfix

setgid_group = postdrop

smtpd_tls_exclude_ciphers = IDEA-CBC-SHA, DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, RC4, aNULL

unknown_local_recipient_reject_code = 550

virtual_alias_maps = hash:/etc/postfix/virtual regexp:/etc/postfix/maps/subaddressing

 

-Angelo Fazzina

Operating Systems Programmer / Analyst

University of Connecticut,  UITS, SSG, Server Systems

860-486-9075

 

Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Patrick Ben Koetter-2
you have a zombie master process hanging around. Stop postfix. Get a list of
all running processes and check if there's a orphaned master process hanging
around. Kill it. Start postfix.

p@rick




* Fazzina, Angelo <[hidden email]>:

> Hi,
> All of a sudden postfix won't load ?  where should I look next ?  thanks.
>
> I tried
> [root@mail2 postfix]# service postfix start
> Starting postfix:                                          [  OK  ]
>
>
> Logs show
> Sep  7 16:50:47 mail2 postfix/postfix-script[3214]: starting the Postfix mail system
> Sep  7 16:50:47 mail2 postfix/master[3215]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
>
> [root@mail2 postfix]# ls -l /var/lib/postfix/
> total 0
> -rw-r--r--. 1 postfix postfix 0 Sep  7 16:07 master.lock
>
>
>
> [root@mail2 postfix]# postconf -n
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> data_directory = /var/lib/postfix
> debug_peer_level = 2
> html_directory = no
> inet_interfaces = all
> inet_protocols = all
> mail_owner = postfix
> mailbox_size_limit = 512000000
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> mydestination = $myhostname, localhost.$mydomain, localhost, appmail.uconn.edu
> myhostname = mail2.uits.uconn.edu
> mynetworks = 10.4.40.194 10.4.40.193 10.4.40.189 137.99.80.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> newaliases_path = /usr/bin/newaliases.postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
> relay_domains = adm.uconn.edu $mydestination
> sample_directory = /usr/share/doc/postfix-2.6.6/samples
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> smtpd_tls_exclude_ciphers = IDEA-CBC-SHA, DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, RC4, aNULL
> unknown_local_recipient_reject_code = 550
> virtual_alias_maps = hash:/etc/postfix/virtual regexp:/etc/postfix/maps/subaddressing
>
> -Angelo Fazzina
> Operating Systems Programmer / Analyst
> University of Connecticut,  UITS, SSG, Server Systems
> 860-486-9075
>

--
[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein
 
Reply | Threaded
Open this post in threaded view
|

RE: can't get server to start postfix

Fazzina, Angelo
Server has only been on 25 minutes, I rebooted it.

Can you see it in this list ?
Thanks for trying.
-ALF

[root@mail2 log]# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 16:46 ?        00:00:00 /sbin/init
root         2     0  0 16:46 ?        00:00:00 [kthreadd]
root         3     2  0 16:46 ?        00:00:00 [migration/0]
root         4     2  0 16:46 ?        00:00:00 [ksoftirqd/0]
root         5     2  0 16:46 ?        00:00:00 [stopper/0]
root         6     2  0 16:46 ?        00:00:00 [watchdog/0]
root         7     2  0 16:46 ?        00:00:00 [migration/1]
root         8     2  0 16:46 ?        00:00:00 [stopper/1]
root         9     2  0 16:46 ?        00:00:00 [ksoftirqd/1]
root        10     2  0 16:46 ?        00:00:00 [watchdog/1]
root        11     2  0 16:46 ?        00:00:00 [events/0]
root        12     2  0 16:46 ?        00:00:00 [events/1]
root        13     2  0 16:46 ?        00:00:00 [events/0]
root        14     2  0 16:46 ?        00:00:00 [events/1]
root        15     2  0 16:46 ?        00:00:00 [events_long/0]
root        16     2  0 16:46 ?        00:00:00 [events_long/1]
root        17     2  0 16:46 ?        00:00:00 [events_power_ef]
root        18     2  0 16:46 ?        00:00:00 [events_power_ef]
root        19     2  0 16:46 ?        00:00:00 [cgroup]
root        20     2  0 16:46 ?        00:00:00 [khelper]
root        21     2  0 16:46 ?        00:00:00 [netns]
root        22     2  0 16:46 ?        00:00:00 [async/mgr]
root        23     2  0 16:46 ?        00:00:00 [pm]
root        24     2  0 16:46 ?        00:00:00 [sync_supers]
root        25     2  0 16:46 ?        00:00:00 [bdi-default]
root        26     2  0 16:46 ?        00:00:00 [kintegrityd/0]
root        27     2  0 16:46 ?        00:00:00 [kintegrityd/1]
root        28     2  0 16:46 ?        00:00:00 [kblockd/0]
root        29     2  0 16:46 ?        00:00:00 [kblockd/1]
root        30     2  0 16:46 ?        00:00:00 [kacpid]
root        31     2  0 16:46 ?        00:00:00 [kacpi_notify]
root        32     2  0 16:46 ?        00:00:00 [kacpi_hotplug]
root        33     2  0 16:46 ?        00:00:00 [ata_aux]
root        34     2  0 16:46 ?        00:00:00 [ata_sff/0]
root        35     2  0 16:46 ?        00:00:00 [ata_sff/1]
root        36     2  0 16:46 ?        00:00:00 [ksuspend_usbd]
root        37     2  0 16:46 ?        00:00:00 [khubd]
root        38     2  0 16:46 ?        00:00:00 [kseriod]
root        39     2  0 16:46 ?        00:00:00 [md/0]
root        40     2  0 16:46 ?        00:00:00 [md/1]
root        41     2  0 16:46 ?        00:00:00 [md_misc/0]
root        42     2  0 16:46 ?        00:00:00 [md_misc/1]
root        43     2  0 16:46 ?        00:00:00 [linkwatch]
root        46     2  0 16:46 ?        00:00:00 [khungtaskd]
root        47     2  0 16:46 ?        00:00:00 [kswapd0]
root        48     2  0 16:46 ?        00:00:00 [ksmd]
root        49     2  0 16:46 ?        00:00:00 [khugepaged]
root        50     2  0 16:46 ?        00:00:00 [aio/0]
root        51     2  0 16:46 ?        00:00:00 [aio/1]
root        52     2  0 16:46 ?        00:00:00 [crypto/0]
root        53     2  0 16:46 ?        00:00:00 [crypto/1]
root        60     2  0 16:46 ?        00:00:00 [kthrotld/0]
root        61     2  0 16:46 ?        00:00:00 [kthrotld/1]
root        62     2  0 16:46 ?        00:00:00 [pciehpd]
root        64     2  0 16:46 ?        00:00:00 [kpsmoused]
root        65     2  0 16:46 ?        00:00:00 [usbhid_resumer]
root        66     2  0 16:46 ?        00:00:00 [deferwq]
root        99     2  0 16:46 ?        00:00:00 [kdmremove]
root       100     2  0 16:46 ?        00:00:00 [kstriped]
root       133     2  0 16:46 ?        00:00:00 [ttm_swap]
root       256     2  0 16:46 ?        00:00:00 [scsi_eh_0]
root       257     2  0 16:46 ?        00:00:00 [scsi_eh_1]
root       318     2  0 16:46 ?        00:00:00 [scsi_eh_2]
root       319     2  0 16:46 ?        00:00:00 [vmw_pvscsi_wq_2]
root       407     2  0 16:46 ?        00:00:00 [kdmflush]
root       409     2  0 16:46 ?        00:00:00 [kdmflush]
root       427     2  0 16:46 ?        00:00:00 [jbd2/dm-0-8]
root       428     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
root       511     1  0 16:46 ?        00:00:00 /sbin/udevd -d
root       726     2  0 16:46 ?        00:00:00 [vmmemctl]
root       813   511  0 16:46 ?        00:00:00 /sbin/udevd -d
root       816   511  0 16:46 ?        00:00:00 /sbin/udevd -d
root       817     2  0 16:46 ?        00:00:00 [kdmflush]
root       855     2  0 16:46 ?        00:00:00 [jbd2/sda1-8]
root       856     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
root       857     2  0 16:46 ?        00:00:00 [jbd2/dm-2-8]
root       858     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
root       916     2  0 16:46 ?        00:00:00 [kauditd]
root      1153     2  0 16:46 ?        00:00:00 [flush-253:0]
root      1154     2  0 16:46 ?        00:00:00 [flush-253:2]
root      1464     1  0 16:46 ?        00:00:00 auditd
root      1498     1  0 16:46 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
dbus      1520     1  0 16:46 ?        00:00:00 dbus-daemon --system
root      1655     1  0 16:46 ?        00:00:00 /usr/sbin/sshd
ntp       1673     1  0 16:46 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root      1685     1  0 16:46 ?        00:00:00 /usr/sbin/dovecot
dovecot   1686  1685  0 16:46 ?        00:00:00 dovecot/anvil
root      1688  1685  0 16:46 ?        00:00:00 dovecot/log
root      1689  1685  0 16:46 ?        00:00:00 dovecot/ssl-params
root      1692  1685  0 16:46 ?        00:00:00 dovecot/config
dovecot   1721  1685  0 16:46 ?        00:00:00 dovecot/auth
root      1805     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/denyhosts.py --daemon --config=/etc/denyhos
root      1849     1  0 16:46 ?        00:00:00 /usr/bin/python -s /usr/sbin/osad --pid-file /var/run/osad.pid
root      1877     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
root      1878     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
root      1879     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
root      1880     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
root      1881     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
root      1882     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
root      1895     1  0 16:46 ?        00:00:00 crond
root      2051     1  0 16:46 ?        00:00:11 splunkd -h 127.0.0.1 -p 8089 start
root      2052  2051  0 16:46 ?        00:00:00 [splunkd pid=2051] splunkd -h 127.0.0.1 -p 8089 start [process-runne
root      2151     1  0 16:46 ?        00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmcad
root      2170     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
root      2184     1  0 16:46 ?        00:00:03 python /usr/bin/goferd
root      2211  2170  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
root      2213     1  0 16:46 ?        00:00:00 rhnsd
root      2227     1  0 16:46 ?        00:00:00 /usr/bin/rhsmcertd
root      2258     1  0 16:46 ?        00:00:00 /usr/bin/ruby /usr/bin/puppet agent
root      2281     1  0 16:46 tty1     00:00:00 /sbin/mingetty /dev/tty1
root      2283     1  0 16:46 tty2     00:00:00 /sbin/mingetty /dev/tty2
root      2285     1  0 16:46 tty3     00:00:00 /sbin/mingetty /dev/tty3
root      2287     1  0 16:46 tty4     00:00:00 /sbin/mingetty /dev/tty4
root      2289     1  0 16:46 tty5     00:00:00 /sbin/mingetty /dev/tty5
root      2291     1  0 16:46 tty6     00:00:00 /sbin/mingetty /dev/tty6
root      2455  1655  0 16:46 ?        00:00:00 sshd: root@pts/0,pts/1
root      2457  2455  0 16:46 pts/0    00:00:00 -bash
root      2710  2455  0 16:48 pts/1    00:00:00 -bash
root      5235  1685  0 17:10 ?        00:00:00 dovecot/auth -w
root      5472  1685  0 17:12 ?        00:00:00 dovecot/auth -w
root      5559  1685  0 17:13 ?        00:00:00 dovecot/auth -w
root      5569  2457  0 17:13 pts/0    00:00:00 ps -ef

-Angelo Fazzina
Operating Systems Programmer / Analyst
University of Connecticut,  UITS, SSG, Server Systems
860-486-9075


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Patrick Ben Koetter
Sent: Thursday, September 7, 2017 5:02 PM
To: [hidden email]
Subject: Re: can't get server to start postfix

you have a zombie master process hanging around. Stop postfix. Get a list of
all running processes and check if there's a orphaned master process hanging
around. Kill it. Start postfix.

p@rick




* Fazzina, Angelo <[hidden email]>:

> Hi,
> All of a sudden postfix won't load ?  where should I look next ?  thanks.
>
> I tried
> [root@mail2 postfix]# service postfix start
> Starting postfix:                                          [  OK  ]
>
>
> Logs show
> Sep  7 16:50:47 mail2 postfix/postfix-script[3214]: starting the Postfix mail system
> Sep  7 16:50:47 mail2 postfix/master[3215]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
>
> [root@mail2 postfix]# ls -l /var/lib/postfix/
> total 0
> -rw-r--r--. 1 postfix postfix 0 Sep  7 16:07 master.lock
>
>
>
> [root@mail2 postfix]# postconf -n
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> data_directory = /var/lib/postfix
> debug_peer_level = 2
> html_directory = no
> inet_interfaces = all
> inet_protocols = all
> mail_owner = postfix
> mailbox_size_limit = 512000000
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> mydestination = $myhostname, localhost.$mydomain, localhost, appmail.uconn.edu
> myhostname = mail2.uits.uconn.edu
> mynetworks = 10.4.40.194 10.4.40.193 10.4.40.189 137.99.80.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> newaliases_path = /usr/bin/newaliases.postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
> relay_domains = adm.uconn.edu $mydestination
> sample_directory = /usr/share/doc/postfix-2.6.6/samples
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> smtpd_tls_exclude_ciphers = IDEA-CBC-SHA, DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, RC4, aNULL
> unknown_local_recipient_reject_code = 550
> virtual_alias_maps = hash:/etc/postfix/virtual regexp:/etc/postfix/maps/subaddressing
>
> -Angelo Fazzina
> Operating Systems Programmer / Analyst
> University of Connecticut,  UITS, SSG, Server Systems
> 860-486-9075
>

--
[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein
 
Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Viktor Dukhovni
In reply to this post by Patrick Ben Koetter-2
On Thu, Sep 07, 2017 at 08:54:48PM +0000, Fazzina, Angelo wrote:

> postfix/postfix-script[3214]: starting the Postfix mail system
> postfix/master[3215]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied

> [root@mail2 postfix]# ls -l /var/lib/postfix/
> total 0
> -rw-r--r--. 1 postfix postfix 0 Sep  7 16:07 master.lock

On my system the lock file mode is 0600, but otherwise looks
normal.

> data_directory = /var/lib/postfix
> mail_owner = postfix

What about the directory permissions?  Run as root and post the
output of:

    # bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"

To fix (if not on a system where the package maintainer provides
an incorrect postfix-files file).

    # postfix set-permissions

Otherwise, fix by hand as needed.  On my (BSD) system, the data
directory hierarchy permissions are:

    # bash -c "ls -ld /var{,/db{,/postfix{,/master.lock}}}"
    drwxr-xr-x  26 root     wheel  26 Aug 14 12:12 /var
    drwxr-xr-x  16 root     wheel  23 Sep  7 17:12 /var/db
    drwx------   2 postfix  wheel   4 Feb 18  2017 /var/db/postfix
    -rw-------   1 postfix  wheel  33 Aug 14 12:12 /var/db/postfix/master.lock

On Thu, Sep 07, 2017 at 11:02:18PM +0200, Patrick Ben Koetter wrote:

> You have a zombie master process hanging around. Stop postfix. Get a list of
> all running processes and check if there's a orphaned master process hanging
> around. Kill it. Start postfix.

That does not match "permission denied", you'd be told the lock is
already taken instead.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Miles Fidelman
In reply to this post by Fazzina, Angelo
after a reboot, you could just try "postfix stop" and delete the lock
file, then "postfix start"

to find zombie processes, you could try "pstree" (shows a tree of
processes & sub-processes, in the order they were started at init time -
note that none of them are named postfix - the top-level process is
named "master") - you might have to install the tools, I think they're
part of the "process tools" package on Debian (but that's completely
from memory) - google is yourf friend

Miles Fidelman


On 9/7/17 2:14 PM, Fazzina, Angelo wrote:

> Server has only been on 25 minutes, I rebooted it.
>
> Can you see it in this list ?
> Thanks for trying.
> -ALF
>
> [root@mail2 log]# ps -ef
> UID        PID  PPID  C STIME TTY          TIME CMD
> root         1     0  0 16:46 ?        00:00:00 /sbin/init
> root         2     0  0 16:46 ?        00:00:00 [kthreadd]
> root         3     2  0 16:46 ?        00:00:00 [migration/0]
> root         4     2  0 16:46 ?        00:00:00 [ksoftirqd/0]
> root         5     2  0 16:46 ?        00:00:00 [stopper/0]
> root         6     2  0 16:46 ?        00:00:00 [watchdog/0]
> root         7     2  0 16:46 ?        00:00:00 [migration/1]
> root         8     2  0 16:46 ?        00:00:00 [stopper/1]
> root         9     2  0 16:46 ?        00:00:00 [ksoftirqd/1]
> root        10     2  0 16:46 ?        00:00:00 [watchdog/1]
> root        11     2  0 16:46 ?        00:00:00 [events/0]
> root        12     2  0 16:46 ?        00:00:00 [events/1]
> root        13     2  0 16:46 ?        00:00:00 [events/0]
> root        14     2  0 16:46 ?        00:00:00 [events/1]
> root        15     2  0 16:46 ?        00:00:00 [events_long/0]
> root        16     2  0 16:46 ?        00:00:00 [events_long/1]
> root        17     2  0 16:46 ?        00:00:00 [events_power_ef]
> root        18     2  0 16:46 ?        00:00:00 [events_power_ef]
> root        19     2  0 16:46 ?        00:00:00 [cgroup]
> root        20     2  0 16:46 ?        00:00:00 [khelper]
> root        21     2  0 16:46 ?        00:00:00 [netns]
> root        22     2  0 16:46 ?        00:00:00 [async/mgr]
> root        23     2  0 16:46 ?        00:00:00 [pm]
> root        24     2  0 16:46 ?        00:00:00 [sync_supers]
> root        25     2  0 16:46 ?        00:00:00 [bdi-default]
> root        26     2  0 16:46 ?        00:00:00 [kintegrityd/0]
> root        27     2  0 16:46 ?        00:00:00 [kintegrityd/1]
> root        28     2  0 16:46 ?        00:00:00 [kblockd/0]
> root        29     2  0 16:46 ?        00:00:00 [kblockd/1]
> root        30     2  0 16:46 ?        00:00:00 [kacpid]
> root        31     2  0 16:46 ?        00:00:00 [kacpi_notify]
> root        32     2  0 16:46 ?        00:00:00 [kacpi_hotplug]
> root        33     2  0 16:46 ?        00:00:00 [ata_aux]
> root        34     2  0 16:46 ?        00:00:00 [ata_sff/0]
> root        35     2  0 16:46 ?        00:00:00 [ata_sff/1]
> root        36     2  0 16:46 ?        00:00:00 [ksuspend_usbd]
> root        37     2  0 16:46 ?        00:00:00 [khubd]
> root        38     2  0 16:46 ?        00:00:00 [kseriod]
> root        39     2  0 16:46 ?        00:00:00 [md/0]
> root        40     2  0 16:46 ?        00:00:00 [md/1]
> root        41     2  0 16:46 ?        00:00:00 [md_misc/0]
> root        42     2  0 16:46 ?        00:00:00 [md_misc/1]
> root        43     2  0 16:46 ?        00:00:00 [linkwatch]
> root        46     2  0 16:46 ?        00:00:00 [khungtaskd]
> root        47     2  0 16:46 ?        00:00:00 [kswapd0]
> root        48     2  0 16:46 ?        00:00:00 [ksmd]
> root        49     2  0 16:46 ?        00:00:00 [khugepaged]
> root        50     2  0 16:46 ?        00:00:00 [aio/0]
> root        51     2  0 16:46 ?        00:00:00 [aio/1]
> root        52     2  0 16:46 ?        00:00:00 [crypto/0]
> root        53     2  0 16:46 ?        00:00:00 [crypto/1]
> root        60     2  0 16:46 ?        00:00:00 [kthrotld/0]
> root        61     2  0 16:46 ?        00:00:00 [kthrotld/1]
> root        62     2  0 16:46 ?        00:00:00 [pciehpd]
> root        64     2  0 16:46 ?        00:00:00 [kpsmoused]
> root        65     2  0 16:46 ?        00:00:00 [usbhid_resumer]
> root        66     2  0 16:46 ?        00:00:00 [deferwq]
> root        99     2  0 16:46 ?        00:00:00 [kdmremove]
> root       100     2  0 16:46 ?        00:00:00 [kstriped]
> root       133     2  0 16:46 ?        00:00:00 [ttm_swap]
> root       256     2  0 16:46 ?        00:00:00 [scsi_eh_0]
> root       257     2  0 16:46 ?        00:00:00 [scsi_eh_1]
> root       318     2  0 16:46 ?        00:00:00 [scsi_eh_2]
> root       319     2  0 16:46 ?        00:00:00 [vmw_pvscsi_wq_2]
> root       407     2  0 16:46 ?        00:00:00 [kdmflush]
> root       409     2  0 16:46 ?        00:00:00 [kdmflush]
> root       427     2  0 16:46 ?        00:00:00 [jbd2/dm-0-8]
> root       428     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
> root       511     1  0 16:46 ?        00:00:00 /sbin/udevd -d
> root       726     2  0 16:46 ?        00:00:00 [vmmemctl]
> root       813   511  0 16:46 ?        00:00:00 /sbin/udevd -d
> root       816   511  0 16:46 ?        00:00:00 /sbin/udevd -d
> root       817     2  0 16:46 ?        00:00:00 [kdmflush]
> root       855     2  0 16:46 ?        00:00:00 [jbd2/sda1-8]
> root       856     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
> root       857     2  0 16:46 ?        00:00:00 [jbd2/dm-2-8]
> root       858     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
> root       916     2  0 16:46 ?        00:00:00 [kauditd]
> root      1153     2  0 16:46 ?        00:00:00 [flush-253:0]
> root      1154     2  0 16:46 ?        00:00:00 [flush-253:2]
> root      1464     1  0 16:46 ?        00:00:00 auditd
> root      1498     1  0 16:46 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
> dbus      1520     1  0 16:46 ?        00:00:00 dbus-daemon --system
> root      1655     1  0 16:46 ?        00:00:00 /usr/sbin/sshd
> ntp       1673     1  0 16:46 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
> root      1685     1  0 16:46 ?        00:00:00 /usr/sbin/dovecot
> dovecot   1686  1685  0 16:46 ?        00:00:00 dovecot/anvil
> root      1688  1685  0 16:46 ?        00:00:00 dovecot/log
> root      1689  1685  0 16:46 ?        00:00:00 dovecot/ssl-params
> root      1692  1685  0 16:46 ?        00:00:00 dovecot/config
> dovecot   1721  1685  0 16:46 ?        00:00:00 dovecot/auth
> root      1805     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/denyhosts.py --daemon --config=/etc/denyhos
> root      1849     1  0 16:46 ?        00:00:00 /usr/bin/python -s /usr/sbin/osad --pid-file /var/run/osad.pid
> root      1877     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1878     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1879     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1880     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1881     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1882     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1895     1  0 16:46 ?        00:00:00 crond
> root      2051     1  0 16:46 ?        00:00:11 splunkd -h 127.0.0.1 -p 8089 start
> root      2052  2051  0 16:46 ?        00:00:00 [splunkd pid=2051] splunkd -h 127.0.0.1 -p 8089 start [process-runne
> root      2151     1  0 16:46 ?        00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmcad
> root      2170     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
> root      2184     1  0 16:46 ?        00:00:03 python /usr/bin/goferd
> root      2211  2170  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
> root      2213     1  0 16:46 ?        00:00:00 rhnsd
> root      2227     1  0 16:46 ?        00:00:00 /usr/bin/rhsmcertd
> root      2258     1  0 16:46 ?        00:00:00 /usr/bin/ruby /usr/bin/puppet agent
> root      2281     1  0 16:46 tty1     00:00:00 /sbin/mingetty /dev/tty1
> root      2283     1  0 16:46 tty2     00:00:00 /sbin/mingetty /dev/tty2
> root      2285     1  0 16:46 tty3     00:00:00 /sbin/mingetty /dev/tty3
> root      2287     1  0 16:46 tty4     00:00:00 /sbin/mingetty /dev/tty4
> root      2289     1  0 16:46 tty5     00:00:00 /sbin/mingetty /dev/tty5
> root      2291     1  0 16:46 tty6     00:00:00 /sbin/mingetty /dev/tty6
> root      2455  1655  0 16:46 ?        00:00:00 sshd: root@pts/0,pts/1
> root      2457  2455  0 16:46 pts/0    00:00:00 -bash
> root      2710  2455  0 16:48 pts/1    00:00:00 -bash
> root      5235  1685  0 17:10 ?        00:00:00 dovecot/auth -w
> root      5472  1685  0 17:12 ?        00:00:00 dovecot/auth -w
> root      5559  1685  0 17:13 ?        00:00:00 dovecot/auth -w
> root      5569  2457  0 17:13 pts/0    00:00:00 ps -ef
>
> -Angelo Fazzina
> Operating Systems Programmer / Analyst
> University of Connecticut,  UITS, SSG, Server Systems
> 860-486-9075
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Patrick Ben Koetter
> Sent: Thursday, September 7, 2017 5:02 PM
> To: [hidden email]
> Subject: Re: can't get server to start postfix
>
> you have a zombie master process hanging around. Stop postfix. Get a list of
> all running processes and check if there's a orphaned master process hanging
> around. Kill it. Start postfix.
>
> p@rick
>
>
>
>
> * Fazzina, Angelo <[hidden email]>:
>> Hi,
>> All of a sudden postfix won't load ?  where should I look next ?  thanks.
>>
>> I tried
>> [root@mail2 postfix]# service postfix start
>> Starting postfix:                                          [  OK  ]
>>
>>
>> Logs show
>> Sep  7 16:50:47 mail2 postfix/postfix-script[3214]: starting the Postfix mail system
>> Sep  7 16:50:47 mail2 postfix/master[3215]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
>>
>> [root@mail2 postfix]# ls -l /var/lib/postfix/
>> total 0
>> -rw-r--r--. 1 postfix postfix 0 Sep  7 16:07 master.lock
>>
>>
>>
>> [root@mail2 postfix]# postconf -n
>> alias_database = hash:/etc/aliases
>> alias_maps = hash:/etc/aliases
>> command_directory = /usr/sbin
>> config_directory = /etc/postfix
>> daemon_directory = /usr/libexec/postfix
>> data_directory = /var/lib/postfix
>> debug_peer_level = 2
>> html_directory = no
>> inet_interfaces = all
>> inet_protocols = all
>> mail_owner = postfix
>> mailbox_size_limit = 512000000
>> mailq_path = /usr/bin/mailq.postfix
>> manpage_directory = /usr/share/man
>> mydestination = $myhostname, localhost.$mydomain, localhost, appmail.uconn.edu
>> myhostname = mail2.uits.uconn.edu
>> mynetworks = 10.4.40.194 10.4.40.193 10.4.40.189 137.99.80.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
>> newaliases_path = /usr/bin/newaliases.postfix
>> queue_directory = /var/spool/postfix
>> readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
>> relay_domains = adm.uconn.edu $mydestination
>> sample_directory = /usr/share/doc/postfix-2.6.6/samples
>> sendmail_path = /usr/sbin/sendmail.postfix
>> setgid_group = postdrop
>> smtpd_tls_exclude_ciphers = IDEA-CBC-SHA, DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, RC4, aNULL
>> unknown_local_recipient_reject_code = 550
>> virtual_alias_maps = hash:/etc/postfix/virtual regexp:/etc/postfix/maps/subaddressing
>>
>> -Angelo Fazzina
>> Operating Systems Programmer / Analyst
>> University of Connecticut,  UITS, SSG, Server Systems
>> 860-486-9075
>>

--
In theory, there is no difference between theory and practice.
In practice, there is.  .... Yogi Berra

Reply | Threaded
Open this post in threaded view
|

RE: can't get server to start postfix

Fazzina, Angelo
I will try that Miles, thanks.

Victor: I messed with it a little but no change.


[root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
drwx------.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
-rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock
[root@mail2 ~]# chmod 744 /var/lib/postfix/
[root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
drwxr--r--.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
-rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock


My repeatable steps so far
[root@mail2 pid]# rm /var/spool/postfix/pid/master.pid
rm: remove regular file `/var/spool/postfix/pid/master.pid'? y
[root@mail2 pid]# rm /var/lock/subsys/postfix
rm: remove regular empty file `/var/lock/subsys/postfix'? y
[root@mail2 pid]# service postfix status
master is stopped
[root@mail2 pid]# service postfix stop
[root@mail2 pid]# service postfix start
Starting postfix:                                          [  OK  ]
[root@mail2 pid]# service postfix status
master dead but pid file exists


-Angelo Fazzina
Operating Systems Programmer / Analyst
University of Connecticut,  UITS, SSG, Server Systems
860-486-9075


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Miles Fidelman
Sent: Thursday, September 7, 2017 5:28 PM
To: [hidden email]
Subject: Re: can't get server to start postfix

after a reboot, you could just try "postfix stop" and delete the lock
file, then "postfix start"

to find zombie processes, you could try "pstree" (shows a tree of
processes & sub-processes, in the order they were started at init time -
note that none of them are named postfix - the top-level process is
named "master") - you might have to install the tools, I think they're
part of the "process tools" package on Debian (but that's completely
from memory) - google is yourf friend

Miles Fidelman


On 9/7/17 2:14 PM, Fazzina, Angelo wrote:

> Server has only been on 25 minutes, I rebooted it.
>
> Can you see it in this list ?
> Thanks for trying.
> -ALF
>
> [root@mail2 log]# ps -ef
> UID        PID  PPID  C STIME TTY          TIME CMD
> root         1     0  0 16:46 ?        00:00:00 /sbin/init
> root         2     0  0 16:46 ?        00:00:00 [kthreadd]
> root         3     2  0 16:46 ?        00:00:00 [migration/0]
> root         4     2  0 16:46 ?        00:00:00 [ksoftirqd/0]
> root         5     2  0 16:46 ?        00:00:00 [stopper/0]
> root         6     2  0 16:46 ?        00:00:00 [watchdog/0]
> root         7     2  0 16:46 ?        00:00:00 [migration/1]
> root         8     2  0 16:46 ?        00:00:00 [stopper/1]
> root         9     2  0 16:46 ?        00:00:00 [ksoftirqd/1]
> root        10     2  0 16:46 ?        00:00:00 [watchdog/1]
> root        11     2  0 16:46 ?        00:00:00 [events/0]
> root        12     2  0 16:46 ?        00:00:00 [events/1]
> root        13     2  0 16:46 ?        00:00:00 [events/0]
> root        14     2  0 16:46 ?        00:00:00 [events/1]
> root        15     2  0 16:46 ?        00:00:00 [events_long/0]
> root        16     2  0 16:46 ?        00:00:00 [events_long/1]
> root        17     2  0 16:46 ?        00:00:00 [events_power_ef]
> root        18     2  0 16:46 ?        00:00:00 [events_power_ef]
> root        19     2  0 16:46 ?        00:00:00 [cgroup]
> root        20     2  0 16:46 ?        00:00:00 [khelper]
> root        21     2  0 16:46 ?        00:00:00 [netns]
> root        22     2  0 16:46 ?        00:00:00 [async/mgr]
> root        23     2  0 16:46 ?        00:00:00 [pm]
> root        24     2  0 16:46 ?        00:00:00 [sync_supers]
> root        25     2  0 16:46 ?        00:00:00 [bdi-default]
> root        26     2  0 16:46 ?        00:00:00 [kintegrityd/0]
> root        27     2  0 16:46 ?        00:00:00 [kintegrityd/1]
> root        28     2  0 16:46 ?        00:00:00 [kblockd/0]
> root        29     2  0 16:46 ?        00:00:00 [kblockd/1]
> root        30     2  0 16:46 ?        00:00:00 [kacpid]
> root        31     2  0 16:46 ?        00:00:00 [kacpi_notify]
> root        32     2  0 16:46 ?        00:00:00 [kacpi_hotplug]
> root        33     2  0 16:46 ?        00:00:00 [ata_aux]
> root        34     2  0 16:46 ?        00:00:00 [ata_sff/0]
> root        35     2  0 16:46 ?        00:00:00 [ata_sff/1]
> root        36     2  0 16:46 ?        00:00:00 [ksuspend_usbd]
> root        37     2  0 16:46 ?        00:00:00 [khubd]
> root        38     2  0 16:46 ?        00:00:00 [kseriod]
> root        39     2  0 16:46 ?        00:00:00 [md/0]
> root        40     2  0 16:46 ?        00:00:00 [md/1]
> root        41     2  0 16:46 ?        00:00:00 [md_misc/0]
> root        42     2  0 16:46 ?        00:00:00 [md_misc/1]
> root        43     2  0 16:46 ?        00:00:00 [linkwatch]
> root        46     2  0 16:46 ?        00:00:00 [khungtaskd]
> root        47     2  0 16:46 ?        00:00:00 [kswapd0]
> root        48     2  0 16:46 ?        00:00:00 [ksmd]
> root        49     2  0 16:46 ?        00:00:00 [khugepaged]
> root        50     2  0 16:46 ?        00:00:00 [aio/0]
> root        51     2  0 16:46 ?        00:00:00 [aio/1]
> root        52     2  0 16:46 ?        00:00:00 [crypto/0]
> root        53     2  0 16:46 ?        00:00:00 [crypto/1]
> root        60     2  0 16:46 ?        00:00:00 [kthrotld/0]
> root        61     2  0 16:46 ?        00:00:00 [kthrotld/1]
> root        62     2  0 16:46 ?        00:00:00 [pciehpd]
> root        64     2  0 16:46 ?        00:00:00 [kpsmoused]
> root        65     2  0 16:46 ?        00:00:00 [usbhid_resumer]
> root        66     2  0 16:46 ?        00:00:00 [deferwq]
> root        99     2  0 16:46 ?        00:00:00 [kdmremove]
> root       100     2  0 16:46 ?        00:00:00 [kstriped]
> root       133     2  0 16:46 ?        00:00:00 [ttm_swap]
> root       256     2  0 16:46 ?        00:00:00 [scsi_eh_0]
> root       257     2  0 16:46 ?        00:00:00 [scsi_eh_1]
> root       318     2  0 16:46 ?        00:00:00 [scsi_eh_2]
> root       319     2  0 16:46 ?        00:00:00 [vmw_pvscsi_wq_2]
> root       407     2  0 16:46 ?        00:00:00 [kdmflush]
> root       409     2  0 16:46 ?        00:00:00 [kdmflush]
> root       427     2  0 16:46 ?        00:00:00 [jbd2/dm-0-8]
> root       428     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
> root       511     1  0 16:46 ?        00:00:00 /sbin/udevd -d
> root       726     2  0 16:46 ?        00:00:00 [vmmemctl]
> root       813   511  0 16:46 ?        00:00:00 /sbin/udevd -d
> root       816   511  0 16:46 ?        00:00:00 /sbin/udevd -d
> root       817     2  0 16:46 ?        00:00:00 [kdmflush]
> root       855     2  0 16:46 ?        00:00:00 [jbd2/sda1-8]
> root       856     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
> root       857     2  0 16:46 ?        00:00:00 [jbd2/dm-2-8]
> root       858     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
> root       916     2  0 16:46 ?        00:00:00 [kauditd]
> root      1153     2  0 16:46 ?        00:00:00 [flush-253:0]
> root      1154     2  0 16:46 ?        00:00:00 [flush-253:2]
> root      1464     1  0 16:46 ?        00:00:00 auditd
> root      1498     1  0 16:46 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
> dbus      1520     1  0 16:46 ?        00:00:00 dbus-daemon --system
> root      1655     1  0 16:46 ?        00:00:00 /usr/sbin/sshd
> ntp       1673     1  0 16:46 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
> root      1685     1  0 16:46 ?        00:00:00 /usr/sbin/dovecot
> dovecot   1686  1685  0 16:46 ?        00:00:00 dovecot/anvil
> root      1688  1685  0 16:46 ?        00:00:00 dovecot/log
> root      1689  1685  0 16:46 ?        00:00:00 dovecot/ssl-params
> root      1692  1685  0 16:46 ?        00:00:00 dovecot/config
> dovecot   1721  1685  0 16:46 ?        00:00:00 dovecot/auth
> root      1805     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/denyhosts.py --daemon --config=/etc/denyhos
> root      1849     1  0 16:46 ?        00:00:00 /usr/bin/python -s /usr/sbin/osad --pid-file /var/run/osad.pid
> root      1877     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1878     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1879     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1880     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1881     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1882     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
> root      1895     1  0 16:46 ?        00:00:00 crond
> root      2051     1  0 16:46 ?        00:00:11 splunkd -h 127.0.0.1 -p 8089 start
> root      2052  2051  0 16:46 ?        00:00:00 [splunkd pid=2051] splunkd -h 127.0.0.1 -p 8089 start [process-runne
> root      2151     1  0 16:46 ?        00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmcad
> root      2170     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
> root      2184     1  0 16:46 ?        00:00:03 python /usr/bin/goferd
> root      2211  2170  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
> root      2213     1  0 16:46 ?        00:00:00 rhnsd
> root      2227     1  0 16:46 ?        00:00:00 /usr/bin/rhsmcertd
> root      2258     1  0 16:46 ?        00:00:00 /usr/bin/ruby /usr/bin/puppet agent
> root      2281     1  0 16:46 tty1     00:00:00 /sbin/mingetty /dev/tty1
> root      2283     1  0 16:46 tty2     00:00:00 /sbin/mingetty /dev/tty2
> root      2285     1  0 16:46 tty3     00:00:00 /sbin/mingetty /dev/tty3
> root      2287     1  0 16:46 tty4     00:00:00 /sbin/mingetty /dev/tty4
> root      2289     1  0 16:46 tty5     00:00:00 /sbin/mingetty /dev/tty5
> root      2291     1  0 16:46 tty6     00:00:00 /sbin/mingetty /dev/tty6
> root      2455  1655  0 16:46 ?        00:00:00 sshd: root@pts/0,pts/1
> root      2457  2455  0 16:46 pts/0    00:00:00 -bash
> root      2710  2455  0 16:48 pts/1    00:00:00 -bash
> root      5235  1685  0 17:10 ?        00:00:00 dovecot/auth -w
> root      5472  1685  0 17:12 ?        00:00:00 dovecot/auth -w
> root      5559  1685  0 17:13 ?        00:00:00 dovecot/auth -w
> root      5569  2457  0 17:13 pts/0    00:00:00 ps -ef
>
> -Angelo Fazzina
> Operating Systems Programmer / Analyst
> University of Connecticut,  UITS, SSG, Server Systems
> 860-486-9075
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Patrick Ben Koetter
> Sent: Thursday, September 7, 2017 5:02 PM
> To: [hidden email]
> Subject: Re: can't get server to start postfix
>
> you have a zombie master process hanging around. Stop postfix. Get a list of
> all running processes and check if there's a orphaned master process hanging
> around. Kill it. Start postfix.
>
> p@rick
>
>
>
>
> * Fazzina, Angelo <[hidden email]>:
>> Hi,
>> All of a sudden postfix won't load ?  where should I look next ?  thanks.
>>
>> I tried
>> [root@mail2 postfix]# service postfix start
>> Starting postfix:                                          [  OK  ]
>>
>>
>> Logs show
>> Sep  7 16:50:47 mail2 postfix/postfix-script[3214]: starting the Postfix mail system
>> Sep  7 16:50:47 mail2 postfix/master[3215]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
>>
>> [root@mail2 postfix]# ls -l /var/lib/postfix/
>> total 0
>> -rw-r--r--. 1 postfix postfix 0 Sep  7 16:07 master.lock
>>
>>
>>
>> [root@mail2 postfix]# postconf -n
>> alias_database = hash:/etc/aliases
>> alias_maps = hash:/etc/aliases
>> command_directory = /usr/sbin
>> config_directory = /etc/postfix
>> daemon_directory = /usr/libexec/postfix
>> data_directory = /var/lib/postfix
>> debug_peer_level = 2
>> html_directory = no
>> inet_interfaces = all
>> inet_protocols = all
>> mail_owner = postfix
>> mailbox_size_limit = 512000000
>> mailq_path = /usr/bin/mailq.postfix
>> manpage_directory = /usr/share/man
>> mydestination = $myhostname, localhost.$mydomain, localhost, appmail.uconn.edu
>> myhostname = mail2.uits.uconn.edu
>> mynetworks = 10.4.40.194 10.4.40.193 10.4.40.189 137.99.80.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
>> newaliases_path = /usr/bin/newaliases.postfix
>> queue_directory = /var/spool/postfix
>> readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
>> relay_domains = adm.uconn.edu $mydestination
>> sample_directory = /usr/share/doc/postfix-2.6.6/samples
>> sendmail_path = /usr/sbin/sendmail.postfix
>> setgid_group = postdrop
>> smtpd_tls_exclude_ciphers = IDEA-CBC-SHA, DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, RC4, aNULL
>> unknown_local_recipient_reject_code = 550
>> virtual_alias_maps = hash:/etc/postfix/virtual regexp:/etc/postfix/maps/subaddressing
>>
>> -Angelo Fazzina
>> Operating Systems Programmer / Analyst
>> University of Connecticut,  UITS, SSG, Server Systems
>> 860-486-9075
>>

--
In theory, there is no difference between theory and practice.
In practice, there is.  .... Yogi Berra

Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Viktor Dukhovni
On Thu, Sep 07, 2017 at 09:34:55PM +0000, Fazzina, Angelo wrote:

> Victor: I messed with it a little but no change.

I did not suggest "messing" with it. :-)

> [root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
> drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
> drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
> drwx------.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
> -rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock

Note those "." characters at the end of the file mode, they likely
indicate some sort of file-access ACL beyond the file mode:

    https://www.cloudinsidr.com/content/understanding-and-settingchanging-access-privileges-on-unixlinux-files-and-directories-mode-bits-and-alternative-access-methods-explained/

    GNU's "ls" command uses a dot (".") to indicate a file with an
    *SELinux security context and no other alternate access method*.
    A file with *any other combination of alternate access methods*
    is marked with a *+* character.

So you've been SELinux'ed, now turn that off or configure it
properly.

> [root@mail2 ~]# chmod 744 /var/lib/postfix/

You should not do that, the "postfix set-permissions" command sets
the directory mode to 0700.

> [root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
> drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
> drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
> drwxr--r--.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
> -rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock

And yet the funny "." characters remain...  

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Miles Fidelman
In reply to this post by Fazzina, Angelo
Ok...

[root@mail2 pid]# service postfix stop
[root@mail2 pid]# service postfix start
Starting postfix:                                          [  OK  ]
[root@mail2 pid]# service postfix status
master dead but pid file exists

That suggests that postfix (actually master) is dying abnormally for
some unknown reason.

You might do "postfix check" to see if it finds any configuration errors.

Then you might do "postfix start -Dv" to run in debugging mode with
verbose logging, and see if you can find what's killing master.

Miles Fidelman


On 9/7/17 2:34 PM, Fazzina, Angelo wrote:

> I will try that Miles, thanks.
>
> Victor: I messed with it a little but no change.
>
>
> [root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
> drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
> drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
> drwx------.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
> -rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock
> [root@mail2 ~]# chmod 744 /var/lib/postfix/
> [root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
> drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
> drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
> drwxr--r--.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
> -rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock
>
>
> My repeatable steps so far
> [root@mail2 pid]# rm /var/spool/postfix/pid/master.pid
> rm: remove regular file `/var/spool/postfix/pid/master.pid'? y
> [root@mail2 pid]# rm /var/lock/subsys/postfix
> rm: remove regular empty file `/var/lock/subsys/postfix'? y
> [root@mail2 pid]# service postfix status
> master is stopped
> [root@mail2 pid]# service postfix stop
> [root@mail2 pid]# service postfix start
> Starting postfix:                                          [  OK  ]
> [root@mail2 pid]# service postfix status
> master dead but pid file exists
>
>
> -Angelo Fazzina
> Operating Systems Programmer / Analyst
> University of Connecticut,  UITS, SSG, Server Systems
> 860-486-9075
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Miles Fidelman
> Sent: Thursday, September 7, 2017 5:28 PM
> To: [hidden email]
> Subject: Re: can't get server to start postfix
>
> after a reboot, you could just try "postfix stop" and delete the lock
> file, then "postfix start"
>
> to find zombie processes, you could try "pstree" (shows a tree of
> processes & sub-processes, in the order they were started at init time -
> note that none of them are named postfix - the top-level process is
> named "master") - you might have to install the tools, I think they're
> part of the "process tools" package on Debian (but that's completely
> from memory) - google is yourf friend
>
> Miles Fidelman
>
>
> On 9/7/17 2:14 PM, Fazzina, Angelo wrote:
>> Server has only been on 25 minutes, I rebooted it.
>>
>> Can you see it in this list ?
>> Thanks for trying.
>> -ALF
>>
>> [root@mail2 log]# ps -ef
>> UID        PID  PPID  C STIME TTY          TIME CMD
>> root         1     0  0 16:46 ?        00:00:00 /sbin/init
>> root         2     0  0 16:46 ?        00:00:00 [kthreadd]
>> root         3     2  0 16:46 ?        00:00:00 [migration/0]
>> root         4     2  0 16:46 ?        00:00:00 [ksoftirqd/0]
>> root         5     2  0 16:46 ?        00:00:00 [stopper/0]
>> root         6     2  0 16:46 ?        00:00:00 [watchdog/0]
>> root         7     2  0 16:46 ?        00:00:00 [migration/1]
>> root         8     2  0 16:46 ?        00:00:00 [stopper/1]
>> root         9     2  0 16:46 ?        00:00:00 [ksoftirqd/1]
>> root        10     2  0 16:46 ?        00:00:00 [watchdog/1]
>> root        11     2  0 16:46 ?        00:00:00 [events/0]
>> root        12     2  0 16:46 ?        00:00:00 [events/1]
>> root        13     2  0 16:46 ?        00:00:00 [events/0]
>> root        14     2  0 16:46 ?        00:00:00 [events/1]
>> root        15     2  0 16:46 ?        00:00:00 [events_long/0]
>> root        16     2  0 16:46 ?        00:00:00 [events_long/1]
>> root        17     2  0 16:46 ?        00:00:00 [events_power_ef]
>> root        18     2  0 16:46 ?        00:00:00 [events_power_ef]
>> root        19     2  0 16:46 ?        00:00:00 [cgroup]
>> root        20     2  0 16:46 ?        00:00:00 [khelper]
>> root        21     2  0 16:46 ?        00:00:00 [netns]
>> root        22     2  0 16:46 ?        00:00:00 [async/mgr]
>> root        23     2  0 16:46 ?        00:00:00 [pm]
>> root        24     2  0 16:46 ?        00:00:00 [sync_supers]
>> root        25     2  0 16:46 ?        00:00:00 [bdi-default]
>> root        26     2  0 16:46 ?        00:00:00 [kintegrityd/0]
>> root        27     2  0 16:46 ?        00:00:00 [kintegrityd/1]
>> root        28     2  0 16:46 ?        00:00:00 [kblockd/0]
>> root        29     2  0 16:46 ?        00:00:00 [kblockd/1]
>> root        30     2  0 16:46 ?        00:00:00 [kacpid]
>> root        31     2  0 16:46 ?        00:00:00 [kacpi_notify]
>> root        32     2  0 16:46 ?        00:00:00 [kacpi_hotplug]
>> root        33     2  0 16:46 ?        00:00:00 [ata_aux]
>> root        34     2  0 16:46 ?        00:00:00 [ata_sff/0]
>> root        35     2  0 16:46 ?        00:00:00 [ata_sff/1]
>> root        36     2  0 16:46 ?        00:00:00 [ksuspend_usbd]
>> root        37     2  0 16:46 ?        00:00:00 [khubd]
>> root        38     2  0 16:46 ?        00:00:00 [kseriod]
>> root        39     2  0 16:46 ?        00:00:00 [md/0]
>> root        40     2  0 16:46 ?        00:00:00 [md/1]
>> root        41     2  0 16:46 ?        00:00:00 [md_misc/0]
>> root        42     2  0 16:46 ?        00:00:00 [md_misc/1]
>> root        43     2  0 16:46 ?        00:00:00 [linkwatch]
>> root        46     2  0 16:46 ?        00:00:00 [khungtaskd]
>> root        47     2  0 16:46 ?        00:00:00 [kswapd0]
>> root        48     2  0 16:46 ?        00:00:00 [ksmd]
>> root        49     2  0 16:46 ?        00:00:00 [khugepaged]
>> root        50     2  0 16:46 ?        00:00:00 [aio/0]
>> root        51     2  0 16:46 ?        00:00:00 [aio/1]
>> root        52     2  0 16:46 ?        00:00:00 [crypto/0]
>> root        53     2  0 16:46 ?        00:00:00 [crypto/1]
>> root        60     2  0 16:46 ?        00:00:00 [kthrotld/0]
>> root        61     2  0 16:46 ?        00:00:00 [kthrotld/1]
>> root        62     2  0 16:46 ?        00:00:00 [pciehpd]
>> root        64     2  0 16:46 ?        00:00:00 [kpsmoused]
>> root        65     2  0 16:46 ?        00:00:00 [usbhid_resumer]
>> root        66     2  0 16:46 ?        00:00:00 [deferwq]
>> root        99     2  0 16:46 ?        00:00:00 [kdmremove]
>> root       100     2  0 16:46 ?        00:00:00 [kstriped]
>> root       133     2  0 16:46 ?        00:00:00 [ttm_swap]
>> root       256     2  0 16:46 ?        00:00:00 [scsi_eh_0]
>> root       257     2  0 16:46 ?        00:00:00 [scsi_eh_1]
>> root       318     2  0 16:46 ?        00:00:00 [scsi_eh_2]
>> root       319     2  0 16:46 ?        00:00:00 [vmw_pvscsi_wq_2]
>> root       407     2  0 16:46 ?        00:00:00 [kdmflush]
>> root       409     2  0 16:46 ?        00:00:00 [kdmflush]
>> root       427     2  0 16:46 ?        00:00:00 [jbd2/dm-0-8]
>> root       428     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
>> root       511     1  0 16:46 ?        00:00:00 /sbin/udevd -d
>> root       726     2  0 16:46 ?        00:00:00 [vmmemctl]
>> root       813   511  0 16:46 ?        00:00:00 /sbin/udevd -d
>> root       816   511  0 16:46 ?        00:00:00 /sbin/udevd -d
>> root       817     2  0 16:46 ?        00:00:00 [kdmflush]
>> root       855     2  0 16:46 ?        00:00:00 [jbd2/sda1-8]
>> root       856     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
>> root       857     2  0 16:46 ?        00:00:00 [jbd2/dm-2-8]
>> root       858     2  0 16:46 ?        00:00:00 [ext4-dio-unwrit]
>> root       916     2  0 16:46 ?        00:00:00 [kauditd]
>> root      1153     2  0 16:46 ?        00:00:00 [flush-253:0]
>> root      1154     2  0 16:46 ?        00:00:00 [flush-253:2]
>> root      1464     1  0 16:46 ?        00:00:00 auditd
>> root      1498     1  0 16:46 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
>> dbus      1520     1  0 16:46 ?        00:00:00 dbus-daemon --system
>> root      1655     1  0 16:46 ?        00:00:00 /usr/sbin/sshd
>> ntp       1673     1  0 16:46 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
>> root      1685     1  0 16:46 ?        00:00:00 /usr/sbin/dovecot
>> dovecot   1686  1685  0 16:46 ?        00:00:00 dovecot/anvil
>> root      1688  1685  0 16:46 ?        00:00:00 dovecot/log
>> root      1689  1685  0 16:46 ?        00:00:00 dovecot/ssl-params
>> root      1692  1685  0 16:46 ?        00:00:00 dovecot/config
>> dovecot   1721  1685  0 16:46 ?        00:00:00 dovecot/auth
>> root      1805     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/denyhosts.py --daemon --config=/etc/denyhos
>> root      1849     1  0 16:46 ?        00:00:00 /usr/bin/python -s /usr/sbin/osad --pid-file /var/run/osad.pid
>> root      1877     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
>> root      1878     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
>> root      1879     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
>> root      1880     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
>> root      1881     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
>> root      1882     1  0 16:46 ?        00:00:00 /usr/bin/stunnel
>> root      1895     1  0 16:46 ?        00:00:00 crond
>> root      2051     1  0 16:46 ?        00:00:11 splunkd -h 127.0.0.1 -p 8089 start
>> root      2052  2051  0 16:46 ?        00:00:00 [splunkd pid=2051] splunkd -h 127.0.0.1 -p 8089 start [process-runne
>> root      2151     1  0 16:46 ?        00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmcad
>> root      2170     1  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
>> root      2184     1  0 16:46 ?        00:00:03 python /usr/bin/goferd
>> root      2211  2170  0 16:46 ?        00:00:00 /usr/bin/python /usr/bin/virt-who
>> root      2213     1  0 16:46 ?        00:00:00 rhnsd
>> root      2227     1  0 16:46 ?        00:00:00 /usr/bin/rhsmcertd
>> root      2258     1  0 16:46 ?        00:00:00 /usr/bin/ruby /usr/bin/puppet agent
>> root      2281     1  0 16:46 tty1     00:00:00 /sbin/mingetty /dev/tty1
>> root      2283     1  0 16:46 tty2     00:00:00 /sbin/mingetty /dev/tty2
>> root      2285     1  0 16:46 tty3     00:00:00 /sbin/mingetty /dev/tty3
>> root      2287     1  0 16:46 tty4     00:00:00 /sbin/mingetty /dev/tty4
>> root      2289     1  0 16:46 tty5     00:00:00 /sbin/mingetty /dev/tty5
>> root      2291     1  0 16:46 tty6     00:00:00 /sbin/mingetty /dev/tty6
>> root      2455  1655  0 16:46 ?        00:00:00 sshd: root@pts/0,pts/1
>> root      2457  2455  0 16:46 pts/0    00:00:00 -bash
>> root      2710  2455  0 16:48 pts/1    00:00:00 -bash
>> root      5235  1685  0 17:10 ?        00:00:00 dovecot/auth -w
>> root      5472  1685  0 17:12 ?        00:00:00 dovecot/auth -w
>> root      5559  1685  0 17:13 ?        00:00:00 dovecot/auth -w
>> root      5569  2457  0 17:13 pts/0    00:00:00 ps -ef
>>
>> -Angelo Fazzina
>> Operating Systems Programmer / Analyst
>> University of Connecticut,  UITS, SSG, Server Systems
>> 860-486-9075
>>
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Patrick Ben Koetter
>> Sent: Thursday, September 7, 2017 5:02 PM
>> To: [hidden email]
>> Subject: Re: can't get server to start postfix
>>
>> you have a zombie master process hanging around. Stop postfix. Get a list of
>> all running processes and check if there's a orphaned master process hanging
>> around. Kill it. Start postfix.
>>
>> p@rick
>>
>>
>>
>>
>> * Fazzina, Angelo <[hidden email]>:
>>> Hi,
>>> All of a sudden postfix won't load ?  where should I look next ?  thanks.
>>>
>>> I tried
>>> [root@mail2 postfix]# service postfix start
>>> Starting postfix:                                          [  OK  ]
>>>
>>>
>>> Logs show
>>> Sep  7 16:50:47 mail2 postfix/postfix-script[3214]: starting the Postfix mail system
>>> Sep  7 16:50:47 mail2 postfix/master[3215]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
>>>
>>> [root@mail2 postfix]# ls -l /var/lib/postfix/
>>> total 0
>>> -rw-r--r--. 1 postfix postfix 0 Sep  7 16:07 master.lock
>>>
>>>
>>>
>>> [root@mail2 postfix]# postconf -n
>>> alias_database = hash:/etc/aliases
>>> alias_maps = hash:/etc/aliases
>>> command_directory = /usr/sbin
>>> config_directory = /etc/postfix
>>> daemon_directory = /usr/libexec/postfix
>>> data_directory = /var/lib/postfix
>>> debug_peer_level = 2
>>> html_directory = no
>>> inet_interfaces = all
>>> inet_protocols = all
>>> mail_owner = postfix
>>> mailbox_size_limit = 512000000
>>> mailq_path = /usr/bin/mailq.postfix
>>> manpage_directory = /usr/share/man
>>> mydestination = $myhostname, localhost.$mydomain, localhost, appmail.uconn.edu
>>> myhostname = mail2.uits.uconn.edu
>>> mynetworks = 10.4.40.194 10.4.40.193 10.4.40.189 137.99.80.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
>>> newaliases_path = /usr/bin/newaliases.postfix
>>> queue_directory = /var/spool/postfix
>>> readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
>>> relay_domains = adm.uconn.edu $mydestination
>>> sample_directory = /usr/share/doc/postfix-2.6.6/samples
>>> sendmail_path = /usr/sbin/sendmail.postfix
>>> setgid_group = postdrop
>>> smtpd_tls_exclude_ciphers = IDEA-CBC-SHA, DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, RC4, aNULL
>>> unknown_local_recipient_reject_code = 550
>>> virtual_alias_maps = hash:/etc/postfix/virtual regexp:/etc/postfix/maps/subaddressing
>>>
>>> -Angelo Fazzina
>>> Operating Systems Programmer / Analyst
>>> University of Connecticut,  UITS, SSG, Server Systems
>>> 860-486-9075
>>>

--
In theory, there is no difference between theory and practice.
In practice, there is.  .... Yogi Berra

Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Viktor Dukhovni

> On Sep 7, 2017, at 6:01 PM, Miles Fidelman <[hidden email]> wrote:
>
> That suggests that postfix (actually master) is dying abnormally for some unknown reason.
>
> You might do "postfix check" to see if it finds any configuration errors.
>
> Then you might do "postfix start -Dv" to run in debugging mode with verbose logging, and see if you can find what's killing master.

Let's stop confusing the OP with wild guesses...

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Wietse Venema
In reply to this post by Viktor Dukhovni
Viktor Dukhovni:
> > [root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
> > drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
> > drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
> > drwxr--r--.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
> > -rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock
>
> And yet the funny "." characters remain...  

They persist even if SeLinux is disabled. Example:

# ls -ld  /var{,/lib{,/postfix{,/master.lock}}}
drwxr-xr-x. 22 root    root    4096 Sep  5 18:17 /var
drwxr-xr-x. 63 root    root    4096 Sep  5 18:17 /var/lib
drwx------.  2 postfix root    4096 Jul 30 16:53 /var/lib/postfix
-rw-------.  1 postfix postfix   33 Jul 28 08:14 /var/lib/postfix/master.lock

Note that this file contains a PID, whereas on the broken system,
the master daemon aborts before it can lock and update the file.

You might want to remove that file, and fsck the file system, before
starting Postfix.

        Wietse
Reply | Threaded
Open this post in threaded view
|

RE: can't get server to start postfix

Fazzina, Angelo
In reply to this post by Viktor Dukhovni
Thank you all for trying to help.

I ran
Yum remove postfix
I moved any directories not deleted
I have SELinux disabled  in /etc/sysconfig/

I ran yum install postfix.

Still same error, this is crazy.
-ALF

-Angelo Fazzina
Operating Systems Programmer / Analyst
University of Connecticut,  UITS, SSG, Server Systems
860-486-9075


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Viktor Dukhovni
Sent: Thursday, September 7, 2017 5:48 PM
To: [hidden email]
Subject: Re: can't get server to start postfix

On Thu, Sep 07, 2017 at 09:34:55PM +0000, Fazzina, Angelo wrote:

> Victor: I messed with it a little but no change.

I did not suggest "messing" with it. :-)

> [root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
> drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
> drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
> drwx------.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
> -rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock

Note those "." characters at the end of the file mode, they likely
indicate some sort of file-access ACL beyond the file mode:

    https://www.cloudinsidr.com/content/understanding-and-settingchanging-access-privileges-on-unixlinux-files-and-directories-mode-bits-and-alternative-access-methods-explained/

    GNU's "ls" command uses a dot (".") to indicate a file with an
    *SELinux security context and no other alternate access method*.
    A file with *any other combination of alternate access methods*
    is marked with a *+* character.

So you've been SELinux'ed, now turn that off or configure it
properly.

> [root@mail2 ~]# chmod 744 /var/lib/postfix/

You should not do that, the "postfix set-permissions" command sets
the directory mode to 0700.

> [root@mail2 ~]#  bash -c "ls -ld /var{,/lib{,/postfix{,/master.lock}}}"
> drwxr-xr-x. 20 root    root    4096 Mar  2  2017 /var
> drwxr-xr-x. 29 root    root    4096 Sep  7 03:46 /var/lib
> drwxr--r--.  2 postfix postfix 4096 Sep  7 16:07 /var/lib/postfix
> -rw-r--r--.  1 postfix postfix    0 Sep  7 16:07 /var/lib/postfix/master.lock

And yet the funny "." characters remain...  

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: can't get server to start postfix

Viktor Dukhovni

> On Sep 8, 2017, at 10:07 AM, Fazzina, Angelo <[hidden email]> wrote:
>
> I ran
> Yum remove postfix
> I moved any directories not deleted
> I have SELinux disabled  in /etc/sysconfig/
>
> I ran yum install postfix.
>
> Still same error, this is crazy.

You're not providing actionable information.  Does the "ls -ld"
command still report alternative access control for any of
the directories on the path from the root to
"/var/lib/postfix/master.lock"?

If so, master(8) likely still gets "Permission" denied when trying
to open the lock file.

Either you're wrong and SELinux is not disabled, or as Wietse
suggested there could be filesystem corruption, or there are
inherited access controls in place down from /var, etc.

You can test whether the restriction is still in place by giving
the "postfix" user a shell of "/bin/sh", then:

   # su postfix
   $ touch /var/lib/postfix/master.lock # Likely fails
   $ echo $$ > /var/lib/postfix/master.lock   # Likely fails

Fixing SELinux and broken filesystems is not a subject matter
for Postfix experts, best to ask on some forum dedicated for
your O/S, or just hunker down and figure it out.  Come back
to this list when the Postfix user has full rights to the
/var/lib/postfix/ directory.

--
        Viktor.