> args = ""
> foreach $entry @ARGV {
> if ($entry ~ /^\/*/) {
> if (!open(IN, $entry)) {
> die("resend: Can't open $entry: $!");
> }
> while(<IN>) {
> $args = $args . " " . $_
> }
> close(IN);
> } else {
> $args = $args . " " . $entry
> }
> }
>
> $sendmail_cmd = "/usr/lib/sendmail $opt_m -f$sendmail_sender " . $args
>
> This should work for mailing lists with fewer than several thousand entries,
> that aren't running on older systems.
Another caveat is that if you have "strip = no" in your config file, the
"comments" that are found in the mailing list file will confuse sendmail.
It should be possible to strip those out, or quote each name-comment pair so
that sendmail doesn't object.
I agree that having resend call sendmail directly would be a good idea.
Not only would it solve the outgoing alias security problem, you could
include as part of that "outgoing" routine a call to archive, letting you
avoid the problem of wanting to archive messages after resend has checked
them but before resend has added the header and footer to each message.
>
> I don't use sendmail as the routing agent at work because of security
> problems endemic to sendmail implementations. Shouldn't "/usr/lib/sendmail"
> all through majordomo be replaced by something from the cf file?
>
In fact, it looks like the work has begun. In majordomo.cf, I found:
># $mailer -- What program and args do I use to send mail?
># The variable $to can be interpolated into this command line,
># however the $to variable is provided by the person sending mail,
># and much mischief can be had by playing with this variable.
># Use $to with care.
>$mailer = "/usr/lib/sendmail -f\$sender -t";
Majordomo seems to look as this value, but resend doesn't seem too. I
noticed this problem on a FreeBSD machine where sendmail is found at
/usr/sbin/sendmail, and I definitely hope that this configuration variable
becomes "supported". [I have Majordomo 1.93.]
Nathan
----------------------------------------------------------------------------
Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server)
nathant@ontko.com | Richmond, IN | ftp.ontko.com:/users/ontko (anon ftp)
Follow-Ups:
-
Re: Digest
From: peter@taronga.com (Peter da Silva)
References:
-
Re: Digest
From: peter@taronga.com (Peter da Silva)
|
|