Sponsored Content
Full Discussion: Line breaks in mail spool
Operating Systems Linux Line breaks in mail spool Post 302951452 by night_watcher on Thursday 6th of August 2015 12:35:28 PM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
pop3browser(1)															    pop3browser(1)

NAME
pop3browser -- small perl script to access POP3 mail accounts DESCRIPTION
pop3browser is a perl script that uses libnet-perl to give access to POP3 mail accounts without fetching the messages. pop3browser can be used to delete unwanted mails (SPAM), especially when they come with large attachments, before downloading them over low-bandwidth connections. The --limit option of fetchmail is very useful to filter such large mails which can then be inspected with pop3browser. The program supports normal POP3 authentication and APOP. USAGE
pop3browser welcomes you with a short copyright note and a command line prompt. The settings for a mailbox (host, password etc.) have to be specified in a configuration file (similar to fetchmail). pop3browser understands the following commands: hosts list available hosts specified in .pop3browserrc login n log into host no. n, use 'hosts' to get a list of available hosts o(pen) n same as login apop n same as login but uses APOP c(lose) delete messages marked for deletion and close current connection list list sizes and message numbers of the mails on the account s(how) n show header and some body lines of mail number n m(ailbox) list message number, size, sender and subject for each mail d(elete) n delete mail number n undel(ete) n undelete mail number n k(ill) expr delete mails matching expr in header u(nkill) expr undelete mails matching expr in header q(uit) delete messages marked for deletion and quit program exit same as quit help print a command summary CONFIG FILE
The definitions for a mailbox are specified in ~/.pop3browserrc. One line per mailbox. Lines starting with # are ignored. Each definition must be in the following form:.br hostname <tab or space> userid <tab or space> password <tab or space> protocol (optional) For example: #definition for bar@pop.foo.com #pop-server UID passwd protocol pop.foo.com bar s3cr3t apop #end of definition Recognised options for the protocol are pop3 and apop. If no protocol is specified the command login/open assumes pop3. The command apop ignores the protocol option. To override the default header-filter of the show command you can specify a custom set of keywords in ~/.pop3browserrc. Lines starting with "@headpattern" or "@bodylines" are parsed by pop3browser. Settings for the header-filter must be in the following form: @headpattern <tab or space> = <tab or space> "<keyword1>","<keyword2>",.... The filter keywords are matched against the start of a header line. Settings for the number of body lines to show, have to be in the following form: @bodylines <tab or space> = <tab or space> <Number> Example: @headpatterns = "From:","To:","Subject:","Date:","CC" @bodylines = 10 The file ~/.pop3browserrc must only be readable for the owning user. pop3browser corrects other file modes automatically. SEE ALSO
fetchmail(1) AUTHOR
Christoph Baumann <cgb@debian.org> THANKS
Jorrit 'J"o' Fahlke, for his overhaul of the config file parser Takeshi Hamasaki, for the headpattern patch Debian/GNU Linux Nov. 2003 pop3browser(1)
All times are GMT -4. The time now is 02:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy