[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qmail
Subject:    Re: Bounces when uses a forwarder
From:       Jason Haar <Jason.Haar () trimble ! co ! nz>
Date:       2007-04-25 22:20:44
Message-ID: 462FD43C.1050008 () trimble ! co ! nz
[Download RAW message or body]

Joshua Small wrote:
>
> Hi,
>
>  
>
> We qmail in a way I'm sure many people are. On my firewall, as a mail
> router, running qmail-scanner to sanitise before passing it through to
> the, not accessible from the Internet, Exchange server.
>
>  
>
> The excessively vast amount of spam and rubbish hitting the firewall
> appears sent to nonsensical, no longer in use, or never in existence
> email addresses. In a "live" mail server situation, the server simply
> refuses to accept such email, stating the user does not exist, and
> bouncing with, I believe a 550.
>
> ...
>
>  
>
> Is there any possible way of rejecting emails where an address is not
> listed in that file, rather than accepting and trying to deal with it,
> or any better suggestion?
>
>  
>
I use fehcom-RECIPIENTS to check all incoming email against a dump of
all emails addresses from our Exchange environment - it works well.

The hard part is the dump from Exchange. In your case it sounds like
just one Exchange server - so a script using "ldapsearch" will do the
job. Just remember you want both "mail" and the "SMTP:*" values from
"proxyAddresses" LDAP fields.

Hopefully

ldapsearch  -E pr=900/noprompt -x -D "valid_user@your.AD.domain" -w
the.PASSWORD -b "dc=your,dc=ADdomain" \
 -h domain.controller '(&(cn=*)(mail=*))'  mail proxyAddresses

will get you started...


-- 
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic