read mail headers from command line
I'm looking to try and obtain a list of all e-mail currently residing in my mail box.
What I wish to do is as follows: Retrieve a list of e-mails from the mail server, then using this information, create a simple web page that I can then visit and check what mail is waiting there. It will actually be a wap page, as I intend on checking from my mobile. I've already got a couple of scripts in use that allow me to check page counter values etc from my mobile, so I intend on simply modifying the scripts, but I first need to obtain the list. All help is appreciated... |
it would be
mail -H > filename the list will be output to, and overwrite the file "filename" |
"mail: invalid option -- H"
Sup, D? :-] |
that is strange
looks like a version specific option [david@www david]$ mail -H mail: invalid option -- H Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ... [- sendmail-options ...] mail [-iInNv] -f [name] mail [-iInNv] [-u user] [david@www david]$ mail -i Mail version 8.1 6/6/93. Type ? for help. "/var/spool/mail/david": 4 messages 3 unread >U 1 forum@linuxquestions Sat Apr 12 17:12 44/1692 "Reply to post 'noob question on slackware'" U 2 forum@linuxquestions Sat Apr 12 17:33 44/1715 "Reply to post 'US Robotics Serial modem problem'" 3 forum@linuxquestions Sat Apr 12 17:34 45/1747 "Reply to post 'read mail headers from command line'" U 4 forum@linuxquestions Sat Apr 12 23:04 44/1739 "Reply to post 'Partition Help'" & david@zeus:~$ mail - mailx version nail 10.4 1/19/03. Type ? for help. david@zeus:~$ mail -H >U 1 david@zeus.domain Sat Apr 12 23:05 36/1412 N 2 david@domain.com Sat Apr 12 23:15 13/662 -i seems to work |
Hi there,
My intention was not to actually retrieve any mail from the remote mail server, but rather a list of all mailbox content. |
mail -H does that on mine
mail -H > mymailheaders cat mymailheaders >U 1 david@localhost.lo Sat Apr 12 23:05 36/1412 U 2 david@dcphillips.n Sat Apr 12 23:15 14/672 |
All times are GMT -5. The time now is 11:34 PM. |