[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim setup -- Using a pipe with virtual_aliases



On Thu, Apr 24, 2003 at 06:41:28AM -0700, Bill Moseley wrote:

| Plus, I'm looking for a way so that sending to an address can trigger an
| update of the alias file.  For example, mail sent to
| alias_update@hosteddomain.com might run a program to fetch an updated
| alias file from a remote location.

All you have to do for this is make a script which correctly does
this, then make sure it runs with sufficient privileges.

| I'd like to have a pipe that could update the alias file, but I have not
| been able to get it to work.
| 
| So in /etc/exim/alias_foo I might have:
| 
|   update_aliases: |/etc/exim/update_foo_aliase.pl

Correct so far.

| I tried to chown the alias_foo file to "nobody" and then I set
| 
|   user = nobody
| 
| But I end up getting:
| 
| D=virtual_aliases T=address_pipe: Child process of address_pipe transport
| returned 69 (could mean service or program unavailable) from command:
| /etc/exim/update_foo_aliases.pl
| 
| And that's where I'm stuck.

Figure out why the script terminates with error code 69.  Only you can
do that because only you have the script and access to the system to
verify permissions on various files and such.  Almost certainly the
user 'nobody', which you're running the script as, doesn't have
permission to modify the alias file and thus the error.

| I also wonder if I could set user = ${domain_data} above so that it
| attempts to only run as the user (as mapped by DOMAINS), if that user
| exists, otherwise bomb.  That would give me some control over what domains
| can auto-update.

This would probably work.  In this setup make sure that 
    1)  the user $[domain_data} has write permission on the alias file
    2)  the user 'mail' still has read permission

HTH,
-D

-- 
Failure is not an option.  It is bundled with the software.
 
http://dman.ddts.net/~dman/

Attachment: pgptY0aAtHTId.pgp
Description: PGP signature


Reply to: