Solved

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

Posted on 2006-10-25
6
243 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
  • 3
  • 2
6 Comments
 
LVL 43

Expert Comment

by:ravenpl
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 14

Expert Comment

by:chris_calabrese
Comment Utility
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
Comment Utility
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
Comment Utility
"               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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
AWS EC2 Linux 1 30
Problem logging tar errors 11 35
Delete email that have a topic like  Cpanel 3 46
PC upgrade to Linux Mint 7 29
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now