Re: [CentOS] email subject length issue

2017-04-13 Thread Bowie Bailey

On 4/12/2017 4:17 PM, Jerry Geis wrote:

Oh I understand now what is happening. The subject is coming in as three
lines.

Subject: Tornado Monday, 03/27/2017 at 20:27:02. The Point BB.OBSURGRH is
  in Alarm at PRI3 with a value of 63.4 %.Informational Text: OB SURGERY
  HUMIDITY ALARM

I'm not getting the second two lines.

How "should" one correctly get the subject ???

What I did was in my .procmailrc file
SUBJECT=`cat | grep Subject:`

So this resulted in only the first line and not grabbing the additional 2
lines.

Is there a way to correctly get the subject that I have not found?


You'll need to grab the line that starts with "Subject:" and then 
continue grabbing lines until you find one that doesn't start with 
whitespace.  I don't think you can do this with grep, but you should be 
able to do it with perl, sed, or awk.


--
Bowie
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Kenneth Porter
--On Wednesday, April 12, 2017 1:43 PM -0700 John R Pierce 
 wrote:



procmail: Assigning "SUBJECT= Tornado Monday, 03/27/2017 at 20:27:02. The
Point BB.OBSURGRH is"


sounds like your issue is procmail then...  I just used your exact
command to send myself a message form a bone stock C6 system (sendmail as
the email server) and recieved...


Procmail unfolds headers. Could it be the logging that's truncating the 
subject? Where is that "Assigning" output coming from? You could dump the 
SUBJECT variable to a file to see what it really thinks is in there.









---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Alexander Dalloz

Am 12.04.2017 um 22:24 schrieb Richard:

[ ... ]


There's supposed to be a "null" line between the structured (header)
text lines and the rest of the body. The "Subject:" is generally the
last of the structured text lines, so you should be able to start
your read with the "Subject:" tag and continue reading until you hit
the "null" line.


No, there is simply no rule nor evidence that the subject header line is 
or should be the last of all header lines. Typically you see it 
somewhere within the mail's header.


Alexander


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Alexander Dalloz

Am 12.04.2017 um 22:03 schrieb Richard:

[ ... ]


A "Subject:" line is just a structured text line in the message body
and MTAs (e.g., sendmail) don't do anything differently with it than
any other line in a message body. The max length is 998 "characters".


No, the subject of a mail message is a defined field and part of the 
message header, not the body of the message. Just see RFC 5322. Message 
header and (optional) body are separated by an empty line. While there 
are specific rules for message header fields there are (nearly) none for 
the character flow of the mail body (MIME RFCs aside). The 998 character 
limit per line applies for both the header and the body.



I suspect that your MUA or more likely procmail is where the
truncation is taking place. I just did:

   /bin/mailx -s"... 200+ character subject ..."

on a C6/sendmail machine and it worked fine.


That turned out to be the case as the OP didn't cover folding of long 
header fields (RFC 5322 2.2.3).


Alexander

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Fred Smith
On Wed, Apr 12, 2017 at 04:17:38PM -0400, Jerry Geis wrote:
> Oh I understand now what is happening. The subject is coming in as three
> lines.
> 
> Subject: Tornado Monday, 03/27/2017 at 20:27:02. The Point BB.OBSURGRH is
>  in Alarm at PRI3 with a value of 63.4 %.Informational Text: OB SURGERY
>  HUMIDITY ALARM
> 
> I'm not getting the second two lines.
> 
> How "should" one correctly get the subject ???
> 
> What I did was in my .procmailrc file
> SUBJECT=`cat | grep Subject:`
> 
> So this resulted in only the first line and not grabbing the additional 2
> lines.

are you saying the subject is 3 lines (not one long line that wraps
over 3) before you try to send it as email?

if so you need to strip out the newlines (or CR/LF) or whatever is
there as linebreaks.

Have a look at the "tr" command, possibly the -d option.

echo "now  
is  
the  
time" | tr -d "\12\15"

prints "now is the time" but note that there is no newline at
the end of the string, so you'd need to add one back.

if you do this, you get the trailing newline, though this looks
pretty weird:

/usr/bin/echo -e  `echo "now 
is 
the 
time" | tr -d "\12\15"` 

good luck!



-- 
 Fred Smith -- fre...@fcshome.stoneham.ma.us -
 God made him who had no sin
  to be sin for us, so that in him
 we might become the righteousness of God."
--- Corinthians 5:21 -
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Richard


> Date: Wednesday, April 12, 2017 16:17:38 -0400
> From: Jerry Geis 
>
> Oh I understand now what is happening. The subject is coming in as
> three lines.
> 
> Subject: Tornado Monday, 03/27/2017 at 20:27:02. The Point
> BB.OBSURGRH is  in Alarm at PRI3 with a value of 63.4
> %.Informational Text: OB SURGERY  HUMIDITY ALARM
> 
> I'm not getting the second two lines.
> 
> How "should" one correctly get the subject ???
> 
> What I did was in my .procmailrc file
> SUBJECT=`cat | grep Subject:`
> 
> So this resulted in only the first line and not grabbing the
> additional 2 lines.
> Is there a way to correctly get the subject that I have not found?
> 
> Thanks for the tips. It led me to the above.
> 
> Jerry

