[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to detect if Sendmail/Postfix/Qmail is installed



> In this case, should the package just document what the use
> should do (it will be different for each MTA) or at least
> detect which MTA is installed and copy an example config file

Ensure that the depends: field in control has something like
Depends: (sendmail | qmail | postfix)

> in the correct place for whichever MTA is installed?

Is this method correct?

for pkg in sendmail qmail postfix; do
if dpkg -s $pkg 2>/dev/null | grep -E "^Status: install ok installed"  >/dev/null; then
INSTPKG=$pkg
fi
done
case $INSTPKG in
sendmail)
...
;;
qmail)
...
;;
postfix)
...
;;
esac









Reply to: