| @@ -1,34 +1,35 @@ | | | @@ -1,34 +1,35 @@ |
1 | #!/bin/sh | | 1 | #!/bin/sh |
2 | # | | 2 | # |
3 | # $NetBSD: postfix,v 1.16 2009/04/15 22:11:32 perry Exp $ | | 3 | # $NetBSD: postfix,v 1.17 2015/07/23 17:12:16 riz Exp $ |
4 | # | | 4 | # |
5 | | | 5 | |
6 | # PROVIDE: mail | | 6 | # PROVIDE: mail |
7 | # REQUIRE: LOGIN | | 7 | # REQUIRE: LOGIN |
8 | # we make mail start late, so that things like .forward's are not | | 8 | # we make mail start late, so that things like .forward's are not |
9 | # processed until the system is fully operational | | 9 | # processed until the system is fully operational |
10 | | | 10 | |
11 | $_rc_subr_loaded . /etc/rc.subr | | 11 | $_rc_subr_loaded . /etc/rc.subr |
12 | | | 12 | |
13 | name="postfix" | | 13 | name="postfix" |
14 | rcvar=$name | | 14 | rcvar=$name |
15 | postfix_command="/usr/sbin/${name}" | | 15 | postfix_command="/usr/sbin/${name}" |
16 | required_files="/etc/${name}/main.cf" | | 16 | required_files="/etc/${name}/main.cf" |
17 | start_precmd="postfix_precmd" | | 17 | start_precmd="postfix_precmd" |
18 | start_cmd="postfix_op" | | 18 | start_cmd="postfix_op" |
19 | stop_cmd="postfix_op" | | 19 | stop_cmd="postfix_op" |
20 | reload_cmd="postfix_op" | | 20 | reload_cmd="postfix_op" |
21 | extra_commands="reload" | | 21 | status_cmd="postfix_op" |
| | | 22 | extra_commands="reload status" |
22 | spooletcdir="/var/spool/${name}/etc" | | 23 | spooletcdir="/var/spool/${name}/etc" |
23 | postconf="/usr/sbin/postconf" | | 24 | postconf="/usr/sbin/postconf" |
24 | required_dirs=$spooletcdir | | 25 | required_dirs=$spooletcdir |
25 | | | 26 | |
26 | _rebuild() { | | 27 | _rebuild() { |
27 | echo "${name}: rebuilding ${1} ($2 ${1}.db)" | | 28 | echo "${name}: rebuilding ${1} ($2 ${1}.db)" |
28 | $($postconf -h newaliases_path) | | 29 | $($postconf -h newaliases_path) |
29 | } | | 30 | } |
30 | | | 31 | |
31 | postfix_precmd() | | 32 | postfix_precmd() |
32 | { | | 33 | { |
33 | # As this is called after the is_running and required_dir checks | | 34 | # As this is called after the is_running and required_dir checks |
34 | # are made in run_rc_command(), we can safely assume ${spooletcdir} | | 35 | # are made in run_rc_command(), we can safely assume ${spooletcdir} |