Sponsored Content
Full Discussion: Need some help with this...
Top Forums Programming Need some help with this... Post 302138242 by porter on Sunday 30th of September 2007 05:02:58 PM
Old 09-30-2007
Seeing as my manpage for alias does not say where the alias mappings are stored, I think that using popen("alias","r") is your best bet.
 
aliasadm(1M)						  System Administration Commands					      aliasadm(1M)

NAME
       aliasadm - manipulate the NIS+ aliases map

SYNOPSIS
       aliasadm -a alias expansion [options comments] optional flags

       aliasadm -c alias expansion [ options comments] [ optional flags]

       aliasadm -d alias [ optional flags]

       aliasadm -e alias [ optional flags]

       aliasadm -l alias [ optional flags]

       aliasadm -m alias [ optional flags]

       aliasadm [-I] [-D domainname] [-f filename] [-M mapname]

DESCRIPTION
       aliasadm makes changes to the alias map.

       The alias map is an NIS+ table object with four columns:

       alias	       The name of the alias as a null terminated string.

       expansion       The value of the alias as it would appear in a sendmail /etc/aliases file.

       options	       A  list	of options applicable to this alias.  The only option currently supported is  CANON. With this option, if the user
		       has requested an inverse alias lookup, and there is more than one alias with this expansion, this alias	is  given  prefer-
		       ence.

       comments        An  arbitrary  string  containing comments about this alias. The sendmail(1M) command reads this map in addition to the NIS
		       aliases map and the local  /etc/aliases database.

OPTIONS
       -a	       Add an alias.

       -c	       Change an alias.

       -d	       Delete an alias.

       -e	       Edit the alias map.

       -I	       Initialize the NIS+ aliases database.

       -l	       List the alias map.

       -m	       Print or match an alias.

       -D domainname   Edit the map in domain  domainname instead of the current domain.

       -f filename     When editing or listing the database, use filename instead of invoking the editor.

       -M mapname      Edit mapname instead of mail_aliases.

FILES
       /etc/aliases    mail aliases for the local host in ASCII format

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       +-----------------------------+-----------------------------+
       |      ATTRIBUTE TYPE	     |	    ATTRIBUTE VALUE	   |
       +-----------------------------+-----------------------------+
       |Availability		     |SUNWnisu			   |
       +-----------------------------+-----------------------------+

SEE ALSO
       sendmail(1M), attributes(5)

NOTES
       NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from  NIS+  to  LDAP  are
       available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html.

SunOS 5.10							    12 Dec 2001 						      aliasadm(1M)
All times are GMT -4. The time now is 06:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy