Subject: | vpopmail.pm doesn't handle alias domains when reading from users/assign |
Hi, in the vgetdomaindir subroutine of vgetdomaindir, you read in the assign from from qmail to determine the list of domains. However, you read the domains from the second field (dom), which is not inaccurate, but will never match an alias domain. Instead, pull the domain name from the first field and use a regexp to match it:
my ($d, $dir) = (split(/:/, $line))[0,4];
#my ($d, $dir) = (split(/:/, $line))[1,4];
if ( $d =~ /[+-]$domain[.]$/ ) {
# if ( $domain eq $d ) {
Then you can retrieve a directory for an alias domain as well. :)
Matt