Answer the question
In order to leave comments, you need to log in
How to set auto-reply encoding in Postfix?
The question is next.
Is available postfix 2.9.6-2
All boxes, transports, BCC, are stored in tables MySQL.
A script was written to implement an auto-response:
#!/bin/bash
sql=`/usr/bin/mysql -u mail -ppass -h localhost mail --skip-column-names -e "SELECT bcc_autoreply_text FROM bcc WHERE bcc_maps='$2'"`
if
then
/usr/bin/sendemail -f [email protected] -t $1 -o message-charset=utf-8 -u Notify -m $sql
fi
autoreply unix - n n - - pipe flags=DRhu user=autoreply argv=/etc/postfix/BCC/autoreply ${sender} ${recipient}
LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
Answer the question
In order to leave comments, you need to log in
What is the DB encoding?
What if the postix user's locale is not the same as yours, for example, LANG=C?
Try to force the locale in the script:
#!/bin/bash
set LANG=ru_RU.UTF-8
sql=`/usr/bin/mysql -u mail -ppass -h localhost mail --skip-column-names -e "SELECT bcc_autoreply_text FROM bcc WHERE bcc_maps='$2'"`
if
then
/usr/bin/sendemail -f [email protected] -t $1 -o message-charset=utf-8 -u Notify -m $sql
fi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question