On 02/04/2018 08:57 PM, Helmut K. C. Tessarek wrote:
> Thanks for the reply.
You're welcome.
> How would I do that? (Sorry, I setup my sendmail years ago - at which
> point I bought a sendmail book that I read - but I don't speak sendmail
> these days.)
I have my SpamAssassin milter defined with the following in the
sendmail.mc file:
MAIL_FILTER(`SpamAssassin', `S=unix:/var/run/spamass/spamass.sock')dnl
I then have my SpamAssassin milter included on my MTA DAEMON_OPTIONS line:
DAEMON_OPTIONS(`Family=inet, Address=192.0.2.1, Name=PublicMTA4,
Port=smtp, InputMailFilters=SpamAssassin, M=A')dnl
> Same as above. How? (This is exactly what I'm looking for. Adding a
> feature/filter/whatnot to a certain daemon, thus port.)
See above.
> Well, the spamassassin part is not that important to me, since I can
> configure the milter.
I'm not quite sure what you mean by "not important … configure the
milter". You still have to have Sendmail use the milter.
I'm saying include the SpamAssassin milter in the InputMailFilters on
the MTA, and don't put it on your SMTPS port.
> The part I really need is how to apply a feature to a certain port.
You use different DAEMON_OPTIONS to specify how each port behaves and
what filters are applied to it.
> I used dnsbl as an example, because I actually use it, so solving this
> would help me greatly.
>
> However, generally speaking there must be a way so that a
> feature/filter/whatnot only applies to a certain port or daemon.
Yes, DAEMON_OPTIONS is the Sendmail way of doing it.
> How does someone configure sendmail, so that certain things are only
> run for incoming mail, but not for mail that is sent?
Incoming implies the public MTA port. Mail that is sent can be a few
different things, but usually originates from localhost or authenticated
clients. Both of the later tend to use a different port. Thus you can
apply different settings based on the DAEMON_OPTION configuration for
said ports.
> I think I've looked into delay_checks a while back but it doesn't apply
> to the issue I'm trying to solve. Or maybe I misunderstood delay_checks.
Why do you think delay_checks feature does not apply?
My understanding of the delay_checks feature is that it allows you to
insert different parameters to influence how various filtering is done.
I.e. don't apply some filters to authenticated users, and apply them to
incoming SMTP (TCP port 25).
I'm going to defer to Claus for more details.