Anope.org > General Chat
Weird trouble with email and accentued subjects
CrazyCat:
Hello,
I've tried to translate in french emails sent by anope and noticed that when the subject contains accentued chars, I got (from dest server) "SMTPUTF8 is required, but was not offered by host" when mail is sent.
But when the subject doesn't contains them and the body yes, it works like a charm.
I did a test, creating a file and using sendmail -t < myfile.txt, it works.
So I think there is a little trouble somewhere between https://github.com/anope/anope/blob/81056072576994e6f4c7ed6133bd42440b10face/src/config.cpp#L188 and https://github.com/anope/anope/blob/81056072576994e6f4c7ed6133bd42440b10face/src/mail.cpp#L16 which transform the subject (my tests were with memo_subject) in an improper utf-8 string
Sadie:
We're applying a UTF-8 header to the emails so they *should* be sent properly.
Are you sure you're using UTF-8 for your emails not an older encoding like ISO-8859-1?
What email provider are you using? Also, what sendmail client are you using?
CrazyCat:
My services.conf is utf-8, I use postfix (on localhost) with mailutils to get the sendmail.
Here is my myfile.txt (utf-8 / CRLF)
--- Quote ---From: admin@zeolia.chat
To: crazycat@testing.com
Subject: Nouveau mémo
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bonjour,
Merci de valider la réception de ce message.
Normalement ça le fait
.
--- End quote ---
Works using /usr/sbin/sendmail -t < myfile.txt
If I use Nouveau mémo in memo_subject (services.conf) I got the error. But If I use Nouveau memo (without accent) I don't have any trouble.
Not that having accentued chars in the body doesn't break the process.
I'll try making more tests (apply iconv to my .conf ?) but the only difference I actually can see is that the mail subjects are treated in another way than the bodies.
CrazyCat:
Small edit:
--- Code: ---crazycat@server:~/services/conf$ file -bi services.conf
text/x-c; charset=utf-8
--- End code ---
PeGaSuS:
Hi!
So far, I had zero issues with msmtp and accented emails.
My resetpass email has as subject the following:
--- Code: ---reset_subject = "Reposição de palavra-passe | Password reset request"
--- End code ---
The command file -bi anope.conf states:
--- Code: ---text/x-c; charset=utf-8
--- End code ---
The only thing I'm doing different (I think) with msmtp is that I'm sending the email through my mail server which is located on another machine (powered by postfix, though), basically acting as a relay but you can also install the msmtp-mta if you want/need.
Here's an example of how my .msmtprc looks like:
--- Code: ---# Set default values for all following accounts.
defaults
auth on
tls on
#tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
# EXAMPLE
account example
host mail.domain.tld
port 465
tls_starttls off
from "Example User <example@domain.tld>"
user example@domain.tld
password example_password
account default: example
--- End code ---
I've also attached a screenshot that shows that accents are received properly (the code received is already invalidated).
NOTE: All configs are from an Ubuntu powered system.
Navigation
[0] Message Index
[#] Next page
Go to full version