> - my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
> + my ($name) = ($0 =~ m#(.*?)/([^/]+)$#);
Please don't make stylistic changes as part of other patches. The
general qpsmtpd standard is to use ! in this case, not #.
> $configdir = "$name/config" if (-e "$name/config/$config");
> + if (exists $ENV{QPSMTP_CONFIG}) {
> + $configdir = $ENV{QPSMTP_CONFIG} if (-e "$ENV{QPSMTP_CONFIG}/$config");
> + }
First, we always call this QPSMTPD, never QPSMTP.
It is probably cleaner to refactor the $0 stuff here instead of just
slamming in another option. (Thus it would be QPSMTPD_ROOT or
something.) It's still got lots of the historical stuff. Also, to
conform with existing style, you'd probably want:
$configdir = "$ENV{QPSMTPD_ROOT}/config"
if exists $ENV{QPSTMPD_ROOT} && -e "$ENV{QPSMTPD_ROOT}/config";
> +my $PID_FILE = '/var/run/qpsmtpd.pid';
This should default to somewhere in QPSMTPD_ROOT.
> + -P, --plugin-dir D : load plugins from directory D
> + -C, --config-dir C : load plugins from directory C
typo.
also, do we really need seperate plugin and config dir specifiers
if we have QPSMTPD_ROOT? What's the logic?
> + --pid-file P : print main servers PID to file P
No short flag?
> + 'C|config-dir=s' => \$CONFIG_DIR,
> + 'pid-file=s',) || &usage;
Indentation problem.
-R