There's supposed to be a "null" line between the structured (header)
text lines and the rest of the body. The "Subject:" is generally the
last of the structured text lines, so you should be able to start
your read with the "Subject:" tag and continue reading until you hit
the "null" line.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Jerry Geis
Oh I understand now what is happening. The subject is coming in as three
lines.

Subject: Tornado Monday, 03/27/2017 at 20:27:02. The Point BB.OBSURGRH is
 in Alarm at PRI3 with a value of 63.4 %.Informational Text: OB SURGERY
 HUMIDITY ALARM

I'm not getting the second two lines.

How "should" one correctly get the subject ???

What I did was in my .procmailrc file
SUBJECT=`cat | grep Subject:`

So this resulted in only the first line and not grabbing the additional 2
lines.

Is there a way to correctly get the subject that I have not found?

Thanks for the tips. It led me to the above.

Jerry
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread John R Pierce

On 4/12/2017 12:48 PM, Jerry Geis wrote:

So I am using sendmail on C7.



ok, wait, I do have a c7 test VM...


[piercej@c7test ~]$ echo "" |mail -s "Tornado Monday, 03/27/2017 at 
20:27:02. The Point BB.OBSURGRH is in Alarm at PRI3 with a value of 63.4 
%.Informational Text:OB SURGERY HUMIDITY ALARM" piercej

[piercej@c7test ~]$ mail
Heirloom Mail version 12.5 7/5/10.  Type ? for help.
"/var/spool/mail/piercej": 1 message 1 new
>N  1 John R Pierce Wed Apr 12 13:06  20/888   "Tornado Monday, 
03/27/2017 at 20:27:02. The Point BB.OBSURGRH is in Alarm at PRI3 with a 
value of 63.4 %.I"

& 1
Message  1:
From pier...@c7test.xxx.com  Wed Apr 12 13:06:22 2017
Return-Path: 
X-Original-To: piercej
Delivered-To: pier...@c7test.xxx.com
Date: Wed, 12 Apr 2017 13:06:22 -0700
To: pier...@c7test.xxx.com
Subject: Tornado Monday, 03/27/2017 at 20:27:02. The Point BB.OBSURGRH is
 in Alarm at PRI3 with a value of 63.4 %.Informational Text:OB SURGERY
 HUMIDITY ALARM
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
From: pier...@c7test.xxx.com (John R Pierce)
Status: R

&


so, your issue is something specific on your configuration. hmm, c7's 
default email service is postfix, not sendmail, for what /thats/ worth.



--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread John R Pierce

On 4/12/2017 12:48 PM, Jerry Geis wrote:

So I am using sendmail on C7.

I added to the .procmailrc file VERBOSE and a log file.

procmail: Assigning "SUBJECT= Tornado Monday, 03/27/2017 at 20:27:02. The
Point BB.OBSURGRH is"

This command:
echo "" | mail -s "Tornado Monday, 03/27/2017 at 20:27:02. The Point
BB.OBSURGRH is in Alarm at PRI3 with a value of 63.4 %.Informational Text:
OB SURGERY HUMIDITY ALARM" email_test

With email_test being a local account... clearly my subject is truncated.
Is there a way to expand that?


