Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   System Mail (http://www.linux-archive.org/debian-user/76851-system-mail.html)

Allan Wind 04-26-2008 09:59 PM

System Mail
 
On 2008-04-26T15:11:22-0600, Troy Telford wrote:
> However, after I changed the hostname, I don't seem to be able to get
> any system mail - (ie. the mdadm daemon sends root an email to announce
> that the raid array is in a degraded state, etc).

Check the configuration files for the locally running mta (postfix,
qmail, or whatever you have installed). If you are delivering mail
remotely, then you should the configuration of that mail server as well.
In either case I would start by grep'ing for the old hostname along
these lines

find /etc -type f|xargs grep $HOSTNAME

where $HOSTNAME is your old hostname.

> Another (trivial) issue is linuxlogo - even after apt-get purging and
> re-installing linuxlogo, it still has the old hostname. Is there
> something I need to put into debconf to get it to recognize that the
> system's hostname has changed?

I do not use linuxlogo, but suggest you review the script
/etc/init.d/linuxlogo to see where it gets the hostname from.


/Allan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Petrus de Calguarium 07-26-2010 04:22 PM

system mail
 
When I receive system mail, I read it on the command line with the 'mail' program. It appears to be called Heirloom Mail version 12.4 7/29/08.

Now, as I scroll down, I see that the system mail is sent as:

Content-Type: text/plain; charset="ANSI_X3.4-1968"

However, my system is set up to use UTF-8. Why is this charset wrong, or not respecting my system setting? How can I get it corrected?


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

JB 07-26-2010 04:55 PM

system mail
 
Petrus de Calguarium <kwhiskerz@...> writes:

>
> When I receive system mail, I read it on the command line with the 'mail'
program. It appears to be called
> Heirloom Mail version 12.4 7/29/08.
>
> Now, as I scroll down, I see that the system mail is sent as:
>
> Content-Type: text/plain; charset="ANSI_X3.4-1968"
>
> However, my system is set up to use UTF-8. Why is this charset wrong, or not
respecting my system setting? How
> can I get it corrected?
>
Hi,
$ man mail
...
sendcharsets
A comma-separated list of character set names that can be used
in Internet mail. When a message that contains characters not
representable in US-ASCII is prepared for sending, mailx tries
to convert its text to each of the given character sets in order
and uses the first appropriate one. The default is ‘utf-8’.

Character sets assigned to this variable should be ordered in
ascending complexity. That is, the list should start with e.g.
‘iso-8859-1’ for compatibility with older mail clients, might
contain some other language-specific character sets, and should
end with ‘utf-8’ to handle messages that combine texts in multi-
ple languages.
...

$ cat /etc/mail.rc
...
# Outgoing messages are sent in ISO-8859-1 if all their characters are
# representable in it, otherwise in UTF-8.
set sendcharsets=iso-8859-1,utf-8
...

JB





--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Takehiko Abe 07-27-2010 12:41 AM

system mail
 
> Now, as I scroll down, I see that the system mail is sent as:
>
> Content-Type: text/plain; charset="ANSI_X3.4-1968"
>
> However, my system is set up to use UTF-8.

ANSI_X3.4-1968 is the canonical name for US-ASCII. And UTF-8 is
compatible with US-ASCII.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Petrus de Calguarium 07-27-2010 02:04 AM

system mail
 
JB wrote:

> Petrus de Calguarium <kwhiskerz@...> writes:
>
>>
>> When I receive system mail, I read it on the command line with the 'mail'
> program. It appears to be called
>> Heirloom Mail version 12.4 7/29/08.
>>
>> Now, as I scroll down, I see that the system mail is sent as:
>>
>> Content-Type: text/plain; charset="ANSI_X3.4-1968"
>>
>> However, my system is set up to use UTF-8. Why is this charset wrong, or
>> not
> respecting my system setting? How
>> can I get it corrected?
>>
> Hi,
> $ man mail
> ...
> sendcharsets
> A comma-separated list of character set names that can be
> used
> in Internet mail. When a message that contains characters
> not
> representable in US-ASCII is prepared for sending, mailx
> tries to convert its text to each of the given character
> sets in order
> and uses the first appropriate one. The default is ‘utf-8’.
>
> Character sets assigned to this variable should be ordered
> in
> ascending complexity. That is, the list should start with
> e.g.
> ‘iso-8859-1’ for compatibility with older mail clients,
> might
> contain some other language-specific character sets, and
> should end with ‘utf-8’ to handle messages that combine
> texts in multi- ple languages.
> ...
>
> $ cat /etc/mail.rc
> ...
> # Outgoing messages are sent in ISO-8859-1 if all their characters are
> # representable in it, otherwise in UTF-8.
> set sendcharsets=iso-8859-1,utf-8
> ...
>
> JB
>
>
>
>
>
Ok, thanks. I believe this helped. Obviously, it is not a huge deal, but since fedora has utf-8 as system default, I always wondered why system mail was not delievered in utf-8. I edited mail.rc and will see if my next system mail is in utf-8. :-)

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Takehiko Abe 07-27-2010 05:32 AM

