Line breaks in mail spool


 
Thread Tools Search this Thread
Operating Systems Linux Line breaks in mail spool
Prev   Next
# 1  
Old 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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Page breaks and line breaks

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

2. AIX

/var/spool/mail/ issues

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

3. UNIX for Advanced & Expert Users

Mail going to /var/spool/mqueue instead of being sent

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

4. UNIX for Dummies Questions & Answers

/var/spool/mail

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

5. UNIX for Dummies Questions & Answers

Sendmail /VAR/SPOOL/MAIL

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

6. UNIX for Dummies Questions & Answers

/VAR/SPOOL/MAIL question

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

7. UNIX for Dummies Questions & Answers

How do I read mail in /var/spool/mail?

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

8. UNIX for Dummies Questions & Answers

Can I zero var/spool/mail/mail

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

9. Shell Programming and Scripting

PHP Script that sends mail - Postfix breaks it

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

10. UNIX for Dummies Questions & Answers

in var/spool/mail, same entry with different users....

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
Login or Register to Ask a Question
uuxqt(1M)						  System Administration Commands						 uuxqt(1M)

NAME
uuxqt - execute remote command requests SYNOPSIS
/usr/lib/uucp/uuxqt [-s system] [-x debug-level] DESCRIPTION
uuxqt is the program that executes remote job requests from remote systems generated by the use of the uux command. (mail uses uux for remote mail requests). uuxqt searches the spool directories looking for execution requests. For each request, uuxqt checks to see if all the required data files are available, accessible, and the requested commands are permitted for the requesting system. The Permissions file is used to validate file accessibility and command execution permission. There are two environment variables that are set before the uuxqt command is executed: o UU_MACHINE is the machine that sent the job (the previous one). o UU_USER is the user that sent the job. These can be used in writing commands that remote systems can execute to provide information, auditing, or restrictions. OPTIONS
The following options are supported: -s system Specifies the remote system name. -x debug-level debug-level is a number from 0 to 9. Higher numbers give more detailed debugging information. FILES
/etc/uucp/Limits /etc/uucp/Permissions /var/spool/locks/* /var/spool/uucp/* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbnuu | +-----------------------------+-----------------------------+ SEE ALSO
mail(1), uucp(1C), uustat(1C), uux(1C), uucico(1M), attributes(5) SunOS 5.11 19 May 1993 uuxqt(1M)