Postfix and MailScanner

From GreyWiki
Jump to: navigation, search

So, in a series of flavors of Ubuntu, MailScanner has a little problem with who to run as.

"The problem is with the init script. In /etc/init.d/mailscanner, I had to add -c ${user} to the start-stop-daemon line, since it had no idea what user to run as. It was strange that when called from the command line as (for me) sudo -u Debian-exim MailScanner, it would work.

"So, the modified line in the init script should look something like:

start-stop-daemon --start --quiet --startas $STARTAS --name $NAME --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --nicelevel $run_nice -c ${user} --exec $DAEMON --name $NAME -- $DAEMON_ARGS \
|| return 2

"Add the -c ${user}, restart mailscanner, and it'll be back working."

(Explanation from: http://ubuntuforums.org/showthread.php?t=1313599&page=2)

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox