Re: [OT] List of all email users

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



Ralph Angenendt (ra+centos@xxxxxxxxxxxx) kirjoitteli (30.10.2008 17:12):
> for i in /etc/aliases /etc/postfix/virtual; do
> cat $i | grep -Ev "(^#|^\s+$|^$)" | sed -e "s/://" | awk '{print $1}' | \
> sort -u | tr \\n ,
> done
> 
> Adapt to needs.

Thanks, that looks neat, and works.

For real-world use, I guess the source files (in my case aliases,
virtusertable) should be prepared first - the list will include unwanted
users like "bin" or "mysql", mailing list name defined in virtusertable, and
possibly other strange things too.

- Jussi

--
Jussi Hirvi * Green Spot
Topeliuksenkatu 15 C * 00250 Helsinki * Finland
Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hirvi@xxxxxxxxxxxx * http://www.greenspot.fi

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux