08-06-2015
Line breaks in mail spool
Hi,
I have an issue with the line breaks in the mail spool- /var/mail/user1. I have set up a script to go through the mail spool on one of the users and parse some parts of the mail, however there doesn't seem to exist the regular line endings CR, LF or both in the lines and this is breaking my script. The mails are sent from a java application to a POP3 account on exchange 2013 server and then I pull them with fetchmail and use postfix on the local server as MDA.
Actually the issue comes from the fact that there is 78 characters line wrapping of the plain text mail body, which breaks the lines and cannot grep correctly- I then tried to remove the line breaks with sed, but since I cannot find the new line character that is used I cannot replace it with sed. Any ideas on on how to find what new line char is used or how to remove the line wrapping from the body would be much appreciated.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i am on aix,
in the /var/spool/mail ,i have an entry as below, after doing a ls -ltr
-rw-rw---- 1 ai mail 3898 Sep 02 11:26 mei
-rw-rw---- 1 root mail 22900 Nov 08 14:55 root
shouldnt the ai and mei be the same just like root, root?
thanks (2 Replies)
Discussion started by: yls177
2 Replies
2. Shell Programming and Scripting
I have a PHP Script that works perfectly on a server that uses Sendmail. However I tried to port it to a new server that has the Postfix to Sendmail compatibility interface, and it doesn't work properly.
The php.ini file has the path for sendmail on both servers set to: /usr/sbin/sendmail -t... (0 Replies)
Discussion started by: boopfm523
0 Replies
3. UNIX for Dummies Questions & Answers
The mail file in the directory var/spool/mail is very large. Can I zero this (>) without losing any unopened mails there may be? There are about 10 mail accounts. Using RedHat Linux.
Thanks in advance. (0 Replies)
Discussion started by: dennisheazle
0 Replies
4. UNIX for Dummies Questions & Answers
How can I read mail sent to /var/spool/mail?
I do not have pine installed so forget about that...is there some generic utility I can use? (3 Replies)
Discussion started by: mojoman
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
We have all the user account in a home direcory where their mail is stored and retrieved by email clients. We do however have /var/spool/mail with all the user accounts in it as well Our sendmail.cf is configured to use /var/spool/mqueue as the queue so .what is /var/spool/mail being used... (3 Replies)
Discussion started by: mojoman
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
First Question: In our company our users have their mailboxes in /var/spool/mail
When I look at the users file it seems as if every email sent/received is in that user file! Is this because IMAP is being used or is that just how sendmail works?
Second Question: How is that when I create... (3 Replies)
Discussion started by: mojoman
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
How can i get my mail on either /var/spool/mail or /var/mail?
I use mail and sendmail command to send mail. But everytime I send mail it comes to my outlook inbox and when I check with mail command I get the message "No mail for siba". (Note siba is my user Id.) (2 Replies)
Discussion started by: siba.s.nayak
2 Replies
8. UNIX for Advanced & Expert Users
Hello,
I have a bunch of cron jobs in the crontab. For some reason mail from the cron jobs started going to /var/spool/mqueue instead of being sent.
Does anyone know why mail from cron jobs would go to the queue instead of being sent? (9 Replies)
Discussion started by: xadamz23
9 Replies
9. AIX
Hi
My box is running with AIX 6100-06 and Im the root user of this box
My /var gets filled up often to 100%
When I investigate I find that it is the below file which increases rapidly
/var/spool/mail/pdgadmin
I dont know why this file is growing up.
Can any one assist me on this.... (2 Replies)
Discussion started by: samsungsamsung
2 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
Need an urgent solution to an issue . We have created a ksh file or shell script which generates 1 DAT file. the DAT file contains extract of a select statement .
Now the issue is , when we are executing the ksh file , the output is coimng with page breaks and line breaks .
We have... (4 Replies)
Discussion started by: Ayaskant
4 Replies