You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Scott Lavoie <sc...@marscomputer.com> on 2010/05/19 21:56:39 UTC
Spamassasin as a gateway filter for Exchange
Can anybody point me in the direction of a document or place where I
could find information about setting up a solo Linux Debian server
running spamassassin as a gateway spam filter that sends the mail along
to an exchange server?
Scott Lavoie
Owner
Mars Computer, LLC
99 Center ST.
Bangor, ME 04401
Tel : +1 (207) 990-5533
Fax : +1 (207) 659-7021
E-mail : scott.lavoie@marscomputer.com
Web : http://www.marscomputer.com/
Re: Spamassasin as a gateway filter for Exchange
Posted by Michael Scheidell <sc...@secnap.net>.
On 5/19/10 3:56 PM, Scott Lavoie wrote:
>
> Can anybody point me in the direction of a document or place where I
> could find information about setting up a solo Linux Debian server
> running spamassassin as a gateway spam filter that sends the mail
> along to an exchange server?
>
<http://www.google.com/search?q=Debian%2Bspamassassin> ?
--
Michael Scheidell, CTO
Phone: 561-999-5000, x 1259
> *| *SECNAP Network Security Corporation
* Certified SNORT Integrator
* 2008-9 Hot Company Award Winner, World Executive Alliance
* Five-Star Partner Program 2009, VARBusiness
* Best Anti-Spam Product 2008, Network Products Guide
* King of Spam Filters, SC Magazine 2008
______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r).
For Information please see http://www.secnap.com/products/spammertrap/
______________________________________________________________________
Re: Spamassasin as a gateway filter for Exchange
Posted by Kurt Buff <ku...@gmail.com>.
On Wed, May 19, 2010 at 12:56, Scott Lavoie
<sc...@marscomputer.com> wrote:
> Can anybody point me in the direction of a document or place where I could
> find information about setting up a solo Linux Debian server running
> spamassassin as a gateway spam filter that sends the mail along to an
> exchange server?
For getting your valid email addresses from AD/Exchange to Postfix, I
have found this link to be the most useful:
http://www-personal.umich.edu/~malth/gaptuning/postfix/
You will need to create an unprivileged user (member of Domain Users
only) to perform the ldap queries, and pretty much nothing else in AD.
A bit of munging to take care of the SMTP addresses that are attached
to Public Folders and Distribution Lists, and a couple of other minor
(site-dependent) details, and you're good to go.
I run mine once an hour, via cron.
Kurt
RE: Spamassasin as a gateway filter for Exchange
Posted by Jean-Paul Natola <jn...@familycareintl.org>.
> Can anybody point me in the diretion of a document or place where I
could find information about setting up a
>solo Linux Debian server running spamassassin as a gateway spam filter that
sends the mail along to an exchange server?
I have that exact setup , but I have it running on Freebsd using exim as the MTA
if you decide to go the exim route I can send you a copy of configuration files and tell you how my setup is
RE: Spamassasin as a gateway filter for Exchange
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
> > Can anybody point me in the direction of a document or place where I
> > could find information about setting up a solo Linux Debian server
> > running spamassassin as a gateway spam filter that sends the mail
> > along to an exchange server?
>
> This can be confusing to those that have never done this before. What you
> need is postfix to receive the mail, then for it to pass onto spamassassin
> to scan it for spam. If it passes, then to forward it to exchange.
I guess the only (important!) stunt, that is not outlined in a gazillion
howtos out there is, how to accept mail *exclusively* for valid email
addresses -- where the (non-static list?) master is the Exchange server.
If you accept all mail at your MX, regardless of the recipient, your
backends most likely will contribute to the problem by rejecting after
the original accept, and bounce the spam for a nonexistent address
"back" to the forged, innocent sender.
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Spamassasin as a gateway filter for Exchange
Posted by Kurt Buff <ku...@gmail.com>.
On Wed, May 19, 2010 at 15:14, Kaleb Hosie <kh...@spectraaluminum.com> wrote:
>> Hi,
>>
>> Not to highjack the thread, but there are also other things to consider.
>>
>> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>>
>> If there are multiple exchange backends for postfix/spamasassin
>> gateway ... how could one validate that users exists, given that you
>> only have a list of valid users for some of the exchange servers and
>> the mailahead/milterahead/smtp are not an option?
>>
>> I'm looking for a pointer here ...
>>
>> transport_maps is for the entire domain and where to send the mail ...
>> but, I'm lost about the validations of users for some of the domains
>> ...
>
>>Theoretically you could do that with LDAP. Assuming a cluster of Exchange
>>servers for one AD Domain, all users should have an entry in the GAL.
>>So in your filtering front end you could do an LDAP query against the
>>GAL for each recipient and reject the message if not found.
>>
>>However if that is a busy system you would do a -lot- of queries and
>>risk running your DC out of LDAP threads, causing real problems.
>>(we ran into a similar problem with a password checking module under
>>heavy authetication loads ;(.
>>
>>If your user population is not too dynamic, it might be more efficient
>>to do user list exports & map rebuilds on a periodic basis.
>>You could pull the user list using LDAP and build the maps on the postifx
>>box using a cron job.
>
> Take a look at:
> http://www2.origogeneris.com:4000/relay_recipients.html
>
> This script is what we're using at our organization to update the list of exchange emails.
>
>
> PS: You really started something there Scott :P
>
It would be nice if you didn't run web servers on non-standard ports...
Our firewall only allows out ports 80 and 443.
Kurt
RE: Spamassasin as a gateway filter for Exchange
Posted by Kaleb Hosie <kh...@spectraaluminum.com>.
> Hi,
>
> Not to highjack the thread, but there are also other things to consider.
>
> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>
> If there are multiple exchange backends for postfix/spamasassin
> gateway ... how could one validate that users exists, given that you
> only have a list of valid users for some of the exchange servers and
> the mailahead/milterahead/smtp are not an option?
>
> I'm looking for a pointer here ...
>
> transport_maps is for the entire domain and where to send the mail ...
> but, I'm lost about the validations of users for some of the domains
> ...
>Theoretically you could do that with LDAP. Assuming a cluster of Exchange
>servers for one AD Domain, all users should have an entry in the GAL.
>So in your filtering front end you could do an LDAP query against the
>GAL for each recipient and reject the message if not found.
>
>However if that is a busy system you would do a -lot- of queries and
>risk running your DC out of LDAP threads, causing real problems.
>(we ran into a similar problem with a password checking module under
>heavy authetication loads ;(.
>
>If your user population is not too dynamic, it might be more efficient
>to do user list exports & map rebuilds on a periodic basis.
>You could pull the user list using LDAP and build the maps on the postifx
>box using a cron job.
Take a look at:
http://www2.origogeneris.com:4000/relay_recipients.html
This script is what we're using at our organization to update the list of exchange emails.
PS: You really started something there Scott :P
Re: Spamassasin as a gateway filter for Exchange
Posted by David B Funk <db...@engineering.uiowa.edu>.
On Wed, 19 May 2010, Mikael Syska wrote:
> Hi,
>
> Not to highjack the thread, but there are also other things to consider.
>
> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>
> If there are multiple exchange backends for postfix/spamasassin
> gateway ... how could one validate that users exists, given that you
> only have a list of valid users for some of the exchange servers and
> the mailahead/milterahead/smtp are not an option?
>
> I'm looking for a pointer here ...
>
> transport_maps is for the entire domain and where to send the mail ...
> but, I'm lost about the validations of users for some of the domains
> ...
Theoretically you could do that with LDAP. Assuming a cluster of Exchange
servers for one AD Domain, all users should have an entry in the GAL.
So in your filtering front end you could do an LDAP query against the
GAL for each recipient and reject the message if not found.
However if that is a busy system you would do a -lot- of queries and
risk running your DC out of LDAP threads, causing real problems.
(we ran into a similar problem with a password checking module under
heavy authetication loads ;(.
If your user population is not too dynamic, it might be more efficient
to do user list exports & map rebuilds on a periodic basis.
You could pull the user list using LDAP and build the maps on the postifx
box using a cron job.
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{
Re: Spamassasin as a gateway filter for Exchange
Posted by David B Funk <db...@engineering.uiowa.edu>.
On Wed, 19 May 2010, Mikael Syska wrote:
> Hi,
>
> Not to highjack the thread, but there are also other things to consider.
>
> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>
> If there are multiple exchange backends for postfix/spamasassin
> gateway ... how could one validate that users exists, given that you
> only have a list of valid users for some of the exchange servers and
> the mailahead/milterahead/smtp are not an option?
>
> I'm looking for a pointer here ...
>
> transport_maps is for the entire domain and where to send the mail ...
> but, I'm lost about the validations of users for some of the domains
> ...
One other thought, assuming just one AD Domain as the target and AD admins
who are cooperative, just set up MSFU (MicroSoft services for Unix) on
the DCs and populate the extra attributes in each user's account entry.
(set the shell to '/bin/false' to prevent them from trying to login on
the postfix box) export the "account" entries as either a NIS domain
or LDAP accounts. Make sure the Unix user-IDs 'look' like the incoming
e-mail names.
Then all you should need to do on the postfix box is add that data source
to the nsswitch.conf file and voila, they become valid users for postfix
to check against. Use nscd to prevent abuse of the DCs when dictionary
attack spam floods come by. ;)
Untested but should be do-able w/o too much work and will be auto-magic
one set up.
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{
Re: Spamassasin as a gateway filter for Exchange
Posted by David Morton <mo...@dgrmm.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 5/19/10 4:13 PM, Mikael Syska wrote:
> If there are multiple exchange backends for postfix/spamasassin
> gateway ... how could one validate that users exists, given that you
> only have a list of valid users for some of the exchange servers and
> the mailahead/milterahead/smtp are not an option?
Postfix can handle this, see:
http://www.postfix.org/ADDRESS_VERIFICATION_README.html#recipient
- --
David Morton <mo...@dgrmm.net>
Morton Software & Design http://www.dgrmm.net - Ruby on Rails
PHP Applications
Maia Mailguard http://www.maiamailguard.com - Spam management
for mail servers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFL9IeFUy30ODPkzl0RAnIKAJ4omCdmkuqRsfHfw1Npnef8UgljlQCeOqAa
gjq0wN1n8mPuNVfoPfJbXzM=
=PxtK
-----END PGP SIGNATURE-----
RE: Spamassasin as a gateway filter for Exchange
Posted by Jean-Paul Natola <jn...@familycareintl.org>.
>
You can use Postfix's probing (or Exim's callout) to query the Exchange
'server' provided it is set up to reject invalid recipients. As pointed
out if this is not done Exchange will happily take any old rubbish and
bounce it some time later. Alternatively have the MTA make an LDAP
callout to AD. Exchange is basically an AD schema extension so it's
reasonably easy to do - but network chatter is a PITA.
To solve that annoying Exchange 'I take any mail dot com...' issue:
To enable valid recipients only....
>1) Expand ESM, Message Delivery.
>2) Right click on "Message Delivery" and choose Properties.
>3) Click on the tab "Recipient Filtering".
>4) Enable the option "Filter Recipients who are not in the directory."
You then need to enable the Recipient Filter on the SMTP Server.
>1) Still in ESM, Expand Admin Groups, , Server, , Protocols, SMTP.
This is assuming he's on 2003 or earlier, if you're on 07 or higher it will be enabled by default ONLY if edge servers are being used, otherwise it has to be enables through the shell (Exchange management shell)
Re: Spamassasin as a gateway filter for Exchange
Posted by "corpus.defero" <co...@idnet.com>.
On Wed, 2010-05-19 at 17:37 -0500, Andy Dorman wrote:
> On 05/19/2010 04:26 PM, Karsten � wrote:
> > On Wed, 2010-05-19 at 23:13 +0200, Mikael Syska wrote:
> >> Not to highjack the thread, but there are also other things to consider.
> >>
> >> I have no idea how on Postfix, but this could help you too Scott Lavoie.
> >>
> >> If there are multiple exchange backends for postfix/spamasassin
> >> gateway ... how could one validate that users exists, given that you
> >> only have a list of valid users for some of the exchange servers and
> >> the mailahead/milterahead/smtp are not an option?
> >
> > Don't think you're hijacking the thread -- you just stated exactly, what
> > I mentioned in my previous post.
> >
> > The only real problem, validating recipients at the front MX, based on
> > the data in the backend Exchange servers. Everything else is not a
> > problem, even though managing a Linux server might seem to be one from
> > the point of view of a Windows admin... ;)
> >
>
> Aside from the spam, keeping track of the valid addresses has been one of our
> (AnteSpam) biggest challenges over the past 8 years. The solution that has
> worked best for us has been to maintain a separate list of valid addresses for
> postfix to use. But coming from a db background, it has annoyed us no end that
> we have to maintain a duplicate of another db. ;-)
>
> We develop the valid address list by using a short (and very fast) perl smtp
> test that checks the destination server's response to RCPT for the new address.
> We run this test when email comes in for every new/unknown address (and we
> track the failures in a simple key-value high speed db so we do not continuously
> hammer the poor destination servers with queries for the same bad address used
> yesterday or earlier).
>
> Exchange servers have been our biggest headache with doing this however cause
> many take "eons" to respond. And when your filtering server is trying to handle
> a LOT of incoming junk emails per second, you just can not wait for Exchange to
> get around to answering you. So for most Exchange servers we either require
> they manage their address list manually OR, if they insist on AnteSpam
> automatically adding new addresses, we send what we call a "ping" email with a
> special reply-to address so when the Exchange server gets around to sending us
> the NDR, we can mark that address as bogus and move on.
>
> As you can see from this long-winded but simplified explanation, this has not
> been easy to do. Honestly, I am NOT an Exchange expert...but I swear it had to
> be a design goal for some of these servers take 15 or 30 minutes (or longer) to
> send the NDR. And when you are supporting a domain that is being flooded with
> thousands of emails to bogus addresses per hour, it gets kinda tedious holding
> the mail and addresses in limbo long enough to give the Exchange server time to
> respond (or not) so you know what to do with the email.
>
> Honestly, for a simple solution the best thing is to manually keep a list of
> valid addresses for Postfix (or whatever MTA you use). It adds a little support
> load until you train the domain admin to add new addresses twice, once in
> Exchange and once for the filter. But the option of building the valid address
> list automatically is NOT for the faint of heart.
>
> Or I suppose it is possible for Exchange and Postfix/your MTA to share a db of
> valid addresses? I know Postfix is very flexible in that regard. No clue about
> Exchange.
>
> Good luck.
>
You can use Postfix's probing (or Exim's callout) to query the Exchange
'server' provided it is set up to reject invalid recipients. As pointed
out if this is not done Exchange will happily take any old rubbish and
bounce it some time later. Alternatively have the MTA make an LDAP
callout to AD. Exchange is basically an AD schema extension so it's
reasonably easy to do - but network chatter is a PITA.
To solve that annoying Exchange 'I take any mail dot com...' issue:
To enable valid recipients only....
1) Expand ESM, Message Delivery.
2) Right click on "Message Delivery" and choose Properties.
3) Click on the tab "Recipient Filtering".
4) Enable the option "Filter Recipients who are not in the directory."
You then need to enable the Recipient Filter on the SMTP Server.
1) Still in ESM, Expand Admin Groups, , Server, , Protocols, SMTP.
2) Right click on SMTP Virtual Server and choose Properties.
3) Click on "Advanced" next to the IP address on the first tab.
4) With the IP address selected, choose "Edit".
5) Enable "Apply Recipient Filter".
6) Click Apply/OK until clear.
Re: Spamassasin as a gateway filter for Exchange
Posted by Andy Dorman <ad...@ironicdesign.com>.
On 05/19/2010 04:26 PM, Karsten � wrote:
> On Wed, 2010-05-19 at 23:13 +0200, Mikael Syska wrote:
>> Not to highjack the thread, but there are also other things to consider.
>>
>> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>>
>> If there are multiple exchange backends for postfix/spamasassin
>> gateway ... how could one validate that users exists, given that you
>> only have a list of valid users for some of the exchange servers and
>> the mailahead/milterahead/smtp are not an option?
>
> Don't think you're hijacking the thread -- you just stated exactly, what
> I mentioned in my previous post.
>
> The only real problem, validating recipients at the front MX, based on
> the data in the backend Exchange servers. Everything else is not a
> problem, even though managing a Linux server might seem to be one from
> the point of view of a Windows admin... ;)
>
Aside from the spam, keeping track of the valid addresses has been one of our
(AnteSpam) biggest challenges over the past 8 years. The solution that has
worked best for us has been to maintain a separate list of valid addresses for
postfix to use. But coming from a db background, it has annoyed us no end that
we have to maintain a duplicate of another db. ;-)
We develop the valid address list by using a short (and very fast) perl smtp
test that checks the destination server's response to RCPT for the new address.
We run this test when email comes in for every new/unknown address (and we
track the failures in a simple key-value high speed db so we do not continuously
hammer the poor destination servers with queries for the same bad address used
yesterday or earlier).
Exchange servers have been our biggest headache with doing this however cause
many take "eons" to respond. And when your filtering server is trying to handle
a LOT of incoming junk emails per second, you just can not wait for Exchange to
get around to answering you. So for most Exchange servers we either require
they manage their address list manually OR, if they insist on AnteSpam
automatically adding new addresses, we send what we call a "ping" email with a
special reply-to address so when the Exchange server gets around to sending us
the NDR, we can mark that address as bogus and move on.
As you can see from this long-winded but simplified explanation, this has not
been easy to do. Honestly, I am NOT an Exchange expert...but I swear it had to
be a design goal for some of these servers take 15 or 30 minutes (or longer) to
send the NDR. And when you are supporting a domain that is being flooded with
thousands of emails to bogus addresses per hour, it gets kinda tedious holding
the mail and addresses in limbo long enough to give the Exchange server time to
respond (or not) so you know what to do with the email.
Honestly, for a simple solution the best thing is to manually keep a list of
valid addresses for Postfix (or whatever MTA you use). It adds a little support
load until you train the domain admin to add new addresses twice, once in
Exchange and once for the filter. But the option of building the valid address
list automatically is NOT for the faint of heart.
Or I suppose it is possible for Exchange and Postfix/your MTA to share a db of
valid addresses? I know Postfix is very flexible in that regard. No clue about
Exchange.
Good luck.
--
Andy Dorman
Ironic Design, Inc.
AnteSpam.com, HomeFreeMail.com, ComeHome.net
Re: Spamassasin as a gateway filter for Exchange
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Wed, 2010-05-19 at 23:34 +0200, Mikael Syska wrote:
> Yes, we are unfortunately one of the bad guess atm, and I want to
> change that ... so hopefully this will give Exchange users and idea
> how to fight it, if they are using this kind of setup.
Ugh. Well, good you *want* to change it. :)
> > > Not to highjack the thread, but there are also other things to consider.
> > Don't think you're hijacking the thread -- you just stated exactly, what
> > I mentioned in my previous post.
>
> Yes, and I was actually thinking of writing the post one of these
> days, but this seems to be the right time to open such question.
>
> Reading in the docs ... there seem to be a way, but not for me logical
> way of doing this. I I will need some hints, maybe I need to post to
> the postfix mailing list :-)
Yes! Now that you mention it... Just recalled a section in the Book of
Postfix [1], describing exactly this scenario. A frontend postfix with a
backend Exchange server, exclusively accepting mail for *valid*
recipients.
I did not read that section, though just glimpsing at the first intro
paragraph suggests this is exactly it. Uses LDAP or something.
So, yeah, might want to poke the postfix list. The authors of the book
are hanging out there, too. And please leave some pointers and links
into postfix list archives here. :)
guenther
[1] Authors: Ralf Hildebrandt, Patrick Ben Koetter. This is the second,
revised German edition, though. More recent than the English one.
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Spamassasin as a gateway filter for Exchange
Posted by Mikael Syska <mi...@syska.dk>.
Hi,
Yes, we are unfortunately one of the bad guess atm, and I want to
change that ... so hopefully this will give Exchange users and idea
how to fight it, if they are using this kind of setup.
2010/5/19 Karsten Bräckelmann <gu...@rudersport.de>:
> On Wed, 2010-05-19 at 23:13 +0200, Mikael Syska wrote:
>> Not to highjack the thread, but there are also other things to consider.
>>
>> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>>
>> If there are multiple exchange backends for postfix/spamasassin
>> gateway ... how could one validate that users exists, given that you
>> only have a list of valid users for some of the exchange servers and
>> the mailahead/milterahead/smtp are not an option?
>
> Don't think you're hijacking the thread -- you just stated exactly, what
> I mentioned in my previous post.
Yes, and I was actually thinking of writing the post one of these
days, but this seems to be the right time to open such question.
Reading in the docs ... there seem to be a way, but not for me logical
way of doing this. I I will need some hints, maybe I need to post to
the postfix mailing list :-)
>
> The only real problem, validating recipients at the front MX, based on
> the data in the backend Exchange servers. Everything else is not a
> problem, even though managing a Linux server might seem to be one from
> the point of view of a Windows admin... ;)
>
>
> --
> char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
> main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
> (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
>
>
mvh
RE: Spamassasin as a gateway filter for Exchange
Posted by Kaleb Hosie <kh...@spectraaluminum.com>.
>
> > I think it would be easier to just accept only emails for
> your domain(s) at
> > your mta (postfix or exim), then enable the antispam filter on
> > exchange and configure it drop (not reject / bounce) any
> messages to invalid addresses.
>
> That's a very bad idea-- legitimate senders will sometimes
> mistype addresses, and having their messages disappear into a
> black hole with no notice to the sender is... suboptimal.
>
>
The last server to give a 250 SMTP Code is responsible for for sending the
bounce message. If they send the message to your server and your server
gives a 550 SMTP code then it's still the users own server who is responible
for sending the bounce message.
The only other way to do it is if you manually sort through emails who's
"to" address is mistyped. I personally rather not do that.
Kaleb
Re: Spamassasin as a gateway filter for Exchange
Posted by David Morton <mo...@dgrmm.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 5/19/10 9:12 PM, Jean-Paul Natola wrote:
>
>
>> The only real problem, validating recipients at the front MX, based
>> on the data in the backend Exchange servers.
>
> I think it would be easier to just accept only emails for your
> domain(s) at your mta (postfix or exim), then enable the antispam
> filter on exchange and configure it drop (not reject / bounce) any
> messages to invalid addresses.
Why in the world would you do that? Accepting all addresses just
invites dictionary attack abuse and wastes bandwidth.
Do it right and use recipient verification in postfix. Always reject
unknown users at the front door, immediately. You can't give bots an
inch or they'll take a mile.
- --
David Morton <mo...@dgrmm.net>
Morton Software & Design http://www.dgrmm.net - Ruby on Rails
PHP Applications
Maia Mailguard http://www.maiamailguard.com - Spam management
for mail servers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFL9J5dUy30ODPkzl0RAiBpAJ4oxThitdC1FwDy3K0u2yyA8SXIngCdHqxA
HwyjQNmB3bEI7kUqOeTrGlI=
=jXzG
-----END PGP SIGNATURE-----
RE: Spamassasin as a gateway filter for Exchange
Posted by Jean-Paul Natola <jn...@familycareintl.org>.
-----Original Message-----
> I think it would be easier to just accept only emails for your domain(s) at
> your mta (postfix or exim), then enable the antispam filter on exchange and
> configure it drop (not reject / bounce) any messages to invalid addresses.
That's a very bad idea-- legitimate senders will sometimes mistype
addresses, and having their messages disappear into a black hole with no
notice to the sender is... suboptimal.
--
You can always enable a catch all,
Re: Spamassasin as a gateway filter for Exchange
Posted by Dave Pooser <da...@pooserville.com>.
On 5/19/10 9:12 PM, "Jean-Paul Natola" <jn...@familycareintl.org> wrote:
> I think it would be easier to just accept only emails for your domain(s) at
> your mta (postfix or exim), then enable the antispam filter on exchange and
> configure it drop (not reject / bounce) any messages to invalid addresses.
That's a very bad idea-- legitimate senders will sometimes mistype
addresses, and having their messages disappear into a black hole with no
notice to the sender is... suboptimal.
--
Dave Pooser
Cat-Herder-in-Chief, Pooserville.com
"...Life is not a journey to the grave with the intention of arriving
safely in one pretty and well-preserved piece, but to slide across the
finish line broadside, thoroughly used up, worn out, leaking oil, and
shouting GERONIMO!!!" -- Bill McKenna
RE: Spamassasin as a gateway filter for Exchange
Posted by Jean-Paul Natola <jn...@familycareintl.org>.
>The only real problem, validating recipients at the front MX, based on
>the data in the backend Exchange servers.
I think it would be easier to just accept only emails for your domain(s) at your mta (postfix or exim), then enable the antispam filter on exchange and configure it drop (not reject / bounce) any messages to invalid addresses.
Re: Spamassasin as a gateway filter for Exchange
Posted by Yet Another Ninja <sa...@alexb.ch>.
On 2010-05-19 23:57, Karsten Bräckelmann wrote:
<snipped>
> What I can do, however, is to split up the original question into
> manageable chunks, as unrelated as possible. SA and postfix on Debian?
I can highly recommend: FuGlu http://sourceforge.net/apps/trac/fuglu/
Re: Spamassasin as a gateway filter for Exchange
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Wed, 2010-05-19 at 23:39 +0200, Yet Another Ninja wrote:
> On 2010-05-19 23:26, Karsten Bräckelmann wrote:
> > The only real problem, validating recipients at the front MX, based on
> > the data in the backend Exchange servers. Everything else is not a
> > problem, even though managing a Linux server might seem to be one from
> > the point of view of a Windows admin... ;)
>
> This can be done VERY easily and safely with milter-ahead
> (Sendmail/Postfix).
>
> If you don't need the nifty extras milter-ahead supplies, Postfix has
> built in rcpt adddress verification which imo, works well and is also
> well documented
Nice pointers. I guess. ;) I don't manage any Windows servers, and I
frankly don't want to. So can't help here myself.
What I can do, however, is to split up the original question into
manageable chunks, as unrelated as possible. SA and postfix on Debian?
Check. Postfix talking to a backend Exchange server... Identified
problem, waiting for others to step up. Like you. :)
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Spamassasin as a gateway filter for Exchange
Posted by Yet Another Ninja <sa...@alexb.ch>.
On 2010-05-19 23:26, Karsten Bräckelmann wrote:
> On Wed, 2010-05-19 at 23:13 +0200, Mikael Syska wrote:
>> Not to highjack the thread, but there are also other things to consider.
>>
>> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>>
>> If there are multiple exchange backends for postfix/spamasassin
>> gateway ... how could one validate that users exists, given that you
>> only have a list of valid users for some of the exchange servers and
>> the mailahead/milterahead/smtp are not an option?
>
> Don't think you're hijacking the thread -- you just stated exactly, what
> I mentioned in my previous post.
>
> The only real problem, validating recipients at the front MX, based on
> the data in the backend Exchange servers. Everything else is not a
> problem, even though managing a Linux server might seem to be one from
> the point of view of a Windows admin... ;)
This can be done VERY easily and safely with milter-ahead
(Sendmail/Postfix).
If you don't need the nifty extras milter-ahead supplies, Postfix has
built in rcpt adddress verification which imo, works well and is also
well documented
Re: Spamassasin as a gateway filter for Exchange
Posted by Benny Pedersen <me...@junc.org>.
On tor 20 maj 2010 08:12:12 CEST, Sebastian Ries wrote
> http://www-personal.umich.edu/~malth/gaptuning/postfix/getadsmtp.pl
> Run it hourly, do a postmap afterwords and you are done ;-)
enable ldap in postfix, and then postfix dont need clumsy perl scripts
with old data 1 sec after postmap :)
--
xpoint http://www.unicom.com/pw/reply-to-harmful.html
Re: Spamassasin as a gateway filter for Exchange
Posted by Sebastian Ries <Se...@dtnet.de>.
Hi
> > If there are multiple exchange backends for postfix/spamasassin
> > gateway ... how could one validate that users exists, given that you
> > only have a list of valid users for some of the exchange servers and
> > the mailahead/milterahead/smtp are not an option?
As every Exchange requires an Acive Directory it does not matter if
there is one exchange or many instances
Here is a perl-script that pulls out all valid email-addresses and
creates a file usable for postfix relay_receipients
http://www-personal.umich.edu/~malth/gaptuning/postfix/getadsmtp.pl
Run it hourly, do a postmap afterwords and you are done ;-)
Regards
Sebastian Ries
--
------------------------------------------------------------
DT Netsolution GmbH - Talaeckerstr. 30 - D-70437 Stuttgart
Tel: +49-711-849910-36 Fax: +49-711-849910-936
WEB: http://www.dtnet.de/ email: Sebastian.Ries@dtnet.de
Re: Spamassasin as a gateway filter for Exchange
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Wed, 2010-05-19 at 23:13 +0200, Mikael Syska wrote:
> Not to highjack the thread, but there are also other things to consider.
>
> I have no idea how on Postfix, but this could help you too Scott Lavoie.
>
> If there are multiple exchange backends for postfix/spamasassin
> gateway ... how could one validate that users exists, given that you
> only have a list of valid users for some of the exchange servers and
> the mailahead/milterahead/smtp are not an option?
Don't think you're hijacking the thread -- you just stated exactly, what
I mentioned in my previous post.
The only real problem, validating recipients at the front MX, based on
the data in the backend Exchange servers. Everything else is not a
problem, even though managing a Linux server might seem to be one from
the point of view of a Windows admin... ;)
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Spamassasin as a gateway filter for Exchange
Posted by Mikael Syska <mi...@syska.dk>.
Hi,
Not to highjack the thread, but there are also other things to consider.
I have no idea how on Postfix, but this could help you too Scott Lavoie.
If there are multiple exchange backends for postfix/spamasassin
gateway ... how could one validate that users exists, given that you
only have a list of valid users for some of the exchange servers and
the mailahead/milterahead/smtp are not an option?
I'm looking for a pointer here ...
transport_maps is for the entire domain and where to send the mail ...
but, I'm lost about the validations of users for some of the domains
...
thanks
On Wed, May 19, 2010 at 11:02 PM, Kaleb Hosie
<kh...@spectraaluminum.com> wrote:
>> Can anybody point me in the direction of a document or place where I
> could find information about setting up a
>>solo Linux Debian server running spamassassin as a gateway spam filter that
> sends the mail along to an exchange server?
>
> This can be confusing to those that have never done this before. What you
> need is postfix to receive the mail, then for it to pass onto spamassassin
> to scan it for spam. If it passes, then to forward it to exchange.
>
> I can't promise this will be a good how-to but it looks good; take a look.
> http://www.debuntu.org/postfix-and-pamassassin-how-to-filter-spam
>
mvh
Mikael Syska
RE: Spamassasin as a gateway filter for Exchange
Posted by Kaleb Hosie <kh...@spectraaluminum.com>.
> Can anybody point me in the direction of a document or place where I
could find information about setting up a
>solo Linux Debian server running spamassassin as a gateway spam filter that
sends the mail along to an exchange server?
This can be confusing to those that have never done this before. What you
need is postfix to receive the mail, then for it to pass onto spamassassin
to scan it for spam. If it passes, then to forward it to exchange.
I can't promise this will be a good how-to but it looks good; take a look.
http://www.debuntu.org/postfix-and-pamassassin-how-to-filter-spam