Amavis / Altermime - 动态电子邮件签名(免责声明)

Amavis / Altermime - 动态电子邮件签名(免责声明)

我正在运行一个基本的 iredmail 安装amavis、postfix、dovecot。我想使用免责声明功能自动附加免责声明(在我们的例子中是签名)。

这样做的原因是客户端(ipad、outlook 等)不需要配置签名设置,并且我们对发布的实际签名拥有公司控制权。

代替:

'[email protected]' => 'boss.domain.com.txt'

我正在努力

%mailbox + ‘@’ + %domain =>  %mailbox + “.” + %domain + ‘.txt’

这样,我们可以简单地使用脚本来使用 mysql / php生成.txt/签名文件。.htm

答案1

已在 Amavis 用户组上解决...感谢 Mark Martinec 需要进行两处更改:

在 /etc/amavis/conf.d/50-user 中添加此项

################## ---- CUSTOM SIGNATURES AS DISCLAIMERS ------- ###############################
# uses altermime to insert a different signatue per users
# signatures are located in teh /etc/postfix/signatures/ directory
# also needs a small change to amavisd code:
# nano /usr/sbin/amavisd-new  - $disclaimer_options = untaint($opt);  (add the "untaint" word before ($opt)
# each user needs two signatures (html / txt)   user.domain.com.txt user.domain.com.html


  $altermime = '/usr/bin/altermime';

  $defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];
  @disclaimer_options_bysender_maps = ( { '.' => '$3.$5' } );
  @altermime_args_disclaimer = qw(--disclaimer=/etc/postfix/signatures/_OPTION_.txt --disclaimer-html=/etc/postfix/signatures/_OPTION_.html --force-for-bad-html);


################## ---- END CUSTOM SIGNATURES AS DISCLAIMERS ------- ###############################

确保允许免责声明未被注释掉并且 => 1

$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
  originating => 1,  # is true in MYNETS by default, but let's make it explicit
  os_fingerprint_method => undef,  # don't query p0f for internal clients
  allow_disclaimers => 1,  # enables disclaimer insertion if available
};

对 Altermime 进行微小更改:

nano /usr/sbin/amavisd-new  - $disclaimer_options = untaint($opt);  (add the "untaint" word before ($opt)

重新启动 Amavis(可能必须终止该进程)

相关内容