[Sig] Re: [Lvlug] May meeting

Randy Kramer rhkramer@fast.net
Tue, 08 May 2001 11:03:15 -0400


Dann S. Washko wrote:
> There is little more than a week to go until the LVLUG meeting which marks
> our first anniversary.  I blame Linc for this.

Clearly, fixing the blame requires more discussion.  Maybe we could have
nominations. ;-)

> I have a number of topics to cover in the gimp, but I also want to leave
> it open for those of you who have specific questions or ideas.  That being
> the case, please email me your questions or wanna-knows before the
> weekend, incase I have to do some research and testing.

Hope you noticed Paul Ryan's offer to participate in a presentation on
shells, although I think this could be saved for a future meeting and
requires additional participants.  (And, maybe his offer was focused
more at the sig group -- I don't remember whether he's been attending
the LVLUG meetings.)

I'm going to post a topic for discussion rather than a specific
question.  I don't expect to get this resolved at this coming meeting,
but perhaps get some initial reactions:

For handling my mail, I'd eventually like to migrate to using a Linux
box as a mail server, to perform the following:

1. Get mail from my ISP.

2. Filter mail based on various criteria.  Some filtered mail would be
discarded, some would be distributed as described below.

3. Distribute mail on my home LAN to the appropriate addressee. 
Initially, to keep it simple, I'd probably distribute all mail to
everybody, and let each addressee filter or discard what he is not
interested in.  As I learn more, then maybe I'd attempt to send mail to
only the appropriate recipient, recognizing that some things should go
to all (family news, for example).

4. Accept outgoing mail from any addressee and forward it to the ISP,
and keep a centralized archive of all mail generated by me, from
whichever client.  (Initially it will probably be easier to send mail
directly from each client to the ISP -- when I learn more I'll route it
through the Linux box.)

I think that this can be done, and I think one way of doing it is to set
up a chain of three programs, and I'm thinking of investigating
fetchmail (to get mail from the ISP), procmail (to filter the mail and
distribute it to separate files/directories for each addressee of the
LAN), and postfix (to distribute the mail to other machines on the LAN,
and maybe also to collect the outgoing mail from those machines and
forward it to the ISP).  This is in addition to mail clients on the
Linux mail server and on the client machines.

My vague understanding of some of this is that procmail works with
something that might be called mail spools which are either files or
directories(?).  So procmail could look to one file or directory for all
incoming mail, then sort it to other mail spools for each addressee. 
"Traditional" "old style" mail clients (like Mutt), none of which I've
ever used, can read mail from these mail spools directly (as opposed to
using SMTP to read mail from an SMTP server).  In essence, I think my
inbox in Netscape is or can be treated as a mail spool.  And, I guess
all of the individual folders (that I've created for specific topics) in
Netscape can be considered mail spools, and procmail can be configured
to automatically sort mail into these separate folders based on criteria
that I can establish (like subject, from, ???).  On the mail server, I
guess if I put mail in the outbox mail spool, procmail (or postfix?) can
be configured to recognize that outgoing mail is present and attempt to
send it (and, if it's clever, it might check to see if I'm connected to
the Internet first.   (This could be a little tricky, since the dial up
connection is on a separate box, and likely to stay there for the
forseeable future.)

For clients on the other machines I guess they'd need to get their
incoming mail from the Linux mail server using SMTP, and I'm thinking
that postfix can provide/perform this.

So, is my vague understanding anywhere close to correct?  (That, for
example, I need three programs something like this to do what I'm
describing?)

If not, tell me more.

If so, it looks like I need to set up a bunch of files / directories to
serve as "mail spools", maybe as follows: 
- one for the incoming mail from the ISP
- one each for incoming mail to each addressee or client machine
- several as the inbox, outbox, and folders by subject for the mail
client on the mail server
- (maybe) one for outgoing mail from all addressees or client machines

Make sense?

Advice on naming (and locating) them?

Next steps:

I'm assuming that Mandrake 7.2 comes with fetchmail, procmail, and
postfix, and I probably already installed them, but am not running
them.  It should be simple to install them if necessary (even if I have
to download an RPM) and enable them so they start automatically at
bootup.

However, I will have to configure them.  At first I'd like to make a
very simple configuration -- just have fetchmail pass incoming mail to
the mail spool for procmail and let it pass mail to the mail spools for
the mail clients (all incoming mail to all clients), then let postfix
send (or make available) the mail for each client.

I suppose I'll have to do a lot more reading before then.  I have found
some resources on the web -- some that look useful (and a lot that just
drone on and on forever -- I hope that's not what I'm doing).

Anyway, any help will be appreciated, and if this is a useful topic for
a future presentation at a meeting, that would be great.  (Right now, I
cannot volunteer to do this -- maybe after I get it working.)

This is not the highest priority on my list of things to do, but if you
ask me today, it's something I'd like to start on within the next month
and finish in a reasonable amount of time after that.

Aside:  I have a wiki (TWiki) partially working on SourceForge and
intend to document what I learn on the wiki.  Partial means (1) I'm not
announcing / making it available to the general public yet, (2) I'm
still playing with the templates, the index page, setting up the webs,
etc. -- in other words it's not ready for the general public, and (3) I
have to resolve a problem with editing -- I can upload wiki pages and
make them displayable but I can't make them editable.  

Problem with editing:  This problem relates to owner and permissions --
many of the files and directories must be owned by user "nobody" to work
correctly, but I don't have root privileges on SourceForge.  AFAICT,
without root privileges, there is no way for _me_ to change the files to
be owned by user nobody.  

(I've tried many things -- cp, cp -p, or tar, gzip or zipping files with
the proper owner/group/permissions.   But, when I invoke any of those
commands under my SourceForge userid, the copied files end up being
owned by my user (and group) ID on SourceForge.  If I can't overcome the
problem, I will have to have SourceForge change the owner and
permissions, and repeat it every time I upload a new file.  One way is
by submitting support requests as required.  I've written to them about
this, suggesting that they give me su or sudo privileges, and also
asking about alternatives, like maybe writing a script that they can
execute as root at my request (or as a cron job), or maybe a script that
I can invoke but which runs as root (would that be suid or setuid? --
but I guess that normally works only to reduce privileges -- i.e., if I
am root I can setuid in a script to have lesser privileges, but if I am
a user with less than root privileges I cannot run a script with setuid
to root), or ??? -- any other suggestions??)

> 
> Since this is our one year annivesary month, perhaps we should have a
> small celebration at some local pub sometime this month?

If somebody picks a time and a spot, I'll be there unless I have a major
conflict.

Randy Kramer