Solved

How to send a mail without having auto newline in the body?

Posted on 2006-10-25
6
261 Views
Last Modified: 2013-12-16
Hi All,

I am trying to send a mail with a long singline line as a message body. Whenever i send the message, an auto-newline is getting inserted in after certain number of characters (991 characters). This is destroying the structure of my email. How to fix this?
To simulate this issue, try to send a mail (using 'mail' command)  arround 1000-1500 chars in a single line.  Is it a sendmail limitation? I am getting this issue at postfix and sendmail at my fedora core 3 and centos 4.3 installations. I didnt try it at other versions or OS.

Any suggestions on this will be greately appreciated.

Thanks,
Bimal Mankara
0
Comment
Question by:bimal_linux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 17802500
try using sendmail directly
cat << EOF | /usr/sbin/sendmail target@address.tld
From: me
To: target@address.tld
Subject: some subject

The very long line
EOF
0
 
LVL 6

Author Comment

by:bimal_linux
ID: 17802626
Hi,

Thank you for the quick response. I tried that, but still getting newline characters after 990th one.

Regards,
Bimal
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 17802857
Then it's MTA who is splitting the line.
For postfix, there are such settings in main.cf (bringing defaults here) - bump them.
line_length_limit = 2048
smtp_line_length_limit = 990
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
LVL 14

Expert Comment

by:chris_calabrese
ID: 17803309
SMTP based email does not guarantee that plain text emails will arrive in the exact format was sent. If you want to ensure that the line is not broken, you'll have to encode the data in e.g. uuencode or base-64.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17803343
chris_calabrese: good point.
Even if You bump those values I provided it will only work if the mail is delivered locally. Any remove MTA will cut it anyway...
0
 
LVL 6

Author Comment

by:bimal_linux
ID: 17864562
"               The maximum total length of a text line including the
               <CRLF> is 1000 characters (but not counting the leading
               dot duplicated for transparency)."
From SMTP RFC (http://www.ietf.org/rfc/rfc0821.txt)
0

Featured Post

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question