Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the messages of a user

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello

I have an user that has been sending a lot of messages to everyone. I need to get the addresses he´s sending the messages. I´m trying to use the mailq command but I need a command which return to me only the messages of this user.
Could someone help me ?

Thank you!
 
try something like:

mailq | awk '/^[^<space><tab>/{prout=match($0,&quot;<username>);} {if (prout) {print $0;}}'

i know it looks bad, but it seems to work ...

Jon
 
ok ... try nawk, or gawk ... they seem to work, awk failed for me ... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top