Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

Local dynamic redirect in dot qmail / environment variable in dot qmail

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


rickb at rapidvps

Jul 1, 2008, 8:29 PM

Post #1 of 3 (365 views)
Permalink
Local dynamic redirect in dot qmail / environment variable in dot qmail

Hello qmail list,

I wish to deliver mail to a dynamic local user name and the user name is
determined by a script. I want my .qmail-default to look like this:

| /path/to/script
/home/vpopmail/domains/domain.com/$LOCAL/


The script /path/to/script will set $LOCAL (or any other environment
variable) and then qmail-local will deliver the email to that local
account. Is this possible? If not, is there any work around?

Such as- is there any way to call qmail-local directly form inside
/path/to/script? I read over the dot-qmail and qmail-local man pages but
could not find anything similar to this.

Thank you
Rick Blundell


kyle-qmail at memoryhole

Jul 2, 2008, 7:56 AM

Post #2 of 3 (348 views)
Permalink
Re: Local dynamic redirect in dot qmail / environment variable in dot qmail [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, July 1 at 11:29 PM, quoth Rick Blundell:
> I wish to deliver mail to a dynamic local user name and the user
> name is determined by a script. I want my .qmail-default to look
> like this:
>
> | /path/to/script
> /home/vpopmail/domains/domain.com/$LOCAL/

That won't work. A script in your .qmail file cannot affect the
environment of successive delivery instructions. What you *can* do is
have the script do the delivery. For example, the script could call
safecat, like so:

#!/bin/sh
YOURVAR=something
safecat /home/vpopmail/domains/domain.com/$YOURVAR/{tmp,new}

> Such as- is there any way to call qmail-local directly form inside
> /path/to/script?

Of course you can call qmail-local, but you probably don't want to do
that, since (aside from being complicated) qmail-local expects to
follow delivery instructions from a .qmail file.

~Kyle
- --
Usenet is like a herd of performing elephants with diarrhea---massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it.
-- Gene Spafford
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkhrly4ACgkQBkIOoMqOI15CrACdGDrEpVfCrLY/SxiHDsvkJz2a
qXoAoLBFfy+nqtAQ9DUVMdpOhDPvlzVO
=VZlF
-----END PGP SIGNATURE-----


rickb at rapidvps

Jul 3, 2008, 6:45 AM

Post #3 of 3 (331 views)
Permalink
Re: Local dynamic redirect in dot qmail / environment variable in dot qmail [In reply to]

On Tuesday, July 1 at 11:29 PM, quoth Rick Blundell:
>> I wish to deliver mail to a dynamic local user name and the user
>> name is determined by a script. I want my .qmail-default to look
>> like this:
>>
>> | /path/to/script
>> /home/vpopmail/domains/domain.com/$LOCAL/
>>
> What you *can* do is
> have the script do the delivery. For example, the script could call
> safecat, like so:
>
> #!/bin/sh
> YOURVAR=something
> safecat /home/vpopmail/domains/domain.com/$YOURVAR/{tmp,new}
>



Thank you Kyle, calling safecat in my script is exactly what I was
looking for.

Rick

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.