Ok now I understand.
Thanks for the explanations.

Everything is running just fine now, thanks to the help of this mailing-list. In fact I copied the configuration from my other server and updated some parts since i'm using virtual users on this server. Since my other server wasn't an mx server but only used fetchmail, the problem related to putting dspam in smtpd_recipient_restriction never showed up ...
My bad for having copied a configuration which never has been fully tested.

Thanks and happy new year to all of you.

 Guillaume Hilt




mouss a écrit :
Guillaume HILT a écrit :
I have something strange in my logs.
Maybe it has something to do with my problem ?

Dec 31 14:09:08 mail postfix/smtpd[3970]: connect from
219-86-40-220.dynamic.tfn.net.tw[219.86.40.220]
Dec 31 14:09:09 mail postfix/smtpd[3970]: NOQUEUE: filter: RCPT from
219-86-40-220.dynamic.tfn.net.tw[219.86.40.220]:
<sseenndd1...@yahoo.com.hk>: Recipient address triggers FILTER
dspam:unix:/var/run/dspam/dspam.sock; from=<hg5ff6y8...@yahoo.com>
to=<sseenndd1...@yahoo.com.hk> proto=SMTP helo=<87.98.140.248>
Dec 31 14:09:09 mail postfix/smtpd[3970]: NOQUEUE: reject: RCPT from
219-86-40-220.dynamic.tfn.net.tw[219.86.40.220]: 504 5.5.2
<87.98.140.248>: Helo command rejected: need fully-qualified hostname;
from=<hg5ff6y8...@yahoo.com> to=<sseenndd1...@yahoo.com.hk> proto=SMTP
helo=<87.98.140.248>

Why postfix is using dspam to check if it can accept an email ?

it is only telling you that the filter _will_ be dspam:unix...  the
filter is not called at this time.

<WARNING>
note that per recipient FILTER is fragile: if mail is sent to multiple
recipients with different filters, then only one filter is used (the
last FILTER statement overrides previous ones). so if you have a user
for which you don't filter mail and if a spammer can guess it, they can
skip filtering by adding this user as the last recipient.

if you want per filter recipient, then you should use two postfix
instances (run postfix twice, each with its own config, queue, ... etc)..
Then use transport_maps (instead of content_filter and FILTER) in the
instance that is before dspam.

Alternatively, pass all mail to dspam, and configure dspam to ignore all
but some recipients ("optin mode" ).
</WARNING>


I thought it was only used once a mail has been accepted ?


and that is how it works. the filter is called after the message is
accepted.

back to your problem:

Once you change to filter:... (instead of dspam:....), you need to
reload postfix (do not postmap a pcre map). for messages that were
already queued, you may need to requeue them (postsuper -r).

alternatively, add a "dspam" transport in master.cf (examples are
available on the web). This may also be useful to change some parameters
(increase timeouts, ... etc).







!DSPAM:1011,495cd2b0150928684057397!

Reply via email to