Thought this might be useful to some here.
The problem:
1.Spammers send their junk to majordomo@ with a bogus From: address
2.Majordomo sends a "Majordomo results:" help message to the From: address
3.The domain bounces the mail
4.Majordomo delivers the bounce to majordomo-Owner
Since the default message contains no information about the original sender
(the spammer), there's little or nothing to be done to
correct/complain/block the sender. We get about 10 of these per day. Would
probably get more, but we do some VERY aggressive blocking of spamming
servers.
The hack:
Modified sub done {} in majordomo (see below)
This prints the incoming mail headers at the bottom of any help message
where
"**** No valid commands found"
If the From: is legitimate, having the headers at the bottom is probably
OK...certainly doesn't detract from the message.
If not, majordomo-Owner now has the full headers of the spammer's message,
and can act accordingly.
Note that this won't happen for a 'help' request, only when the message
contains NO valid commands.
Thoughts? Comments?
Sean
Here is the entire subroutine, with the added code marked:
# We are done processing the request; append help if needed, send the reply
# to the requestor, clean up, and exit
sub done {
# append help, if needed.
if ($count == 0) {
print REPLY "**** No valid commands found.\n";
print REPLY "**** Commands must be in message BODY, not in
HEADER.\n\n";
}
if ($needs_help || ($count == 0)) {
print REPLY "**** Help for $whoami:\n\n";
&do_help();
}
###### begin added code #####
### added to print the incoming mail message headers...scc
if ($count == 0) {
print REPLY "\n\n**** Incoming Mail Headers\n";
foreach $header (@hdrs) {
print REPLY "$header\n";
}
}
##### end added code #####
# close (and thereby send) the reply
close(REPLY);
# good bye!
exit(0);
}
|
|