Gentoo Archives: gentoo-server

From: Xavier MOGHRABI <xavier.moghrabi@×××××××××.org>
To: gentoo-server@l.g.o
Subject: [gentoo-server] Configuration issue of Spamassassin with Amavis-new and Posfix
Date: Fri, 15 Sep 2006 08:16:12
Message-Id: 200609151008.32532.xavier.moghrabi@objectweb.org
1 Dear all,
2
3 I'm working to configure a mail server using Postfix. By the way, I'd like to
4 use Spamassassin with Amavis to filter spam.
5
6 To begin, I've followed the tutorial available at:
7 http://gentoo-wiki.com/HOWTO_Spam_Filtering_with_Gentoo,_Postfix,_Amavis
8
9 I'm able to make Amavis works but it seems that it doesn't filter messages
10 since when a local user get a message, there are no Spam header :
11 Return-Path: <me@×××××××××.org>
12 X-Original-To: test@×××××××××××××××.org
13 Delivered-To: test@×××××××××××××××.org
14 Received: from localhost (unknown [127.0.0.1])
15 by terre.objectweb.org (Postfix) with ESMTP id 5B82499351
16 for <test@×××××××××××××××.org>; Thu, 14 Sep 2006 19:44:52 +0000 (UTC)
17 X-Virus-Scanned: amavisd-new at objectweb.org
18 Received: from terre.objectweb.org ([127.0.0.1])
19 by localhost (terre.objectweb.org [127.0.0.1]) (amavisd-new, port
20 10024)
21 with ESMTP id Jx6hu0Q-IlNs for <test@×××××××××××××××.org>;
22 Thu, 14 Sep 2006 21:44:51 +0200 (CEST)
23 Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29])
24 by terre.objectweb.org (Postfix) with ESMTP id 006F16BF7
25 for <test@×××××××××××××××.org>; Thu, 14 Sep 2006 21:44:50 +0200 (CEST)
26 Received: from [192.168.0.167] (mey38-2-82-236-98-179.fbx.proxad.net
27 [82.236.98.179])
28 by smtp3-g19.free.fr (Postfix) with ESMTP id C12DF496B6
29 for <test@×××××××××××××××.org>; Thu, 14 Sep 2006 21:44:50 +0200 (CEST)
30 From: ME <me@×××××××××.org>
31 Organization: ObjectWeb Consortium
32 To: test@×××××××××××××××.org
33 Subject: Test message
34 Date: Thu, 14 Sep 2006 21:41:47 +0200
35 User-Agent: KMail/1.9.4
36 MIME-Version: 1.0
37 Content-Type: text/plain;
38 charset="us-ascii"
39 Content-Transfer-Encoding: 7bit
40 Content-Disposition: inline
41 Message-Id: <200609142141.47989.me@×××××××××.org>
42
43 This is a test
44
45 We can see Amavis header, but no trace about spam filter.
46
47 My configuration files are the following :
48
49 /etc/postfix/main.cf :
50 -------------------------
51 queue_directory = /var/spool/postfix
52 command_directory = /usr/sbin
53 daemon_directory = /usr/lib/postfix
54 mail_owner = postfix
55 mydestination = $myhostname, localhost.$mydomain
56 unknown_local_recipient_reject_code = 550
57 mynetworks = $config_directory/mynetworks
58 debug_peer_level = 2
59 debugger_command =
60 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
61 xxgdb $daemon_directory/$process_name $process_id & sleep 5
62 sendmail_path = /usr/sbin/sendmail
63 newaliases_path = /usr/bin/newaliases
64 mailq_path = /usr/bin/mailq
65 setgid_group = postdrop
66 html_directory = /usr/share/doc/postfix-2.2.10/html
67 manpage_directory = /usr/share/man
68 sample_directory = /etc/postfix
69 readme_directory = /usr/share/doc/postfix-2.2.10/readme
70 home_mailbox = .maildir/
71 content_filter = smtp-amavis:[127.0.0.1]:10024
72
73 /etc/postfix/master.cf :
74 ---------------------------
75 smtp inet n - n - - smtpd
76 smtp-amavis unix - - y - 2 smtp
77 -o smtp_data_done_timeout=1200
78 -o disable_dns_lookups=yes
79 127.0.0.1:10025 inet n - y - - smtpd
80 -o content_filter=
81 -o local_recipient_maps=
82 -o relay_recipient_maps=
83 -o smtpd_restriction_classes=
84 -o smtpd_helo_restrictions=
85 -o smtpd_sender_restrictions=
86 -o smtpd_recipient_restrictions=permit_mynetworks,reject
87 -o mynetworks=127.0.0.0/8
88 -o strict_rfc821_envelopes=yes
89 pickup fifo n - n 60 1 pickup
90 cleanup unix n - n - 0 cleanup
91 qmgr fifo n - n 300 1 qmgr
92 tlsmgr unix - - n 1000? 1 tlsmgr
93 rewrite unix - - n - - trivial-rewrite
94 bounce unix - - n - 0 bounce
95 defer unix - - n - 0 bounce
96 trace unix - - n - 0 bounce
97 verify unix - - n - 1 verify
98 flush unix n - n 1000? 0 flush
99 proxymap unix - - n - - proxymap
100 smtp unix - - n - - smtp
101 relay unix - - n - - smtp
102 -o fallback_relay=
103 showq unix n - n - - showq
104 error unix - - n - - error
105 discard unix - - n - - discard
106 local unix - n n - - local
107 virtual unix - n n - - virtual
108 lmtp unix - - n - - lmtp
109 anvil unix - - n - 1 anvil
110 scache unix - - n - 1 scache
111 maildrop unix - n n - - pipe
112 flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
113 old-cyrus unix - n n - - pipe
114 flags=R user=cyrus argv=/usr/lib/cyrus/deliver -e -m ${extension} ${user}
115 cyrus unix - n n - - pipe
116 flags=hu user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m
117 ${extension} ${user}
118 virt-cyrus unix - n n - - pipe
119 flags=hu user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m
120 ${recipient} ${user}
121 uucp unix - n n - - pipe
122 flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
123 ($recipient)
124 ifmail unix - n n - - pipe
125 flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
126 bsmtp unix - n n - - pipe
127 flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
128
129 /etc/amavisd.conf :
130 Is in attachment
131
132 When I restart amavis, I have the following messages in the mail.info log
133 file:
134 Sep 14 22:25:28 terre amavis[6363]: Net::Server: 2006/09/14-22:25:28 Server
135 closing!
136 Sep 14 22:25:28 terre amavis[11468]: user=, EUID: 0 (0); group=, EGID: 0 27
137 26 20 11 10 6 4 3 2 1 0 (0 27 26 20 11 10 6 4 3 2 1 0); log_level=2
138 Sep 14 22:25:28 terre amavis[11468]: INFO: no optional modules:
139 Mail::SpamAssassin::SQLBasedAddrList DBD::mysql Sys::Hostname::Long
140 Mail::SPF::Query Razor2::Client::Agent Net::CIDR::Lite
141 auto::Crypt::OpenSSL::RSA::load_public_key auto::Crypt::OpenSSL::RSA::_new
142 auto::Crypt::OpenSSL::RSA::DESTROY
143 Sep 14 22:25:28 terre amavis[11468]: SpamControl: init_pre_chroot done
144 Sep 14 22:25:28 terre amavis[11469]: Net::Server: Process Backgrounded
145 Sep 14 22:25:28 terre amavis[11469]: Net::Server: 2006/09/14-22:25:28 Amavis
146 (type Net::Server::PreForkSimple) starting! pid(11469)
147 Sep 14 22:25:28 terre amavis[11469]: Net::Server: Binding to UNIX socket
148 file /var/amavis/amavisd.sock using SOCK_STREAM
149 Sep 14 22:25:28 terre amavis[11469]: Net::Server: Binding to TCP port 10024 on
150 host 127.0.0.1
151 Sep 14 22:25:28 terre amavis[11469]: Net::Server: Setting gid to "408 408"
152 Sep 14 22:25:28 terre amavis[11469]: Net::Server: Setting uid to "102"
153 Sep 14 22:25:28 terre amavis[11469]: Found decoder for .gz
154 at /bin/gzip -d (backup, not used)
155 Sep 14 22:25:28 terre amavis[11469]: Internal decoder for .tar (backup, not
156 used)
157 Sep 14 22:25:28 terre amavis[11469]: SpamControl: initializing
158 Mail::SpamAssassin
159 Sep 14 22:25:29 terre amavis[11469]: SpamControl: init_pre_fork done
160 Sep 14 22:25:29 terre amavis[11507]: TIMING [total 3 ms] - bdb-open: 3 (100%)
161 100, rundown: 0 (0%)100
162 Sep 14 22:25:29 terre amavis[11508]: TIMING [total 3 ms] - bdb-open: 3 (100%)
163 100, rundown: 0 (0%)100
164
165
166 Does someone have any idea ?
167
168 Thanks in advance.
169
170 --
171 Xavier MOGHRABI
172
173 PS: Please accept my apologies if you receive multiple copies of this message
174 since I've posted it yesterday on the gentoo-user mailing list.

Attachments

File name MIME type
amavisd.conf text/plain

Replies

Subject Author
Re: [gentoo-server] Configuration issue of Spamassassin with Amavis-new and Posfix Sune Kloppenborg Jeppesen <jaervosz@g.o>