system mail
 
> I always wondered why system mail was not delievered in utf-8.

But it was. ANSI_X3.4-1968 = US-ASCII ⊂ UTF-8
It's like calling {1, 2, 3} a set of natural numbers instead of integers.
Sigh. Am I invisible?
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

JB 07-27-2010 06:53 AM

system mail
 
Petrus de Calguarium <kwhiskerz@...> writes:

>
> When I receive system mail, I read it on the command line with the 'mail'
program. It appears to be called
> Heirloom Mail version 12.4 7/29/08.
>
> Now, as I scroll down, I see that the system mail is sent as:
>
> Content-Type: text/plain; charset="ANSI_X3.4-1968"
>
> However, my system is set up to use UTF-8. Why is this charset wrong, or not
respecting my system setting? How
> can I get it corrected?
>
Hi,
I hope this explains both logwatch mail and interactive mail.

Formatting of mail (headers and body) by logwatch script (in Perl):
less /usr/share/logwatch/scripts/logwatch.pl
...
my $report_finish = "
###################### Logwatch End ...
...
#Add MIME
...
if ( $outtype_html ) {
$out_mime .= "Content-Type: text/html; charset="iso-8859-1"

";
} else {
$out_mime .= "Content-Type: text/plain; charset="iso-8859-1"

";
}
...

This is an example of my logwatch mail:

From root@localhost.localdomain Wed Jul 21 08:33:07 2010
Return-Path: <root@localhost.localdomain>
Date: Wed, 21 Jul 2010 08:33:05 +0200
To: root@localhost.localdomain
From: logwatch@localhost.localdomain
Subject: Logwatch for localhost.localdomain (Linux)
Content-Type: text/plain; charset="iso-8859-1"
Status: RO


################### Logwatch 7.3.6 (05/19/07) ####################
...

So, the logwatch formats the mail programmatically (line by line), and this
explains the arbitrary fixed string charset="iso-8859-1".

On the other hand, if I prepare mail interactively in my terminal, formatted
by the mail agent, it is subjected to that mail agent's rules.

[jb@localhost ~]$ env |grep LANG
LANG=en_US.UTF-8

$ man mail
...
sendcharsets
A comma-separated list of character set names that can be used
in Internet mail. When a message that contains characters not
representable in US-ASCII is prepared for sending, mailx tries
to convert its text to each of the given character sets in order
and uses the first appropriate one. The default is ‘utf-8’.

Character sets assigned to this variable should be ordered in
ascending complexity. That is, the list should start with e.g.
‘iso-8859-1’ for compatibility with older mail clients, might
contain some other language-specific character sets, and should
end with ‘utf-8’ to handle messages that combine texts in multi-
ple languages.
...

$ cat /etc/mail.rc
...
# Outgoing messages are sent in ISO-8859-1 if all their characters are
# representable in it, otherwise in UTF-8.
set sendcharsets=iso-8859-1,utf-8
...

[jb@localhost ~]$ mail root
Subject: test charset
A line of text.
--> Ctl-D to finish

[jb@localhost ~]$ mail
Heirloom Mail version 12.4 7/29/08. Type ? for help.
"/var/spool/mail/jb": 2 messages 2 unread
>U 1 logwatch@localhost.l Tue Jul 27 07:35 100/2779 "Logwatch for localhos"
U 2 JB Tue Jul 27 08:23 21/799 "test charset"
& 2
Message 2:
From jb@localhost.localdomain Tue Jul 27 08:23:13 2010
Return-Path: <jb@localhost.localdomain>
From: JB <jb@localhost.localdomain>
Date: Tue, 27 Jul 2010 08:23:12 +0200
To: root@localhost.localdomain
Subject: test charset
User-Agent: Heirloom mailx 12.4 7/29/08
Content-Type: text/plain; charset=us-ascii
Status: RO

A line of text.
&

JB


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Tim 07-27-2010 03:11 PM

system mail
 
On Mon, 2010-07-26 at 20:04 -0600, Petrus de Calguarium wrote:
> I always wondered why system mail was not delievered in utf-8

That's only going to be necessary if the mail contains characters that
aren't part of ASCII. Mail tends to use the simplest character set
necessary for the actual message content.

About the only way I can think of forcing the issue would be having a
mount point name that needs to use UTF-8, and that mount point to be
listed in the disk space warning in the log watch report.

--
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Petrus de Calguarium 07-28-2010 04:48 PM

system mail
 
Takehiko Abe wrote:

> ANSI_X3.4-1968 = US-ASCII ⊂ UTF-8
Gotcha.


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


All times are GMT. The time now is 01:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.