[Mageia-dev] saslauthd + systemd + postfix

Colin Guthrie mageia at colin.guthr.ie
Tue Oct 30 17:55:28 CET 2012


Hi guys,

OK, so I just upgraded my final mga1 machine to mga2.

I ran into a problem with my authenticated postfix setup where I make
postfix authenticate with saslauthd.

Digging into the issue, it's a systemd unit conversion problem.

In the old sysvinit script for saslauthd it creates hardlinks from
/var/run/saslauthd/mux (the main socket) to /var/lib/sasl2/mux and
/var/spool/postfix/var/run/saslauthd/mux

These hardlinks allow legacy support (the first one which is the path
defined in /etc/saslauthd/smtp.conf) and for postfix to use it from
within a chroot.

Both of these solutions no longer work since saslauthd was updated to a
systemd unit.

I "fixed" this by adding the lines:

ExecStartPost=-/bin/mkdir -p /var/spool/postfix/var/run/saslauthd
/var/lib/sasl2
ExecStartPost=-/bin/ln -f /var/run/saslauthd/mux
/var/spool/postfix/var/run/saslauthd/mux
ExecStartPost=-/bin/ln -f /var/run/saslauthd/mux /var/lib/sasl2/mux


to the systemd unit in my install (I might push an update for this more
generally, but it will depend on the rest of this mail).


Now this works in mga2, but in mga3 /var/run is just a symlink to /run
which is on tmpfs. We obviously cannot use hardlinks as a solution here.

It kinda sucks anyway.

So, what should we do? Should we switch to bind mounts? Should we make
saslauthd/postfix use abstract sockets instead to get around the chroot?

Any thoughts/suggestions welcome!

Col



-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list