Jan*_*Jan 9 email-server debian spamassassin amavis debian-squeeze
我按照 workaround.org 上的教程(Debian Squeeze 的 ISPmail 教程)在 Debian Squeeze 上设置了带有 Dovecot、Postfix 和 AMaViS 的邮件服务器。它使用虚拟域并将域、电子邮件地址和帐户存储在 MySQL 数据库中。
一切正常——除了我缺少一些电子邮件标题。
(使用“真正的”垃圾邮件并通过 GTUBE 使用sendmail email@example.com < /usr/share/doc/spamassassin/examples/sample-spam.txt)
但是垃圾邮件会改变主题。所以我把一切都设置正确了,不是吗?
如何在我的邮件中获取那些丢失的标题?
这是我的 AMaViS 配置文件 ( /etc/amavis/conf.d/50-user)
use strict;
#
# Place your configuration directives here. They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#
# see <http://workaround.org/ispmail/squeeze/content-scanning-amavis>
$sa_spam_subject_tag = '*** SPAM *** ';
$final_spam_destiny = D_PASS;
$sa_tag_level_deflt = -9999; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6.31; # add 'spam detected' headers at that level
@lookup_sql_dsn = ([
'DBI:mysql:database=mailserver;host=127.0.0.1;port=3306',
'mailuser',
'password'
]);
$sql_select_policy = 'SELECT name FROM virtual_domains WHERE CONCAT("@",name) IN (%k)';
#------------ Do not modify anything below this line -------------
1; # ensure a defined return
Run Code Online (Sandbox Code Playgroud)
如果您需要更多配置文件、日志输出或其他任何内容,请在下面发表评论,我将使用您需要的信息更新我的帖子:-)
小智 19
您是否检查过此参数:@local_domains_acl
它在 上定义/etc/amavis/conf.d/05-domain_id。根据http://www.ijs.si/software/amavisd/上的 Amavisd-new 文档:
没有插入与垃圾邮件相关的标头?以下是一些原因:
- @local_domains_acl 设置不正确。这些标头仅为匹配@local_domains_acl 查找(或 %local_domains 或 $local_domains_re 或 SQL 查找中的字段“local”)的收件人插入;
- (……)
检查此命令的输出: head -n 1 /etc/mailname
如果您无法获得准确的域名,Amavisd 将不会对您的电子邮件标题进行任何更改。如果您想强制添加 X-Spam-* 标头,则可以@local_domains_acl = ( "." );在/etc/amavis/conf.d/50-user
小智 5
(这确实是对之前答案的评论,但声誉系统不会让我)
设置@local_domains_acl = ( "." )对我有用,但它似乎是一个相当生硬的工具(即,垃圾邮件处理所有邮件,进出)。尝试了许多替代方案,我最终发现包括localhost也有帮助(我正在同一个盒子上测试交付服务)。因此,在/etc/amavis/conf.d/50-user我有类似的东西:
@local_domains_acl = ( ".mydomain.example.org", "localhost" );
Run Code Online (Sandbox Code Playgroud)
我看到发送的邮件中添加了垃圾邮件标头。
(我的测试设置是 Ubuntu 14.04 服务器、postfix、amaviz、spamassassin,所有这些都从标准 Ubuntu 存储库安装。)
| 归档时间: |
|
| 查看次数: |
17300 次 |
| 最近记录: |