Marcin Praczko wrote:
> Hi,
>
> I am not sure that I am writing to correct list, but maybe you will
> help me.
>
> On one of my server qmail has been installed, SpamAssassin and
> qmail-scanner.
> There is a several virtual domains, and Spam filter is working quite
> OK.
>
> But I have some message which I am worried about:
>
> For example: on sever is domain: somedoamin1.com
>
> Somebody will send SPAM to user@somedomain1.com, and:
> - Spamassassin marks it as SPAM (which is correct)
> - But user doesn't exist on somedomain1.com (it happen)
> - So qmail is storage this mail in queue as long as it can.
>
> My question is, what is the best practice and how can I configure
> following scenario:
>
> Scenario:
> Spam marks message as SPAM, qmail is trying deliver that message to
> not exited user,
> And if is not exist - message is deleted.
>
> BUT if message is not SPAM - and user doesn't exist, bounce message
> should be send to sender.
>
> Thank you very much for your help.


Do not accept mail for non-existent users. If the user doesn't exist,
the server should reject the mail with a "550 User Unknown" and it will
never get to your mail queue in the first place.

If the message is legitimate, the sender will receive the error message.
If the message is spam, the spambot will receive the error message.
Either way, the error goes directly back to the sender through the same
connection used to send the mail.

--
Bowie