Hi,
I've got vpopmail 4.8a installed, and a virtual domain happily installed
and working.
However, I now want to modify the .qmail-default file for this virtual
domain (say normal.server.com) so that mail that is directed to an
unknown virtual user gets delivered to another mail server
(newmail.server.com).
Now, with qmail alone, the line:
| forward "$LOCAL"@newmail.server.com
in ~alias/.qmail-default would do the trick.
However, in /home/vpopmail/domains/normal.server.com/.qmail-default is
the entry:
| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
If I modify this to read:
| /home/vpopmail/bin/vdelivermail '' forward
"$LOCAL"@newmail.server.com
then it would do exactly what I want, except for the fact that $LOCAL
contains "normal.server.com-username", instead of the "username" that
the newmail.server.com mail server is expecting.
Now, I could fix this with some perl, say call it domainStrip.pl:
#!/usr/bin/perl
print(s/^normal\.server\.com-//);
but I'm not sure how to string it all together in .qmail-default for the
virtual domain so that it tries to use vdelivermail, and if that fails,
takes $LOCAL, pipes it into domainStrip.pl, and forward to the result
@newmail.server.com.
Can anyone please help me complete it? I'm so close, I know it....
The other way that I can think to do the same thing is to have vadduser
also create a .qmail-username file for each virtual user in that domain,
where the .qmail-username file contains something like:
./username/Maildir/
That way, I can avoid trying to get the above perl stripping and
forwading to work in combination with vdelivermail.
However, I understand that vpopmail may not always create each user in
their own directory directly in
/home/vpopmail/domains/normal.server.com/. Is that correct?
Or is there a simple way to do this that I've overlooked?
TIA,
--
Andrew Hill