Einar Bordewich wrote:
>
> The command vaddaliasdomain is broken in vpopmail-4.9.5
>
> Running this command: vaddaliasdomain test.com test.no
>
> Gives:
> in /var/qmail/users/assign:
> +test.no-:test.no:1000:1000:/home/vpopmail/domains/test.no:-::
> +test.com-:test.com:1000:1000:/home/vpopmail/domains/test.no/domains/test.co
> m:-::
> .
>
> in /var/qmail/virtualdomains
> test.no:test.no
> test.com:test.com
>
> and in /home/vpopmail/domains/test.no
> -rw------- 1 vpopmail vchkpw 73 Sep 21 13:26
> /home/vpopmail/domains/test.no/.qmail-default
> drwx------ 3 vpopmail vchkpw 4096 Sep 6 01:18 postmaster
> lrwxrwxrwx 1 root root 38 Oct 18 19:09 test.com ->
> /home/vpopmail/domains/test.no/test.no
>
> Mismatch with home catalog, and also the symbolic link.
>
> The correct way would be:
>
> in /var/qmail/users/assign:
> +test.no-:test.no:1000:1000:/home/vpopmail/domains/test.no:-::
> +test.com-:test.no:1000:1000:/home/vpopmail/domains/test.no:-::
> .
>
> in /var/qmail/virtualdomains
> test.no:test.no
> test.com:test.no
>
> and in /home/vpopmail/domains/test.no
> do nothing.
>
> BTW: There also should be an vdelaliasdomain for removing domains not longer
> in use, or changed names.
Okay, this is fixed in my development version. I'll release it later
today.
The vdeldomain function understands aliased domains. So we don't
need a vdelaliasdomain program.
Internal to vdeldomain, what it does is first try to unlink the
directory.
If that succeeds, which would mean it was able to unlink the symbolic
link, then it returns success:
int vdelfiles(dir)
...
if ( unlink(dir) == 0 ) return(0);
/* fails for real dirs, succeeds for symbolic links */
Ken Jones