also sprach ondrej:
> > (for now. :)
> >
> > I spoke too soon when I said things were working last time. There
> > were still
> > multiple deliveries.
> >
> > I've finally solved all problems involved by doing:
> >
> >   .qmail-default:
> >     | /usr/local/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]
> 
> This works as it should?

Yep. :)

> I don't remember that I saw part
> of code which resolves external address in vdelivermail
> source. (IE. This will NOT work.)

It doesn't. Rather, it grabs the environment variable HOST to determine the
target domain:

  TheUser = getenv("EXT");
  TheDomain = getenv("HOST");

  pw_data=pop_user_exist(TheUser,TheDomain,prefix,bounce);

  if (!pw_data) {
    if ( !is_bounce(bounce) ) {
      printf ("POP user does not exist, but will deliver to %s\n",bounce);
    }
    deliverto = bounce;
  } [...]

Later, it calls the function email_it with the target address directly, so
it doesn't need to resolve any external address.

> Most probably you want to setup dotqmail file for each
> real user in domain and set up these files:
> 
> .qmail-default
> &[EMAIL PROTECTED]
> 
> .qmail-mgmt
> &[EMAIL PROTECTED]
>  | /usr/local/vpopmail/bin/vdelivermail '' u2
>  | /usr/local/vpopmail/bin/vdelivermail '' u3
> 
> .qmail-u1
> &[EMAIL PROTECTED]
> 
> This will work because all user which don't have their dotqmail
> file gets rewritten to [EMAIL PROTECTED]

It should also work to deliver to users that don't have a .qmail-user file
at all, right? (That is, users that receive and keep mail at that virtual
domain.)

> >   .qmail-mgmt:
> >     | /usr/local/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]
> >     | /usr/local/vpopmail/bin/vdelivermail '' u2
> >     | /usr/local/vpopmail/bin/vdelivermail '' u3
> >   .qmail-u1:
> >     | /usr/local/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]
> 
> > If I stick the config from .qmail-mgmt into .qmail-default (which SHOULD
> > work!),
> 
> No it shouldn't!  You badly misunderstood how vpopmail works.

You're right, I totally misunderstood how it works. I sincerely appreciate
your patient explanation of all the finer points; it helped tremendously!

> > So it would appear to have something to do with having multiple lines in
> > .qmail-default and *something* else in my setup. Whatever...
> 
> Other solution would be to (over)talk iv0 to change vdelivermail behaviour
> so it returns error code (99 I think) on successful delivery, so one can
> write .qmail-default like this:
> 
> .qmail-default
> |<path_to>/vdelivermail
> &[EMAIL PROTECTED]
>   (or something like that ... ie. qmail-local should understand it)
> 
> But I don't think this is a good idea.  I maybe able to do it for you
> for something small. (postcard or rather chocolate or two ;-)
> (In case I will have time to do it.)

I agree that it would be silly to return an error on successful delivery, on
principle alone. Now that I've got a grasp on how exactly it works, I can
appreciate how to make the system work for me. :)

Thank you again for your post. You've educated the ``uneducatable''. :)

/pg
-- 
Peter Green : Gospel Communications Network, SysAdmin : [EMAIL PROTECTED]
---
At first I thought, if I were Superman, a perfect secret identity would be 
'Clark Kent, Dentist,' because you could save money on tooth X-rays. But then 
I thought, if a patient said: How's my back tooth? and you just looked at it 
with your X-ray vision and said: Oh it's okay, then the patient would probably 
say: Aren't you going to take an X-ray, stupid? and you'd say: Aw &*$# you, 
get outta here, and then he probably wouldn't even pay his bill.
 (Jack Handey)

Reply via email to