We have a custom spam filtering service implemented as
a milter.
We have noticed the milter is getting called for every SMTP
request to the server, even if the request is for an invalid
email address, like z...@jammconsulting.com
Since those email addresses are going to be rejected by the
server as invalid anyway, we would like to avoid processing them in
the milter.
Is there a way to do that?
Thanks,
Neil
--
Neil Aggarwal, (281)846-8957, www.JAMMConsulting.com
NEW! Milter based spam blocking. Easy to use, 100% effective.
Register for FREE at http://JunkMailBlocker.net
I don't think there is a way that you can avoid your milter being
called. Though I don't think there is any reason why your milter has to
actually do any thing if it is obvious that the message will be
rejected. I.e. you could return an dummy "ok" and not do any in depth
processing.
Grant. . . .
Thanks for the info. I was hoping there was something
we could put into the sendmail.mc file, like delay_checks
or something.
You are welcome.
> I was hoping there was something we could put into the sendmail.mc
> file, like delay_checks or something.
I'm not saying that there isn't. Just that from my (mis)understanding
of how milters work, I would not be surprised if there isn't.
Grant. . . .
You may want to check out "milter manager". With out having used it my
self, I get the impression that it can add some logic in to milter
processing. I don't know if this means that subsequent milters will
only be called if previous milters don't reject messages or if different
sets of milters are applied based on connecting IP or what. But you
might want to give it a look.
In short, milter manager interfaces with Sendmail like a normal milter
and then it acts like Sendmail talking to other milters behind it. I.e.
Sendmail <-> milter manager <-> milter1
<-> milter2
Link - Introduction - milter manager
- http://milter-manager.sourceforge.net/reference/introduction.html
Grant. . . .
Are you certain. I believe that milters are NOT called when the
corresponding ruleset has rejected that element of the message. The
rulesets do run first.
I am seeing logs of the milter processing addresses that are invalid.
They eventually result in a User unknown response from the server.
I am seeing logs of the milter processing addresses that are invalid.
They eventually result in a User unknown response from the server.
---------
Did your sendmail ruleset reject the address? I suspect not.
Performing a lookup to the system for a valid user isn't part of ruleset
processing. It comes later, especially since recipients can be altered by
milters.
OK, I think I understand what you are saying,
Processing the virtusertable happens after the milter.
How do I set up blocking in the rulesets? I assume
that will be in sendmail.mc, correct?
OK, I think I understand what you are saying,
Processing the virtusertable happens after the milter.
-----
NO! That happens during the ruleset.
----
How do I set up blocking in the rulesets? I assume
that will be in sendmail.mc, correct?
-----
RTFM.
> RTFM.
Actually, everyone should RTFM, specifically
https://www.milter.org/developers/api/xxfi_negotiate and the
SMFIP_RCPT_REJ flag. Sendmail 8.14.x only, alas.
Regards,
David.
OK, I *finally* figured out what you were saying.
I added:
@jammconsulting.com error:nouser 550 No such user
to the bottom of my virtusertable and now I don't see non-listed
addresses in the milter log.
Thanks,
Neil