View Single Post
Old 15th December 2009, 12:56
voltron81 voltron81 is offline
Senior Member
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default Mailq values into a mysql database...

Hi to everybody.
I'm trying to create from mailq a database with the details of all the emails queued.

I saw that with the command:
mailq | grep | awk '{print($1);}'
I'll have the value for the field 1, 2 for 2, etc...
The problem is coming for the "sender/recipient", that is actually on 2 lines:
9BBF287C66     2827 Tue Dec 15 09:47:31
                                                          (deferred transport)
so the result of the command
mailq | grep | awk '{print($7);}'
will be just the sender...

Any idea how can obtain the value of the receiver?
And an idea how to put this values into a mysql database?

Reply With Quote
Sponsored Links