Le 01/12/2010 17:41, Ben a écrit :
Hi all,
I would like to set up mail filtering on a postfix server. I have read a
lot of documentation, but I can't make it works.
Here's what I did :
- install maildrop package (should I use maildrop or courier-maildrop ?)
- create /etc/maildroprc
- set maildrop transport in master.cf :
maildrop unix - n n - - pipe
flags=ODRhu user=www-data argv=/usr/bin/maildrop -d ${us...@${nexthop}
${extension} ${recipient} ${user} ${nexthop} ${sender}
- setuid / setgid on maildrop binary, chown
- add conf to main.cf :
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
The problem is that maildrop seems to never been invoked. Postfix choose
local to deliver the mail, but I can't find why.
if postfix chooses "local", then it probably means the recipient domain
is in mydestination (in contrast to virtual_mailbox_domains,
virtual_alias_domains, ...).
You seem to talk about mail sent to=<[email protected]>
and you have
myhostname = mx1.hoster.com
with no mydestination setting, so you probably have:
# postconf mydestination
mydestination = $myhostname, localhost.$mydomain, localhost
which contains myhostname, thus mx1.hoster.com is a "local" domain in
your configuration, and virtual_transport has no influence on mail sent
to this domain.
PS. next time, avoid hijacking domains such as "hoster.com". use
example.com, example.net, example.org or any *.example instead.
I would like it uses
maildrop instead.
I join postconf -n, maildroprc, and a log extract showing the problem.
Any idea ?
Regards,
Ben