Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have to use a Win2k/Exchange 2k setup for our companies mail. There is no way to change or upgrade that. Due to various hacking & spam scenarios that played out, we implemented a linux based relay using qmail & perdition. That seemed to quell our primary issues however, now, a sender does not receive a bounceback when mail is sent to a non-existent user in our organization. I am certainly open to other (FOSS only) solutions but, am stumped so far. Here are our requirements:

  • must have POP & SMTP access from the outside world using authenticated lookup
  • must be mail relay in every since. In stays in, out goes out. No anonymous mailings.
  • must integrate with 1 or more spam/rbl lists/groups for filtering

Ideally, I would just like to enable some type of AD LDAP or pop lookup on the same box so that when a user is not found it would bounce the msg back to the originator. I am having a difficult time finding a way to do this. I've thought of just performing a user dump for it to check against but, that can be cumbersome to keep updated everytime someone leaves the company. The current scenario performs a user lookup & if it doesn't find the user it just drops it.

Any suggestions ? Might there be another way to configure this better ? Maybe a different package would work better ?

share|improve this question
    
I'm a bit confused. Are you saying that qmail isn't configured to do LDAP lookups now, or that it is, but that it's not bouncing messages with failed lookups? –  Evan Anderson Jun 3 '09 at 17:51
    
it is performing a pop before smtp scenario. So, technically it's not a LDAP lookup just a pop user lookup. vergenet.net/linux –  Pete Jun 3 '09 at 18:31

2 Answers 2

up vote 1 down vote accepted

You've already been given a solution to create static tables for control. Another solution woulde be to use qmail-verify.

share|improve this answer

I have the same requirements. I have a cronjob that does and ldap search against active directory looking for valid mail users, and then writes a file that is used by postfix.

The relevant magic is

ldapsearch -h server01.contoso.com -LLL -D 'exchange-postmaster@contoso.com' -y ~/.ad-password -x -Z -b 'dc=contoso,dc=com' '(msExchRecipientTypeDetails=1)' mailNickname > /tmp/$$.exchange

From there you'll have to rewrite the output to match whatever you need for qmail. For postfix I write a table that is then run through postmap.

I have the script do a diff and e-mail me the diff results so I can tell if it's going crazy.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.