still on C6...   (don't have a c7 server configured with an email service).


[pierce@new ~]$ mail
Heirloom Mail version 12.4 7/29/08.  Type ? for help.
"/var/spool/mail/pierce": 1 message 1 new
>N  1 John R Pierce Wed Apr 12 13:00  20/738   "Tornado Monday, 
03/27/2017 at 20:27:02. The Point BB.OBSURGRH is in Alarm at PRI3 with a 
value of 63.4 %.I"

& 1
Message  1:
From pie...@xxx.com  Wed Apr 12 13:00:09 2017
Return-Path: 
X-Original-To: pierce
Delivered-To: pie...@xxx.com
Date: Wed, 12 Apr 2017 13:00:09 -0700
To: pie...@new.freescruz.com
Subject: Tornado Monday, 03/27/2017 at 20:27:02. The Point BB.OBSURGRH is
 in Alarm at PRI3 with a value of 63.4 %.Informational Text:OB SURGERY
 HUMIDITY ALARM
User-Agent: Heirloom mailx 12.4 7/29/08
Content-Type: text/plain; charset=us-ascii
From: pie...@xxx.com (John R Pierce)
Status: R



&

--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Richard


> Date: Wednesday, April 12, 2017 15:48:06 -0400
> From: Jerry Geis 
>
> So I am using sendmail on C7.
> 
> I added to the .procmailrc file VERBOSE and a log file.
> 
> procmail: Assigning "SUBJECT= Tornado Monday, 03/27/2017 at
> 20:27:02. The Point BB.OBSURGRH is"
> 
> This command:
> echo "" | mail -s "Tornado Monday, 03/27/2017 at 20:27:02. The Point
> BB.OBSURGRH is in Alarm at PRI3 with a value of 63.4
> %.Informational Text: OB SURGERY HUMIDITY ALARM" email_test
> 
> With email_test being a local account... clearly my subject is
> truncated. Is there a way to expand that?
> 

A "Subject:" line is just a structured text line in the message body
and MTAs (e.g., sendmail) don't do anything differently with it than
any other line in a message body. The max length is 998 "characters".

I suspect that your MUA or more likely procmail is where the
truncation is taking place. I just did:

   /bin/mailx -s"... 200+ character subject ..."

on a C6/sendmail machine and it worked fine.


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Jerry Geis
So I am using sendmail on C7.

I added to the .procmailrc file VERBOSE and a log file.

procmail: Assigning "SUBJECT= Tornado Monday, 03/27/2017 at 20:27:02. The
Point BB.OBSURGRH is"

This command:
echo "" | mail -s "Tornado Monday, 03/27/2017 at 20:27:02. The Point
BB.OBSURGRH is in Alarm at PRI3 with a value of 63.4 %.Informational Text:
OB SURGERY HUMIDITY ALARM" email_test

With email_test being a local account... clearly my subject is truncated.
Is there a way to expand that?

Thanks,

Jerry
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread John R Pierce

On 4/12/2017 12:38 PM, Jerry Geis wrote:

Sorry for the extra email. It send to quickly.

procmail: Assigning "SUBJECT= Tornado Monday, 03/27/2017 at 20:27:02. The
Point BB.OBSURGRH is"


sounds like your issue is procmail then...  I just used your exact 
command to send myself a message form a bone stock C6 system (sendmail 
as the email server) and recieved...


(domain munged because I don't want to recieve ANY email at this host)


From - Wed Apr 12 12:40:34 2017
X-Account-Key: account1
X-UIDL: 58ee82b10004
X-Mozilla-Status: 0001
X-Mozilla-Status2: 
X-Mozilla-Keys:
Return-Path: 
Received: from new.XXX.com (new.XXX.com [207.111.XXX.YY])
by hogranch.com (8.11.6/8.11.6) with ESMTP id v3CJeKi25266
for ; Wed, 12 Apr 2017 12:40:20 -0700
Received: by new.freescruz.com (Postfix, from userid 500)
id 98C33606BE; Wed, 12 Apr 2017 12:40:20 -0700 (PDT)
Date: Wed, 12 Apr 2017 12:40:20 -0700
To: pie...@hogranch.com
Subject: Tornado Monday, 03/27/2017 at 20:27:02. The Point BB.OBSURGRH is
 in Alarm at PRI3 with a value of 63.4 %.Informational Text:OB SURGERY
 HUMIDITY ALARM
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20170412194020.98c3360...@new.xxx.com>
From: pie...@xxx.com (John R Pierce)
  


--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Jerry Geis
Sorry for the extra email. It send to quickly.

procmail: Assigning "SUBJECT= Tornado Monday, 03/27/2017 at 20:27:02. The
Point BB.OBSURGRH is"


jerry
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread John R Pierce

On 4/12/2017 12:27 PM, Jerry Geis wrote:

I seem to be running into a subject length issue on email. Is there any way
to increase that ?


you'll need to be a whole lot more specific.   I've seen emails with 
stupidly long subjects, one message sent to a list recently had the 
entire message body pasted onto the subject.


Where are you running into this issue, how is it manifesting itself, 
what software is involved (email client, email server, email list server?)


I see you're using gmail, are you sure this problem isn't specific to gmail?


--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Jerry Geis
Sure... Its local. I run this command:
echo "" | mail -s "Tornado Monday, 03/27/2017 at 20:27:02. The Point
BB.OBSURGRH is in Alarm at PRI3 with a value of 63.4 %.Informational Text:
OB SURGERY HUMIDITY ALARM" email_test

where email_test is my local machine account.

The subject gets truncated:


Jerry
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] email subject length issue

2017-04-12 Thread Alexander Dalloz

Am 12.04.2017 um 21:27 schrieb Jerry Geis:

Hello all

I seem to be running into a subject length issue on email. Is there any way
to increase that ?

Thanks,

jerry


There needs to be more context. Where and how do you face the limit? 
Client-side or on the mail transport? The RFC defines a limit for mail 
headers and the subject is one of them. Would be very strange to hit 
that though.


Alexander


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] email subject length issue

2017-04-12 Thread Jerry Geis
Hello all

I seem to be running into a subject length issue on email. Is there any way
to increase that ?

Thanks,

jerry
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos