Subject: browse e-mail address

From: Annie Xie <[email-masked]>
Date: Fri, 21 Jul 2000 08:34:38 -0400 (EDT)

Is there any way in pine can browse the e-mail address (or user name) in
the system like zmail?

Thanks!
Annie

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Scott Leibrand <[email-masked]>
Date: Fri, 21 Jul 2000 08:09:56 -0700 (PDT)

> Is there any way in pine can browse the e-mail address (or user name) in

I don't know if anyone else is familiar with zmail, but I'm not.  So you
might need to describe exactly what zmail does that you'd like to do
with Pine...

--
Scott Leibrand
[email-masked]            (Yes, that is a valid address.)
http://students.washington.edu/leibrand
* RCW 19.190 notice: This email address is located in Washington State. *
* Unsolicited commercial email may be billed $500 per message.          *

---

From: Annie Xie <[email-masked]>
Date: Fri, 21 Jul 2000 11:27:08 -0400 (EDT)

zmail has a function "address browser" which will return the user name
(e-mail address) on this system when you give a certain pattern.  I think
it greps the pattern from /etc/passwd and return the user name matches
this pattern.

We are no longer using zmail but the users really "miss" this function.

Very appreciate!
Annie

---

From: Scott Leibrand <[email-masked]>
Date: Fri, 21 Jul 2000 10:08:57 -0700 (PDT)

If you know the username, Pine will look it up in the passwd file, unless
you have quell-user-lookup-in-passwd-file set.  But if you want to be able
to do lookup based on name, the easiest way is to create a global address
book and reference it in pine.conf.

---

From: Ben Elliston <[email-masked]>
Date: Sat, 22 Jul 2000 10:59:02 +1000 (EST)

> Is there any way in pine can browse the e-mail address (or user
   > name) in the system like zmail?

Sounds like they're after some kind of directory service.

Incidentally, is there a way of creating an address book that lists the
current users on a Unix system?

Ben

---

From: Scott Leibrand <[email-masked]>
Date: Fri, 21 Jul 2000 18:43:18 -0700 (PDT)

> current users on a Unix system?

That's pretty easy.  Just take the /etc/passwd file and extract the data
you want, then output it in address book format.  I can do it in MS Excel,
so it must be really simple in Perl.  :)

Only problem with that is the only information you can consistently get is
username and whaterver they've provided as their full name.

---

From: Ben Elliston <[email-masked]>
Date: Sat, 22 Jul 2000 12:44:42 +1000 (EST)

That's pretty easy.  Just take the /etc/passwd file and extract the
   data you want, then output it in address book format.  I can do it in
   MS Excel, so it must be really simple in Perl.  :)

And that it's not dynamic.  If a new user is added to the system, my
generated address book is instantly out of date.

Ben

---

From: Scott Leibrand <[email-masked]>
Date: Fri, 21 Jul 2000 20:32:01 -0700 (PDT)

> generated address book is instantly out of date.

Then I guess you could run the Perl script as a cron job to go every
night, and run it manually if you think someone's been added during the
day and you need to e-mail them...

---

From: Mohit Agarwal <[email-masked]>
Date: Sat, 22 Jul 2000 09:48:26 +0530 (IST)

Another option might be to setup an alias, that'd be done in a file called
/var/aliases or something. It'd require updates as new users are added to
your system. So you could have something an address like <[email-masked]>
to send mails to everyone on your system.

---
Mohit Agarwal

---

From: Martin Domeij <[email-masked]>
Date: Sat, 22 Jul 2000 10:40:09 +0200 (W. Europe Daylight Time)

> day and you need to e-mail them...

Or why not wrap the useradd/adduser/whatever command you use to add a
new user with a shellscript that runs first the 'real' useradd/etc
command, and then your little shell- or Perl-script that extracts the
data out of /etc/passwd? Instant dynamicness! 

/Martin 

Keep things as recursive as possible, but not recursiver.

---

From: Jo Knox <[email-masked]>
Date: Sat, 22 Jul 2000 00:52:48 -0800 (AKDT)

> day and you need to e-mail them...

This is exactly what I do.  I have a cron job running every morning which
skips through /etc/passwd until it gets to the first real user, takes that
user, gets their real name (can't be changed) out of another system passwd
file, checks to see if they have a .forward (if so, grabs that for email
address), and writes all that to a new pine-global-addressbook.  And so on
for the rest of /etc/passwd; then I have Pine sort it for me.  Any users
added during the day won't show up in the addressbook until the next day,
but you can still mail them just fine!
jo

---

From: Martin Domeij <[email-masked]>
Date: Sat, 22 Jul 2000 11:11:30 +0200 (W. Europe Daylight Time)

> data out of /etc/passwd? Instant dynamicness! 

Or, to answer myself, if you have a passwd-file way to huge to go through
every time you add a new user, let the wrapper-script catch the
username, realname, and what you want, and just store this away, without
going through the passwd-file. 

/Martin

---

From: James <[email-masked]>
Date: Sat, 22 Jul 2000 21:21:38 -0700 (PDT)

> but you can still mail them just fine!

How do you tell the difference between "real" users - people to whom you
want to send mail, and who might read it, and the dummy users that are
set up for certain apps, or for group use?  For instance, there are a
couple of dozen such dummy userids on my personal Linux box.  At the lab
we have a group userids (used for the majority of shared work) in
addition to our personal ones, so every once in a while we have to go
and clean out the general mailbox.

James

---

From: Jo Knox <[email-masked]>
Date: Sun, 23 Jul 2000 00:48:46 -0800 (AKDT)

> and clean out the general mailbox.

I've kept all the non-actual-user accounts at the beginning of passwd;
these are root, daemon, nobody, template accounts, etc. The processor just
skips until it gets to my account, which is the first actual user account!
jo

---

From: Cliff Green <[email-masked]>
Date: Sun, 23 Jul 2000 14:17:29 -0400 (EDT)

J> On Sat, 22 Jul 2000, Jo Knox wrote:
J> 
J> > This is exactly what I do.  I have a cron job running every morning which
J> > skips through /etc/passwd until it gets to the first real user, takes that
J> > user, gets their real name (can't be changed) out of another system passwd
J> > file, checks to see if they have a .forward (if so, grabs that for email
J> > address), and writes all that to a new pine-global-addressbook.  And so on
J> > for the rest of /etc/passwd; then I have Pine sort it for me.  Any users
J> > added during the day won't show up in the addressbook until the next day,
J> > but you can still mail them just fine!
J> 
J> How do you tell the difference between "real" users - people to whom you
J> want to send mail, and who might read it, and the dummy users that are
J> set up for certain apps, or for group use?

Well, that's going to depend on your system, no?  Our script skips over:
-anything with a uid < 100 (system accounts on our hosts),
-any accountname surrounded by angle brackets (< or >), which is just a
 convention we use internally,
-any accountname in an excludes file.

YMMV,

c
-- 
Clifford Green               Internet -  [email-masked]
Academic Computing Services                    UMDNJ-IST
A cheerful heart is good medicine.