[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] default Content-Type



Hi Philippe!

On Thu, 10 Jan 2013 14:05:43 +0100, Philippe Naudin wrote:
> A cron job output some warning with accented characters. This warning
> is a single line :
> Serveur présent jouy.inra.fr = 138.102.1.1, mais client pas à l'heure
> (it warns about a NTP server completely desynchronized).
> 
> This warning is sent by msmtp (sendmail is a symlink to msmtp) to a
> SMTP server (postfix).
> 
> In the message, there is a header :
> Content-Type: text/plain; charset=ANSI_X3.4-1968
> 
> I would like to get :
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Is there a way to force the default charset with msmtp ?

Msmtp does not inspect or alter mail contents; it just forwards them to
the SMTP server. So what you pipe into msmtp has to be in valid mail
format, including Content-Type and other headers.

You could add that header yourself, e.g. using a small intermediate
script between cron and msmtp. Or you could configure postfix to
assume a different default charset if none is specified.

Martin