1

我目前正在运行一个 Centos 7 实例。已安装:postfix、dovecot、altermime。发送和接收电子邮件工作正常。但是,我要做的是为每封发送的邮件附加免责声明。

我的问题是在免责声明配置中有一个免责声明文本选项和一个免责声明 html。但是我的电子邮件始终以纯文本形式发送,因此我收到带有免责声明的电子邮件,其中显示了 html 标签。

如何配置 postfix 或 altermime 以发送 html 电子邮件,或发送附有图像的纯文本?

这是我的免责声明配置:

from_address=`grep -m 1 "From:" in.$$ | cut -d "<" -f 2 | cut -d ">" -f 1`

if [ `grep -wi ^${from_address}$ ${DISCLAIMER_ADDRESSES}` ]; then
  /usr/bin/altermime --input=in.$$ \
                   --disclaimer-html=/etc/postfix/disclaimer.html \
                   --disclaimer=/etc/postfix/disclaimer.txt \
                   --force-for-bad-html \
                   --xheader="X-Copyrighted-Material: Please visit http://www.company.com/privacy.h$
                    { echo Message content rejected; exit $EX_UNAVAILABLE; }
fi

我尝试在 disclaimer.txt 或 disclaimer.html 中添加 html 文本。电子邮件始终以显示 html 标记的纯文本形式接收。

任何帮助将不胜感激。

4

0 回答 0