Philip Guenther wrote:
PSE(_at_)netcom(_dot_)com (Professional Software Engineering) writes:
[my script problem, "simple" mailing list]
I'm not sure I'd call this a "SIMPLE maillist function". To me, simple
implies it fitting inside my .procmailrc, in less than one (67 line)
screenful.
I meant "simple" in that it isn't meant to act like a listserv -- it merely
remails to a group.
As for it affecting your regular mail, put the following right before
the mailing list rules:
:0 c:
$DEFAULT
DELIVERED = yes
How can I set the DELIVERED flag any time I place the incoming message into a
folder? The procmail man page seems to indicate that this is what controls
whether the message bounces or just falls into the bit bucket, but I've never
experienced bouncing without it.
The other thing though -- ultimatley, at the END of the script, I want it to
save a copy to an archive file, as well as forward -- so long as the message
hasn't been saved to another folder. You gave me the script info for that:
:0 c
* LASTFOLDER ?? ^^^^
!PSE(_at_)ix(_dot_)netcom(_dot_)com
except that I want to both store AND forward. I've tried, without success to
place them in braces:
:0 c
* LASTFOLDER ?? ^^^^
{
! PSE(_at_)ix(_dot_)netcom(_dot_)com
ARCHIVE-inbox
}
as well as another method:
:0 c
* LASTFOLDER ?? ^^^^
! PSE(_at_)ix(_dot_)netcom(_dot_)com
:0 a: $TEMP/Default$LOCKEXT
$DEFAULT
(I've tried this both with "A" and "a", though I think under the
circumstances, "a" is more appropriate). In both methods, I ALWAYS end up
with a copy being saved to the folder.
(the reason I explicitly declare the lockfile is because the names that show
up in the log often look hokey -- I figure there isn't much lost to
explicitly declaring something)
[snippage]
In some places (in rule expressions especially), variables don't seem
to expand, which it a bit annoying. I ran into this before, and I gave
up on it and just coded the strings I was searching for all over the
place.
Variables only expand in conditions ("rules"?) when they start with
'$'. But you correctly do that in one of the recipes, so...
Apparently, they're not consistently expanded in the LOGFILE, which, when I'm
looking for reasons things are failing, looks mighty suspicious. I dunno,
all this stuff is black magic I think.
[snippage -- sendmail to list of addresses from a file]
(That's a little harsh, but the point is: if you're struggling with
a tool, maybe you should use a easier tool. I think Smartmail may
provide just such a simpler tool. If you're struggling with a huge
procmailrc implemented mailinglist, then perhaps it is in order to
take a step back and re-evaluate how you want to do the list. Yes,
changing over may be a pain, but will it save more pain down the line
when something else breaks later? Forget the immeadiate cost; what
are the longterm costs going to look like? This rant is an open
rant, and not necessarily directed at Sean.)
The admin of the (small) ISP I use is running it on FreeBSD (for whatever
reasons), and indicates that he is unaware of any FreeBSD port of smartmail.
I'm going to do some digging around, but in the meantime, the tool is
unavailable to me. I was unaware of smartmail -- I shall endeavor to learn
more about it in case I have to implement further mail list functionality.
(BTW - this is a virtual domain configuration, so I don't have ROOT
access to SENDMAIL as a delivery agent - everything sent to the domain
goes into one POP mailbox).
Sucks to be you. Bug your admin to add the 'envelope to' header to
your mailer. (I'd suggest just adding it to just the program mailer for
philosophical reasons, but you should ignore me on this point
probably.) Does someone out there have a reference on the full
directions for doing this?
The specific directions would be great. I've fished around on DejaNews and
elsewhere looking for answers, but no luck.
Actually, I just noticed that your one formail command removes any
"X-Envelope-To:" headers. If your sendmail is adding those locally
then you should be matching against them instead of with ^TO. Doing
so will make your mailing lists work with Bcc's, etc. It's also
much cleaner.
The sendmail locally doesn't add them. I've asked the sysadm to check into
adding them though, since of course, messages sent to MULTIPLE addresses at
the same domain have a slight parsing quandary.
The main body of the mailing list function was extracted from a script which
accompanies a version of procmail I aquired. The WHOLE thing is overkill, I
just needed the redistribution capability.
BTW: one of the reasons that you hadn't seen a reply yet is that you
asked difficult questions, which take a long time to answer. I've now
spent almost an hour composing this reply, and to balance that I'll be
working an hour extra this evening. Time is money: anyone telling you
otherwise is asking for a _non-returnable_ handout.
I couldn't tell if they were difficult questions, or just my ineptness with
Procmail (I still suspect more of the latter). Then someone else posted about
MIME attachments apparently drawing them flames, and I couldn't figure. I
very much appreciate the time it took you to reply. With the assistance
you've provided, my script is now working for the most part (excepting my
bracing multiple commands issue). At least now, the much-needed mailing list
is operational (many people in a small group kept replying to sender, rather
than all recipients), and my mail isn't going to the dump (or delivering to me
three times in order to avoid the dump route). Thank you.
--
NetCruisers: http://www.professional.org/
Home of NCUtil, 3rd-party utility links (including Winsock), and FAQs!
Sean B. Straw / Professional Software Engineering
Post Box 2395 / San Rafael, CA 94912-2395
CompuServe: 72210,521 Internet: PSE(_at_)ix(_dot_)netcom(_dot_)com