Discussion:
Slightly OT: ldap, sendmail and Exchange 5.5
Kevin Miller
2006-01-13 03:24:46 UTC
Permalink
I've noticed a lot of mail coming in lately with random usernames like
***@ci.juneau.ak.us. We have a few names that are a bit hard to
pronounce, but nothing like that! It used to be that when someone left work
here I could just add them to the /etc/access list. With all the ramdomized
addresses coming in the noise is getting annoying.

What I'd like to do is to either query my EX 5.5 server or better yet to set
up ldap on the same server I'm running MailScanner/sendmail on and do a
local lookup to see if the mail is to a valid user or not. If not, just
reject it at the MTA level and save a lot of useless spam/virus checks.

Has anybody done something along these lines, or know of a good HowTo? I've
been googling around but haven't found anything I can really sink my teeth
into yet.

Thanks. Sorry it's a bit off topic. Feel free to reply directly if you
feel it's too inappropriate and don't want to clutter the list...

...Kevin
--
Kevin Miller Registered Linux User No: 307357
CBJ MIS Dept. Network Systems Administrator, Mail
Administrator
155 South Seward Street ph: (907) 586-0242
Juneau, Alaska 99801 fax: (907 586-4500

-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
Desai, Jason
2006-01-13 03:24:46 UTC
Permalink
What MTA are you using? I've done something similar for Exim.

Jason
Post by Kevin Miller
I've noticed a lot of mail coming in lately with random usernames like
pronounce, but nothing like that! It used to be that when someone
left work here I could just add them to the /etc/access list. With
all the ramdomized addresses coming in the noise is getting annoying.
What I'd like to do is to either query my EX 5.5 server or better yet
to set up ldap on the same server I'm running MailScanner/sendmail on
and do a local lookup to see if the mail is to a valid user or not.
If not, just reject it at the MTA level and save a lot of useless
spam/virus checks.
Has anybody done something along these lines, or know of a good
HowTo? I've been googling around but haven't found anything I can
really sink my teeth into yet.
Thanks. Sorry it's a bit off topic. Feel free to reply directly if
you feel it's too inappropriate and don't want to clutter the list...
...Kevin
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
Kevin Miller
2006-01-13 03:24:46 UTC
Permalink
sendmail, running on SuSE 8

...Kevin
--
Kevin Miller Registered Linux User No: 307357
CBJ MIS Dept. Network Systems Administrator, Mail
Administrator
155 South Seward Street ph: (907) 586-0242
Juneau, Alaska 99801 fax: (907 586-4500
-----Original Message-----
Sent: Thursday, April 22, 2004 11:26 AM
Subject: Re: Slightly OT: ldap, sendmail and Exchange 5.5
What MTA are you using? I've done something similar for Exim.
Jason
Post by Kevin Miller
I've noticed a lot of mail coming in lately with random
usernames like
Post by Kevin Miller
pronounce, but nothing like that! It used to be that when someone
left work here I could just add them to the /etc/access list. With
all the ramdomized addresses coming in the noise is getting annoying.
What I'd like to do is to either query my EX 5.5 server or better yet
to set up ldap on the same server I'm running MailScanner/sendmail on
and do a local lookup to see if the mail is to a valid user or not.
If not, just reject it at the MTA level and save a lot of useless
spam/virus checks.
Has anybody done something along these lines, or know of a good
HowTo? I've been googling around but haven't found anything I can
really sink my teeth into yet.
Thanks. Sorry it's a bit off topic. Feel free to reply directly if
you feel it's too inappropriate and don't want to clutter the list...
...Kevin
-------------------------- MailScanner list ----------------------
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
Christian Campbell
2006-01-13 03:24:46 UTC
Permalink
Have you seen:
http://www.sng.ecs.soton.ac.uk/mailscanner/serve/cache/270.html ?


Christian Campbell
Systems Engineer, Sair LCP, A+, N+, i-Net+
Bruegger's Enterprises
Desk: 802-652-9270
Cell: 802-734-5023
Fax: 802-660-4034
Email: ccampbell at brueggers dot com

PGP Public Key available via PGP keyservers
or http://www2.brueggers.com/pgp/ccampbell.html

"We all know Linux is great...
It does infinite loops in 5 seconds."
-Linus Torvalds
-----Original Message-----
Sent: Thursday, April 22, 2004 3:19 PM
Subject: Slightly OT: ldap, sendmail and Exchange 5.5
I've noticed a lot of mail coming in lately with random usernames like
pronounce, but nothing like that! It used to be that when
someone left work
here I could just add them to the /etc/access list. With all
the ramdomized
addresses coming in the noise is getting annoying.
What I'd like to do is to either query my EX 5.5 server or
better yet to set
up ldap on the same server I'm running MailScanner/sendmail
on and do a
local lookup to see if the mail is to a valid user or not.
If not, just
reject it at the MTA level and save a lot of useless
spam/virus checks.
Has anybody done something along these lines, or know of a
good HowTo? I've
been googling around but haven't found anything I can really
sink my teeth
into yet.
Thanks. Sorry it's a bit off topic. Feel free to reply
directly if you
feel it's too inappropriate and don't want to clutter the list...
...Kevin
--
Kevin Miller Registered Linux User No: 307357
CBJ MIS Dept. Network Systems Administrator, Mail
Administrator
155 South Seward Street ph: (907) 586-0242
Juneau, Alaska 99801 fax: (907 586-4500
-------------------------- MailScanner list ----------------------
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
Kevin Miller
2006-01-13 03:24:46 UTC
Permalink
I'll give it a read, but we're not running AD here. Might be I can work
around that, I don't know. Thanks...

...Kevin
--
Kevin Miller Registered Linux User No: 307357
CBJ MIS Dept. Network Systems Administrator, Mail
Administrator
155 South Seward Street ph: (907) 586-0242
Juneau, Alaska 99801 fax: (907 586-4500
-----Original Message-----
Sent: Thursday, April 22, 2004 11:32 AM
Subject: Re: Slightly OT: ldap, sendmail and Exchange 5.5
http://www.sng.ecs.soton.ac.uk/mailscanner/serve/cache/270.html ?
Christian Campbell
Systems Engineer, Sair LCP, A+, N+, i-Net+
Bruegger's Enterprises
Desk: 802-652-9270
Cell: 802-734-5023
Fax: 802-660-4034
Email: ccampbell at brueggers dot com
PGP Public Key available via PGP keyservers
or http://www2.brueggers.com/pgp/ccampbell.html
"We all know Linux is great...
It does infinite loops in 5 seconds."
-Linus Torvalds
-----Original Message-----
Sent: Thursday, April 22, 2004 3:19 PM
Subject: Slightly OT: ldap, sendmail and Exchange 5.5
I've noticed a lot of mail coming in lately with random
usernames like
pronounce, but nothing like that! It used to be that when
someone left work
here I could just add them to the /etc/access list. With all
the ramdomized
addresses coming in the noise is getting annoying.
What I'd like to do is to either query my EX 5.5 server or
better yet to set
up ldap on the same server I'm running MailScanner/sendmail
on and do a
local lookup to see if the mail is to a valid user or not.
If not, just
reject it at the MTA level and save a lot of useless
spam/virus checks.
Has anybody done something along these lines, or know of a
good HowTo? I've
been googling around but haven't found anything I can really
sink my teeth
into yet.
Thanks. Sorry it's a bit off topic. Feel free to reply
directly if you
feel it's too inappropriate and don't want to clutter the list...
...Kevin
--
Kevin Miller Registered Linux User No: 307357
CBJ MIS Dept. Network Systems Administrator, Mail
Administrator
155 South Seward Street ph: (907) 586-0242
Juneau, Alaska 99801 fax: (907 586-4500
-------------------------- MailScanner list ----------------------
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------------------- MailScanner list ----------------------
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
Kevin Spicer
2006-01-13 03:24:46 UTC
Permalink
Post by Kevin Miller
I'll give it a read, but we're not running AD here. Might be I can work
around that, I don't know. Thanks...
So long as you can somehow generate a list of all valid email addresses
the general approach will work (it doesn't actually use LDAP at all, not
really too keen on exposing AD into the DMZ!)




BMRB International
http://www.bmrb.co.uk
+44 (0)20 8566 5000
_________________________________________________________________
This message (and any attachment) is intended only for the
recipient and may contain confidential and/or privileged
material. If you have received this in error, please contact the
sender and delete this message immediately. Disclosure, copying
or other action taken in respect of this email or in
reliance on it is prohibited. BMRB International Limited
accepts no liability in relation to any personal emails, or
content of any email which does not directly relate to our
business.

-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
Hirsh, Joshua
2006-01-13 03:24:46 UTC
Permalink
Hi Kevin,

This URL might be helpful to you:

http://www.unixwiz.net/techtips/postfix-exchange-users.html

It deals with Exchange 5.5 and Postfix, but exporting the list from
Exchange is the same in both cases.

I've had some problems with this setup though, because of the multiple
containers we use on our Exchange server. On the MS side, I'd suggest you
use RSSH to restrict the transfer to only be able to use SCP or SFTP to
upload the data (and refuse regular ssh, etc)

http://www.pizzashack.org/rssh/index.shtml


Cheers,
-Joshua

-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html
Jan-Peter Koopmann
2006-01-13 03:24:46 UTC
Permalink
Post by Kevin Miller
I'll give it a read, but we're not running AD here. Might be
I can work around that, I don't know. Thanks...
No problem. I came up with the AD solutionn and was suddenly confronted with a few Exchange 5.5 customers. Therefore I already adopted this. You can export all E-Mail addresses with an Exchange 5.5 tool. Of course you need to extract the e-mails from a stupid ASCII format but it is not too hard. I do not have the scripts here at the moment. If you need them, mail me off list.

Basically you will use the ADMIN program in the exchange bin dir. Create an empty template e.g. export_all.csv:

Obj-Class,E-mail Addresses,Secondary-Proxy-Addresses

Then you need an options.ini:

[export]
basepoint=/o=yourbasepoint
exportobject=mailbox
informationlevel=full
subcontainers=Yes
Hiddenobjects=Yes

Then call

./ADMIN /e export_all.csv /o options_.ini /n

And it will export all necessary mailbox-attributes into export_all.csv. Changing exportobject to dl will give you distribution lists.


Regards,
JP

-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to ***@jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at http://www.mailscanner.biz/maq/ and the archives
at http://www.jiscmail.ac.uk/lists/mailscanner.html

Loading...