Greg Maples <greg(_at_)clari(_dot_)net> writes:
I personally hold the netconnect.net domain. In that domain, there are
about a half-dozen valid addresses, including
greg(_at_)netconnect(_dot_)net(_dot_) The
netconnect.net domain is being 'answered' by a machine in the clari.net
domain (via virtual hosting). Thus, all mail to currently non-existant
addresses in netconnect.net are being sent by default to
greg(_at_)clari(_dot_)net(_dot_)
This means that I get all spam aimed at netconnect.net.
The big problem is that there is a domain, connect.net, that has
an ISP service in it, and lots of users mis-direct their return or originating
address to be netconnect.net instead of connect.net. This means that I end up
getting all their mail, spam or not.
What I want to do with procmail is to intercept real netconnect.net
addresses and send them where they really go. That much works using normal
sendmail aliasing. I also want to send a polite note to all connect.net
Okay, so you've handled mail with valid envelope recipients in the
netconnect.net domain.
mis-directed mail, bouncing it back to the sender. I do that with a procmail
TO_ matching rule, and that works okay as well.
I can't see how you recognize these, but you say it works, so that's fine.
What doesn't work is to detect and eliminate what is usually, but not
always spam. That is, mail that does not appear to have a valid 'to' line, as
in the example I provided. The only indicator I find there is a 'for' line in
a multi-line 'received' entry. I don't want to just dump it in the circular
file, I dont want to look at it, cause it's often personal. I don't want to
have to hand re-address mail, as I do now.
To whom should it be addressed? Should it just be bounced back to the
sender? If so:
:0
* ! ^Return-Path: *\/[^ ].*
* ! ^From *\/[^ ]+
{ # no envelope-sender! Drop it
HOST
}
:0 E
* ! ^X-Loop: this-address(_at_)this(_dot_)machine
| generate-a-bounce-message-with-X-Loop:-header \
| $SENDMAIL $SENDMAILFLAGS $MATCH
And what's the difference between these are the previous category
anyway? Is it that they were sent to the netconnect.net domain (as
evidenced by a 'for' clause in a Received: header whose value contains
an invalid "netconnet.net" address), but whose recipient headers (To:,
etc) don't contain netconnect.net? If so, just wrap the above in a
nested block with conditions:
* ! ^TO_netconnet.net\>
* ^Received:.*\<for [^ ]*\<netconnect.net\>
Or am I still missing something? (Could be: it's been two weeks since
I read your original message.)
Philip Guenther