"postfix.sh", "start" => $start, "stop" => $stop)); conf_mount_ro(); log_error("Stopping postfix"); mwexec("/usr/local/etc/rc.d/postfix.sh stop"); sleep(1); log_error("Starting postfix"); mwexec_bg("/usr/local/etc/rc.d/postfix.sh start"); log_error("Postfix setup completed"); } function postfix_validate_input($post, &$input_errors) { foreach ($post as $key => $value) { if (empty($value)) continue; if (substr($key, 0, 6) == "domain" && is_numeric(substr($key, 6))) { if (!is_domain($value)) $input_errors[] = "{$value} is not a valid domain name."; } else if (substr($key, 0, 12) == "mailserverip" && is_numeric(substr($key, 12))) { if (empty($post['domain' . substr($key, 12)])) $input_errors[] = "Domain for {$value} cannot be blank."; if (!is_ipaddr($value) && !is_hostname($value)) $input_errors[] = "{$value} is not a valid IP address or host name."; } } } function postfix_php_install_command() { sync_package_postfix(); } function postfix_php_deinstall_command() { mwexec("/usr/local/etc/rc.d/postfix.sh stop"); sleep(1); conf_mount_rw(); unlink_if_exists("/usr/local/etc/rc.d/postfix.sh"); conf_mount_ro(); } ?>