1 最后由 hackerzyh (2013-12-10 15:18:15) 编辑

主题: disclamier的文件格式

iRedMail 版本号:0.8.5
- 使用数据库存储用户帐号 mysql
- 使用的 Linux/BSD 发行版名称及版本号: debian 7.2
- 与您的问题相关的日志信息:无
================

想在disclamier中使用html格式,如何去操作?

50-user配置如下

@altermime_args_disclaimer = qw(--disclaimer=/etc/postfix/disclaimer/_OPTION_.txt --disclaimer-html=/etc/postfix/disclaimer/_OPTION_.txt --force-for-bad-html);

@disclaimer_options_bysender_maps = ({
    # Per-domain disclaimer setting: /etc/postfix/disclaimer/host1.iredmail.org.txt
    #'host1.iredmail.org' => 'host1.iredmail.org',
    # Sub-domain disclaimer setting: /etc/postfix/disclaimer/iredmail.org.txt
    #'.iredmail.org'      => 'iredmail.org',
    # Per-user disclaimer setting: /etc/postfix/disclaimer/boss.iredmail.org.txt
    #'boss@iredmail.org'  => 'boss.iredmail.org',

    # Catch-all disclaimer setting: /etc/postfix/disclaimer/default.txt
  '.' => 'default',
},);


default.html格式如下

root@exmail:/etc/postfix/disclaimer# cat default.html
<html>
<body>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<b>CONFIDENTIALITY NOTICE:</b>
<br>This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error, please destroy it immediately. Email transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted,lost, destroyed, arrive late or
incomplete, or contain viruses. The ender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. If verification is required please request a hard copy version.&nbsp;Copyright of
<font color="#00518d" size="3" face="Microsoft YaHei"><b><i>MeHow</b></i></font>
</body>
</html>
----
root@exmail:/etc/postfix/disclaimer#

如果是txt文件,就有效果
html  发现没有效果

回复: disclamier的文件格式

你用 HTML 格式,发送邮件后,在 Amavisd 日志文件(和 postfix 同一个日志文件)里有什么相关的错误信息?收到的邮件源码里是否包含 disclaimer 内容?

另外,一般不需要带 <html> 标签,只要将你的正文写上就行了。例如:

<b>CONFIDENTIALITY NOTICE:</b> 
<br>This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error, please destroy it immediately. Email transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted,lost, destroyed, arrive late or 
incomplete, or contain viruses. The ender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. If verification is required please request a hard copy version.&nbsp;Copyright of <font color="#00518d" size="3" face="Microsoft YaHei"><b><i>MeHow</b></i></font>

另外,似乎指定字体为雅黑没多少意义吧?

3 最后由 hackerzyh (2013-12-11 13:47:22) 编辑

回复: disclamier的文件格式

ZhangHuangbin 写道:

你用 HTML 格式,发送邮件后,在 Amavisd 日志文件(和 postfix 同一个日志文件)里有什么相关的错误信息?收到的邮件源码里是否包含 disclaimer 内容?

另外,一般不需要带 <html> 标签,只要将你的正文写上就行了。例如:

<b>CONFIDENTIALITY NOTICE:</b> 
<br>This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error, please destroy it immediately. Email transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted,lost, destroyed, arrive late or 
incomplete, or contain viruses. The ender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. If verification is required please request a hard copy version.&nbsp;Copyright of <font color="#00518d" size="3" face="Microsoft YaHei"><b><i>MeHow</b></i></font>

另外,似乎指定字体为雅黑没多少意义吧?


我一直是用 Roundcube Webmail 来测试。

今天,看到你提示说看邮件源码(通过Roundcube Webmail查看源码我找不到default.txt的内容,才尝试用outlook的),发现用outlook 发送和接收后,default.txt内的html的标签起作用了(已经取消了<html><body>)。

然后我猜测, 通过Roundcube Webmail发送邮件默认应该是发送文本格式,所以造成html标签无效?求真相?

谢谢你的提醒!

另,雅黑字体 与我公司logo的字体很相近,我只是做个尝试。