OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: filter question

From: ram (ramnetcore.co.in)
Date: Thu Sep 04 2008 - 07:07:45 CDT


On Thu, 2008-09-04 at 11:30 +0200, Hement Gopal wrote:
> Hi all
>
>
>
> I’m running 2.0.13 on my mail gateway.
>
>
>
> I accept mail for *mydomain.com
>
>
>
> I also have a domain that I still receive mail for called
> abc.mydomain.com
>
>
>
> This domain received a huge amount of junkmail for non existent
> mailboxes…the domain itself only has about 25 legitimate mail
> addresses.
>
>
>
> Is there anyway in postfix to apply a filter so that postfix will only
> except mail for the legit 25 addressesabc.mydomain.com and drop all
> other abc.mydomain.com mails…while still allowing all mydomains.com
> mails to come through?
>

You want to verify rcpt id for abc.mydomain.com and not for
mydomain.com

That should be easy

put in main.cf

----------------------
smtpd_recipient_restrictions=
   check_recipient_access hash:/etc/postfix/validusers,
   ...
   ...

------------------------

in this file
---------------------------
user1abc.mydomain.com OK
user2abc.mydomain.com OK
...
...
abc.mydomain.com REJECT User not found
mydomain.com DUNNO
------------------------

But I would suggest you verify users of "mydomain.com" too. Accepting
undeliverable mails is usually a very bad idea