Merit Network
Can't find what you're looking for? Search the Mail Archives.
  About Merit   Services   Network   Resources & Support   Network Research   News   Events   Home

Discussion Communities: Merit Network Email List Archives

North American Network Operators Group

Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical

Re: Secondary MX user list filter for Sendmail

  • From: Crist Clark
  • Date: Wed May 19 13:28:55 2004

Todd Vierling wrote:

A colleague asked me offlist about how to make a Sendmail secondary MX
properly return 550 for invalid recipient addresses.

For those with an LDAP directory containing mailbox information, I'd
recommend using sendmail's built-in LDAP capabilities. I've found it
a good way to test for existence of mailboxes at border MTAs. My
example (NOTE: I've pulled out the LDAP stuff from a rather complex
.mc file, and it can be done in a more straightforward way without
all of the other hacks I'm simultaenously supporting in my rulesets),

Kldap_rcpt ldap -b dc=example,dc=com -h -T<TMPF> -v mail -k (&(objectClass=inetLocalMailRecipient)(!(inetUserStatus=deleted))(!(inetMailGroupStatus=deleted))(|(mail=%0)(mailAlternateAddress=%0)(mailEquivalen

# Check if local addresses really exist on central server.
R< $+ > $1
R$+ @ $=R $: $1 @ $2 $| $(ldap_rcpt $1@$2 $: <NOMATCH> $)
R$* $| <NOMATCH> $#error $@ 5.1.1 $: 550 User unknown

Crist J. Clark
Globalstar Communications (408) 933-4387

The information contained in this e-mail message is confidential,
intended only for the use of the individual or entity named above.
If the reader of this e-mail is not the intended recipient, or the
employee or agent responsible to deliver it to the intended recipient,
you are hereby notified that any review, dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this e-mail in error, please contact

Discussion Communities

About Merit | Services | Network | Resources & Support | Network Research
News | Events | Contact | Site Map | Merit Network Home

Merit Network, Inc.