Discussion:
[users] update mimedefang-2.72-2.el5 killed mimedefang
Tilman Schmidt
2011-10-29 17:10:52 UTC
Permalink
The latest update of package mimedefang added a code section to the
init script /etc/init.d/mimedefang to initialize the directory
/var/spool/MIMEDefang. Unfortunately it sets the owner to "defang",
ignoring the setting of the configuration variable MX_USER.
This kills MIMEDefang installations such as mine where the
configuration variable MX_USER has been changed from the default
"defang".

To fix that problem, I propose something like the following patch:
(Sorry for whitespace damage and line wrap, I'm quite busy getting all
our mail servers to work properly again right now, so I'm just pushing
this raw out of the door.)

- --- /etc/init.d/mimedefang 2011-10-08 23:24:54.000000000 +0200
+++ /tmp/mimedefang 2011-10-29 18:51:58.000000000 +0200
@@ -104,11 +104,12 @@

# Since /var/spool/MIMEDefang might be tmpfs, ensure that it is
properly
# initialized.
- - chown defang:defang /var/spool/MIMEDefang
+ MDUSER=${MX_USER:-defang}
+ chown ${MDUSER}:${MDUSER} /var/spool/MIMEDefang
restorecon -R /var/spool/MIMEDefang >/dev/null 2>&1
if [ ! -d /var/spool/MIMEDefang/.razor ]; then
mkdir /var/spool/MIMEDefang/.razor
- - chown defang:defang /var/spool/MIMEDefang/.razor
+ chown ${MDUSER}:${MDUSER} /var/spool/MIMEDefang/.razor
chmod 0750 /var/spool/MIMEDefang/.razor
fi
if [ ! -L /var/spool/MIMEDefang/.razor/razor-agent.log ]; then
@@ -116,7 +117,7 @@
# In order to prevent it from filling up the spool, we just link
it to
# /dev/null.
ln -sf /dev/null /var/spool/MIMEDefang/.razor/razor-agent.log
- - chown -h defang:defang
/var/spool/MIMEDefang/.razor/razor-agent.log
+ chown -h ${MDUSER}:${MDUSER}
/var/spool/MIMEDefang/.razor/razor-agent.log
fi

echo -n "Starting $prog-multiplexor: "

Thanks,
Tilman

- --
Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany
Tilman Schmidt
2011-10-31 11:47:50 UTC
Permalink
Ignore that. I just noticed that the update didn't come from repoforge.
Sorry for the noise.
Post by Tilman Schmidt
The latest update of package mimedefang added a code section to the
init script /etc/init.d/mimedefang to initialize the directory
/var/spool/MIMEDefang. Unfortunately it sets the owner to "defang",
ignoring the setting of the configuration variable MX_USER.
[...]
--
Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany
Tilman Schmidt
2011-10-29 17:10:52 UTC
Permalink
The latest update of package mimedefang added a code section to the
init script /etc/init.d/mimedefang to initialize the directory
/var/spool/MIMEDefang. Unfortunately it sets the owner to "defang",
ignoring the setting of the configuration variable MX_USER.
This kills MIMEDefang installations such as mine where the
configuration variable MX_USER has been changed from the default
"defang".

To fix that problem, I propose something like the following patch:
(Sorry for whitespace damage and line wrap, I'm quite busy getting all
our mail servers to work properly again right now, so I'm just pushing
this raw out of the door.)

- --- /etc/init.d/mimedefang 2011-10-08 23:24:54.000000000 +0200
+++ /tmp/mimedefang 2011-10-29 18:51:58.000000000 +0200
@@ -104,11 +104,12 @@

# Since /var/spool/MIMEDefang might be tmpfs, ensure that it is
properly
# initialized.
- - chown defang:defang /var/spool/MIMEDefang
+ MDUSER=${MX_USER:-defang}
+ chown ${MDUSER}:${MDUSER} /var/spool/MIMEDefang
restorecon -R /var/spool/MIMEDefang >/dev/null 2>&1
if [ ! -d /var/spool/MIMEDefang/.razor ]; then
mkdir /var/spool/MIMEDefang/.razor
- - chown defang:defang /var/spool/MIMEDefang/.razor
+ chown ${MDUSER}:${MDUSER} /var/spool/MIMEDefang/.razor
chmod 0750 /var/spool/MIMEDefang/.razor
fi
if [ ! -L /var/spool/MIMEDefang/.razor/razor-agent.log ]; then
@@ -116,7 +117,7 @@
# In order to prevent it from filling up the spool, we just link
it to
# /dev/null.
ln -sf /dev/null /var/spool/MIMEDefang/.razor/razor-agent.log
- - chown -h defang:defang
/var/spool/MIMEDefang/.razor/razor-agent.log
+ chown -h ${MDUSER}:${MDUSER}
/var/spool/MIMEDefang/.razor/razor-agent.log
fi

echo -n "Starting $prog-multiplexor: "

Thanks,
Tilman

- --
Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany
Tilman Schmidt
2011-10-31 11:47:50 UTC
Permalink
Ignore that. I just noticed that the update didn't come from repoforge.
Sorry for the noise.
Post by Tilman Schmidt
The latest update of package mimedefang added a code section to the
init script /etc/init.d/mimedefang to initialize the directory
/var/spool/MIMEDefang. Unfortunately it sets the owner to "defang",
ignoring the setting of the configuration variable MX_USER.
[...]
--
Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany
Loading...