Koozali.org: home of the SME Server

how do i LIST USERS WITH EMAIL FORWARDING

aussie

how do i LIST USERS WITH EMAIL FORWARDING
« on: July 21, 2005, 05:05:04 AM »
Is there an easy way (other than checking each one),
to list users with email forwarding addresses?
TIA Rob :pint:

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: how do i LIST USERS WITH EMAIL FORWARDING
« Reply #1 on: July 22, 2005, 12:33:36 AM »
Quote from: "aussie"
Is there an easy way (other than checking each one),
to list users with email forwarding addresses?
TIA Rob :pint:


sudo /sbin/e-smith/db accounts show
............

aussie

Re: how do i LIST USERS WITH EMAIL FORWARDING
« Reply #2 on: July 22, 2005, 01:26:43 AM »
Quote from: "gordonr"
Quote from: "aussie"
Is there an easy way (other than checking each one),
to list users with email forwarding addresses?
TIA Rob :pint:


sudo /sbin/e-smith/db accounts show


thanks gordon,
regards Rob

Offline raem

  • *
  • 3,972
  • +4/-0
Re: how do i LIST USERS WITH EMAIL FORWARDING
« Reply #3 on: November 08, 2005, 03:09:02 AM »
gordonr or someone else

> sudo /sbin/e-smith/db accounts show

Re the use of
/sbin/e-smith/db accounts          
usage:
    /sbin/e-smith/db dbfile get key
    /sbin/e-smith/db dbfile printtype [key]
    /sbin/e-smith/db dbfile gettype key
    /sbin/e-smith/db dbfile printprop key [prop1] [prop2] [prop3] ...
    /sbin/e-smith/db dbfile getprop key prop
   

Is there a way to specify this even further, ie
list the user name and the ForwardAddress entry only,  perhaps using the "for" statement (I don't know how though) ?
eg
using the command
/sbin/e-smith/db accounts printprop username  ForwardAddress

gives
ForwardAddress=joebloggs

Can the command be tailored to show that entry for all users with the username ?
eg
username1
ForwardAddress=joebloggs
username2
ForwardAddress=marybrown

etc etc

Thanks
...