Hope all is well with you and yours.
I have a quick Linux mail question.
I need to get some data from all received mail and load it into the PostgreSQL DB. I use fetchmail to get them from a remote server and they go to /var/mail/abruck
There are 2 lines that I need from each email: Date and Subject.
When I just type "mail" to get the mail content, I get exactly what I want:
Code:
U 1 Dispatch Team Tue Oct 17 11:55 192/11778 (FOLLOW-UP) 1 - Emergency Work Order# WO-0003342 at (Ranch) | ETA NEEDED - CRM:01136317
U 2 Dispatch Team Tue Oct 17 11:55 289/18637 4 - Normal Work Order# WO-0003304 SCHEDULED for 8/8/2017 4:30 PM (Wents) - CRM:01136334
U 3 Dispatch Team Tue Oct 17 11:55 289/18637 4 - Normal Work Order# WO-0003304 SCHEDULED for 8/9/2017 4:00 PM (Wents) - CRM:01136338
......
U 33 Dispatch Team Tue Oct 17 11:55 187/11550 (FOLLOW-UP) 2 - Critical Work Order# WO-0002897 at (Caas) | ETA NEEDED - CRM:01136469
U 34 Dispatch Team Tue Oct 17 11:55 190/11725 (FOLLOW-UP) 1 - Emergency Work Order# WO-0003342 at (Ranch) | ETA NEEDED - CRM:01136473
?
except that it stops after 34 lines with a "?"
How can I get ALL the emails without stopping every 34 lines with a "?". I want go > it all into one file.
Greatly appreciate your time and efforts ...