Re: how to test for a qmail virtualdomain?
Tim <[EMAIL PROTECTED]> writes: > I would say the most reliable way would be to just parse > /var/qmail/virtualdomains and compare the LHS with $HOST (although > this is a problem while somebody has updated virtualdomains but > haven't sent -HUP to qmail-send yet). In this case, how about comparing $HOST with control/locals? Someone suggested this in a private message since when qmail rewrites a virtualdomain address into a local one, it changes $USER, but not $HOST. If $HOST is in locals, then it's not a virtualdomain address. Any exceptions to this? > Do you just need to test for these three packages or does it need to > handle all types (for example, maildrop has its own virtual users > mechanism)? All types, I just wasn't aware of maildrop's virtual users mechanism. > How reliable does it need to be? Wholly. If not, I'll just make the user set a configuration variable to tell the application to expect a virtualdomain. -- (TMDA - http://tmda.sourceforge.net/) (A qmail-based SPAM reduction system)
Re: how to test for a qmail virtualdomain?
"Jason R. Mastaler" <[EMAIL PROTECTED]> wrote: >Does anyone know of a reliable way to programatically test whether an >incoming message is part of a qmail "virtualdomain" or not? I think you'll have to parse control/virtualdomains. >I've been looking at qmail-send's environment variables under >both a regular setup and a virtualdomain, and can't find a surefire >way to differentiate the two cases. With a virtualdomains entry like: virtual.domain:de5-virtual A message sent to [EMAIL PROTECTED] is very similar to a message sent to de5-foo@localhost. Diff'ing the qmail-command environments, I get: < HOST2=sws5.ctd.ornl < HOST3=sws5.ctd < DTLINE=Delivered-To: [EMAIL PROTECTED] < HOST4=sws5 < HOST=sws5.ctd.ornl.gov < [EMAIL PROTECTED] --- > HOST2=virtual > HOST3=virtual > DTLINE=Delivered-To: [EMAIL PROTECTED] > HOST4=virtual > HOST=virtual.domain > [EMAIL PROTECTED] -Dave
Re: how to test for a qmail virtualdomain?
I would say the most reliable way would be to just parse /var/qmail/virtualdomains and compare the LHS with $HOST (although this is a problem while somebody has updated virtualdomains but haven't sent -HUP to qmail-send yet). Do you just need to test for these three packages or does it need to handle all types (for example, maildrop has its own virtual users mechanism)? How reliable does it need to be? Tim On Wed, May 16, 2001 at 09:53:13AM -0600, Jason R. Mastaler wrote: > Does anyone know of a reliable way to programatically test whether an > incoming message is part of a qmail "virtualdomain" or not? > > I've been looking at qmail-send's environment variables under > both a regular setup and a virtualdomain, and can't find a surefire > way to differentiate the two cases. Take a look at qmail-command(8) > under "ENVIRONMENT VARIABLES" to see what I'm talking about. > > I need a method that works under vmailmgr, vpopmail, and qmail's > builtin "virtualdomains" support. > > For example, under vpopmail, the 'USER' environment variable is set to > the virtualdomain instead of the username, so this is easily tested > for (if username != $USER, ...). However, this isn't the case under > vmailmgr or "virtualdomains". > > Thanks. > > -- > (TMDA - http://tmda.sourceforge.net/) > (A qmail-based SPAM reduction system)
how to test for a qmail virtualdomain?
Does anyone know of a reliable way to programatically test whether an incoming message is part of a qmail "virtualdomain" or not? I've been looking at qmail-send's environment variables under both a regular setup and a virtualdomain, and can't find a surefire way to differentiate the two cases. Take a look at qmail-command(8) under "ENVIRONMENT VARIABLES" to see what I'm talking about. I need a method that works under vmailmgr, vpopmail, and qmail's builtin "virtualdomains" support. For example, under vpopmail, the 'USER' environment variable is set to the virtualdomain instead of the username, so this is easily tested for (if username != $USER, ...). However, this isn't the case under vmailmgr or "virtualdomains". Thanks. -- (TMDA - http://tmda.sourceforge.net/) (A qmail-based SPAM reduction system)
Re: qmail+virtualdomain
On Fri, Jan 26, 2001 at 12:05:18PM +0100, Massimiliano Santarelli wrote: > Well , now i put "avatar.yi.org:alias-avatar" into virtualdomains file, > and made a: touch ~alias/.qmail-avatar-pluto > Into my locals file i've: cikosub.yi.org > but if i send a mail to [EMAIL PROTECTED] and [EMAIL PROTECTED] > it seems there's no difference between the two domains for the same user. Did you kill -HUP pidof(qmail-send) \Maex -- SpaceNet AG| Joseph-Dollinger-Bogen 14 | Fon: +49 (89) 32356-0 Research & Development | D-80807 Muenchen| Fax: +49 (89) 32356-299 Stress is when you wake up screaming and you realize you haven't fallen asleep yet.
Re: qmail+virtualdomain
On Thu, 25 Jan 2001, you wrote: > Your virtualdomain is not called 'virtualdomain' so stop lying about > that. > > Show us the contents of your configfiles, especially locals and > virtualdomains, please. > > Greetz, Peter. Well , now i put "avatar.yi.org:alias-avatar" into virtualdomains file, and made a: touch ~alias/.qmail-avatar-pluto Into my locals file i've: cikosub.yi.org but if i send a mail to [EMAIL PROTECTED] and [EMAIL PROTECTED] it seems there's no difference between the two domains for the same user. thanks Massimiliano
Re: qmail+virtualdomain
On Thu, Jan 25, 2001 at 06:05:48PM +0100, Massimiliano Santarelli wrote: > modifying the locals/rcpthost files , > and in virtualdomain file (newvirtualdomain:newuser). ^ > How can i solve this problem and split different users with different > virtualdomain?? Maybe in just using the right filenames... you missed the last s each. virtualdomains and rctphosts are right. -- Henning Brauer | BS Web Services Hostmaster BSWS| Roedingsmarkt 14 [EMAIL PROTECTED] | 20459 Hamburg http://www.bsws.de | Germany
Re: qmail+virtualdomain
> Well, if i try to delete the virtualdomain from "locals" file,leaving it only in > the "virtualdomains" file, i obtain: > > : > Sorry, no mailbox here by that name. (#5.1.1) Of course you have to provide a .qmail file that catches your address. In the case of this address it would be ~newuser/.qmail-newuser or ~newuser/.qmail-default. Try to understand how the extension mechanism in qmail works - after that you will understand how virtual domains may be implemented. Two packages that handle virtual domains for you are mentioned on www.qmail.org. Regards, Frank
Re: qmail+virtualdomain
On Thu, Jan 25, 2001 at 07:56:04PM +0100, Massimiliano Santarelli wrote: > Well, if i try to delete the virtualdomain from "locals" file,leaving it only in > the "virtualdomains" file, i obtain: > > : > Sorry, no mailbox here by that name. (#5.1.1) Your virtualdomain is not called 'virtualdomain' so stop lying about that. Show us the contents of your configfiles, especially locals and virtualdomains, please. Greetz, Peter.
Re: qmail+virtualdomain
Well, if i try to delete the virtualdomain from "locals" file,leaving it only in the "virtualdomains" file, i obtain: : Sorry, no mailbox here by that name. (#5.1.1) thans Massimiliano On Thu, 25 Jan 2001, you wrote: > On Thu, Jan 25, 2001 at 06:05:48PM +0100, Massimiliano Santarelli wrote: > > HI! i've compiled qmail on mi server and it works well! > > Now, i'm still trying to add a virtualdomain, > > modifying the locals/rcpthost files , > > and in virtualdomain file (newvirtualdomain:newuser). > > But if i try to send mail to newuser@hostname, the delivery happen! so the > > account newuser@newvirtualdomain and newuser@hostname seems to be the same > > thing for the user called "newuser" > > How can i solve this problem and split different users with different > > virtualdomain?? > > Make sure that any domain you want to handle virtually is *not* > mentioned in locals. > > If you mention a domain in locals *and* in virtualdomains, locals > takes precedence. > > Greetz, Peter.
Re: qmail+virtualdomain
On Thu, Jan 25, 2001 at 06:05:48PM +0100, Massimiliano Santarelli wrote: > HI! i've compiled qmail on mi server and it works well! > Now, i'm still trying to add a virtualdomain, > modifying the locals/rcpthost files , > and in virtualdomain file (newvirtualdomain:newuser). > But if i try to send mail to newuser@hostname, the delivery happen! so the > account newuser@newvirtualdomain and newuser@hostname seems to be the same > thing for the user called "newuser" > How can i solve this problem and split different users with different > virtualdomain?? Make sure that any domain you want to handle virtually is *not* mentioned in locals. If you mention a domain in locals *and* in virtualdomains, locals takes precedence. Greetz, Peter.
Re: qmail+virtualdomain
On Thu, Jan 25, 2001 at 06:05:48PM +0100, Massimiliano Santarelli wrote: > modifying the locals/rcpthost files , > and in virtualdomain file (newvirtualdomain:newuser). A domain has to be either in locals OR virtualdomains, not in both (if you have it in both, locals overrides virtualdomains). Don;t forget to kill -HUP `pidof qmail-send` after making changes to locals and/or virtualdomains file. \Maex -- SpaceNet AG| Joseph-Dollinger-Bogen 14 | Fon: +49 (89) 32356-0 Research & Development | D-80807 Muenchen| Fax: +49 (89) 32356-299 Stress is when you wake up screaming and you realize you haven't fallen asleep yet.
Re: qmail+virtualdomain
> thing for the user called "newuser" > How can i solve this problem and split different users with different > virtualdomain?? Is virtualdomain still in "locals"?
qmail+virtualdomain
HI! i've compiled qmail on mi server and it works well! Now, i'm still trying to add a virtualdomain, modifying the locals/rcpthost files , and in virtualdomain file (newvirtualdomain:newuser). But if i try to send mail to newuser@hostname, the delivery happen! so the account newuser@newvirtualdomain and newuser@hostname seems to be the same thing for the user called "newuser" How can i solve this problem and split different users with different virtualdomain?? Massimiliano