> > Still, this will probably be useful for machines running qmail with small
> > lists. Perhaps Joe will put it on the patches page?
It'll work, but I don't see the point. I use qmail and majordomo, and
there's a much easier way to keep bad guys from using your outgoing lists.
For the outgoing alias, I make a symlink to the majordomo list file called
something like ~majordom/.qmail-foolist-outgoing, and in the foolist file as
the first line I put this line:
| mjvalidate
The mjvalidate program is so simple that I'll just display the source:
#####################
#!/usr/bin/perl5
$mjid = getpwnam("majordom");
$checkline = <STDIN>;
exit 0 if $checkline =~ /\(qmail \d+ invoked by uid $mjid\)/;
print "You cannot send mail to this address.\n";
exit 100;
#####################
All it does is to look at the first Received: line to make sure that the
message is coming from the majordom user-id, and bounce the message if
not. Works great.
There are two sets of qmail+majordomo configs. Mine uses several .qmail
files per list but no majordomo or .qmail hacks, while the other set catches
the mail slightly sooner and uses fewer files. They both work, if I were
doing it from scratch I'd probably do it the other way.
Regards,
John Levine, johnl@iecc.com, Primary Perpetrator of "The Internet for Dummies",
Information Superhighwayman wanna-be, http://iecc.com/johnl, Sewer Commissioner
Finger for PGP key, f'print = 3A 5B D0 3F D9 A0 6A A4 2D AC 1E 9E A6 36 A3 47
References:
|
|