Yes in fact it will be used as a relay, sorry I did not state that in my
first mail.

This is perfect for what we need.

Thank you !!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 9:43 AM
To: [EMAIL PROTECTED]
Subject: RE: [Mimedefang] Bounce if its not for a local user.


> From: Larry Guest [mailto:[EMAIL PROTECTED]
> I would like to filter mail and bounce anything that is not
> for a local user.  
> I assume I will have to setup a file on the server and list all the
> valid users in this file.  There are only about 50 at the most so this
> is not a problem.
> 
> Any ideas?

Are the users local to the server?  Or are you using the server as a
relay?

If the former, sendmail should already be doing this for you.

If the latter, there are two options:
You can use a mimedefang function check_against_smtp_server() to see if
the user exists on the remote server.  This works for *most* remote
servers.

If you're using an Exchange server, life is a little more complicated.
(I know, I'm doing exactly this.)  However, all hope is not lost.

You can create a Perl script to run LDAP queries against your Exchange
server every (say) fifteen minutes.  The LDAP query can extract all
valid email addresses.  Then the Perl script should make a sendmail
"access" file and hash it to access.db

See
http://lists.roaringpenguin.com/pipermail/mimedefang/2003-December/01863
3.ht
ml for how to do it against an Exchange 2000 server
It's also possible to do against an Exchange 5.5 server - I'm doing this
(email me offlist for my script)


This method has a drawback.  Email to new addresses will be bounced
until the Perl script has had a chance to run.  So, if you create a new
Exchange user, they won't be able to get email from the outside for up
to fifteen minutes.  In my experience, this is not a big problem at all.

[EMAIL PROTECTED]                805.964.4554 x902
Hispanic Business Inc./HireDiversity.com   Software Engineer
perl -e"print join er,reverse',','l hack',' P','Just anoth'"
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang
mailing list [EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to