Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-26 Thread Jason Van Cleve
In my continuing effort to belabor this subject, I have another
question:  why is fetchmail too stupid to remove messages from a POP3
server only after they've gotten old?  The keep option leaves them
there forever (which will eventually exhaust my server resources); and
no keep always yanks them immediately.  There may be reasons for such
inflexibility, but it seems like a failing to me, given that most decent
MUAs offer this feature.  I found a kludge where I could let them
accumulate usually and then delete them all at some regular interval
(via cron):  but it seems if fetchmail is supposed to relieve MUAs of
their MRA duties, it should do at least as good a job of performing
them.

Sometimes I like to read my emails on my other 'puter, so I like to
leave them around for a week or so before removing them from the server.
 Now I can't, and that makes me sad.  Can getmail do this, I wonder?

--Jason V. C.

--
I drank what? -- Socrates
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug


Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-23 Thread Jason Van Cleve
Quoth Cory Petkovsek, on Thu, 22 Jul 2004 16:54:20 -0700:

  Am I only dreaming?
 No, set it up as I described.  It will run without maintenance and
 you'll learn something too.
 
 
   .===.
   v  ||
 POP3 --- fetchmail --- postfix --- procmail --- maildir
 inetlocal/root local/root   local/user~/maildir

Okay, but wait.  A few crevices remain in my brain.  How does postfix
connect to procmail?  I actually run postfix on my server, where it is a
system daemon serving as an SMTP as well as a POP3 service.  In your
system, then, would I simply configure my MUA to make its POP requests
to the local postfix daemon?  And what does postfix do to invoke
procmail, or is that the MUA's responsibility?  How would I integrate
procmail?

At any rate, installing postfix wasn't that easy (better than sendmail,
I know, but still interesting).  It's just not something I want have
to do on my workstations.

Isn't there a way to do this without the need for a local MTA?  It just
seems like an unnecessary middleman.  Sylpheed tends to hog my resources
when it's busy retrieving mail, and I want to use procmail for
filtering.  So what I need is something that will run as a daemon, grab
my mail from the remote POP server, and hand it over to procmail for
filtering and distribution.  I thought that's what fetchmail did, but
apparently not:  so I'm not much closer to my objective.  (Sigh!)

How 'bout this:  can procmail do what I want all by itself?  Can it
access a POP server in daemon mode?  (I suppose now I AM dreaming.) 
Alternately, is there any SINGLE daemon application that can retrieve
mail and give it to procmail, as opposed to fetchmail and sendmail
together?

. . . Sheesh, this stuff really is contorted, or I am dull.  I quote the
fetchmail man page, fetchmail is a mail-retrieval and forwarding
utility; it fetches mail from remote mailservers and forwards it to your
local (client) machine's delivery system.  You can then handle the
retrieved mail using normal mail user agents such as mutt(1), elm(1) or
Mail(1).  Great, but normal mail user agents can also retrieve from
the remote server, directly:  so what the heck does fetchmail buy me?

Ha!  Riddle me that.

--Jason V. C.

--
The day Microsoft makes something that doesn't suck is probably the day
they start making vacuum cleaners. --Ernst Jan Plugge
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug


Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-23 Thread Jason Van Cleve
Quoth Bob Miller, on Thu, 22 Jul 2004 17:56:19 -0700:

 You can configure fetchmail to poll a pop server and write the mail to
 one of several places.  One of those places is into procmail, using
 
   ... mda /usr/bin/procmail -d %T ...
 
 in your .fetchmailrc .

Voila!  That's what I wanted to know.

 You'd then have to set up your .procmailrc to write messages to your
 mailbox, whatever/wherever it is.

From your explanation, I'm using the mh format.

 I think they're the same.  Read the fetchmail man page (RTFM (-: ).

Right.  I just wanted to make sure it's the right tool for the job,
first.  Many thanks for the knowledge, Mr. Miller.

--Jason Van Cleve

--
Tarred for her pleasure, gzipped for yours.
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug


Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-23 Thread Ralph Zeller
 There's a ton of Web pages on installing/configuring these app's for
 specific purposes, but none explains the basic relationships between
 them, which I consider preliminary knowledge.

Jason,

You have A LOT of questions, and you might find the answers faster and 
easier yourself by looking at this website:

http://mutt.blackfish.org.uk/storage/

Although it's oriented toward the Mutt MUA, this website provides a
pretty good overview regarding how email works, and what options you
have along the way to setting up an email system.  Mutt can easily be
used in conjuction with Mozilla-Mail or Evolution, or other MUA's, so
don't worry about learning Mutt if you don't want to.  You could likely
get people to offer their opinions and answers to specific questions on
this list, but you might as well get a broader perspective by studying
the basics yourself first.

I hope this helps!

Ralph
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug


Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-23 Thread Jason Van Cleve
Quoth Ralph Zeller, on Fri, 23 Jul 2004 10:22:12 -0700:

 http://mutt.blackfish.org.uk/storage/

This document is illustrative.  I've learned from it, for one thing,
that the system spool file can be read directly as an inbox folder by
MUAs.  That blew my mind, since I had presumed the spool file is the
domain of the MTA alone.  (Postfix, I have noticed, will sometimes mv
that file and save an empty one in its place, temporarily; which seems
likely to trip up an MUA that happens to be reading it just then.)  But
this would obviate the need for a local POP server, which is good.

I'm also learning that, while the terms MUA, MDA, etc., are fairly
straightforward per se, their implementations don't always fit into any
one of those boxes.  It seems fetchmail and procmail, for example, are
not best thought of strictly as an MRA and an MDA, respectively, but
rather as general components in a mail delivery chain.  If fetchmail
can pass emails to procmail (bypassing the MTA), then its relation to
procmail is that of an MTA.

Sorry if I've been a trifle loquacious.  As an end user, I don't find
these email systems all that simple; and as a Web developer, I find them
significantly more difficult than Web server software.  But I'm
learning.

--Jason V. C.

--
I finally beat the Internet.  The end guy is hard.
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug


Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-23 Thread Rob Hudson
If you know Perl, this is a fun way to write your own fetchmail and mail
sort routines...
http://www.perl.com/pub/a/2001/07/17/mailfiltering.html

I had this running for a little while.  And it's nice to sort mail with
regular expressions in Perl.  :)

-Rob

On 20040723.1414, Jason Van Cleve said ...

 A propos,
 
 I've just read the getmail FAQ, which claims that fetchmail sucks.  It
 also says that, not only can getmail deliver directly to an MDA, it can
 even save to maildir or mboxrd files.  I'll want to use procmail, but
 this is the level of simplicity and directness I'm about.
 
 If anyone prefers fetchmail to getmail, please say why.
 
 Muchas thanks,
 
 --Jason V. C.
 
 --
 Jesus is coming!  Look busy.
 ___
 EUGLUG mailing list
 [EMAIL PROTECTED]
 http://www.euglug.org/mailman/listinfo/euglug
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug


Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-23 Thread Ralph Zeller
On 07/23/04 02pm, Jason Van Cleve wrote:
 If anyone prefers fetchmail to getmail, please say why.

Fetchmail is more time tested and proven?

quoting from getmail-4/CHANGELOG

Version 4.0.0a1
14 June 2004

  -first alpha release of getmail version 4

Changes since getmail version 3
---
-complete rewrite

/quote
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug


Re: [Eug-lug] Fetchmail, Procmail, And How It All Relates

2004-07-22 Thread Cory Petkovsek
On Thu, Jul 22, 2004 at 04:50:21PM -0700, Jason Van Cleve wrote:
 There's a ton of Web pages on installing/configuring these app's for
 specific purposes, but none explains the basic relationships between
 them, which I consider preliminary knowledge.
Just read the fetchmail man page.

 Question 1:  How do fetchmail, my local spool file, and procmail all
 relate?  
Fetchmail checks mail on the pop server like an MUA.  It then sends that mail
to your local MTA, like an MTA.  Your local mta then delivers to your local
spool file or mail dir.  If you've configured the local mta to deliver with
procmail, then it will check for a .procmailrc filter file before writing the
email to the final destination.

 Question 2:  Do I need sendmail?  I've heard it's only required if I
 want cron jobs and such to be able to email things.  Otherwise, I can
 just use my remote SMTP server, yes?
Depends on your mua.  With the above setup you'll need an MTA like sendmail or
postfix.  I recommend postfix.  Your distribution should make it easy to
install and configure.

 Question 3:  I have my saved mail in a strange place, not ~/.mail, or
 whatever the standard location is.  There's a directory for each mail
 folder, and each message is a separate file, which I believe is the mbox
 format, yes?  Will procmail conform to this?
Sounds like maildir, which procmail can write to.


 Question 4:  After installing fetchmail on Gentoo, I tried running the
 start script in /etc/init.d, but it couldn't find /etc/fetchmailrc. 
 What needs to go into that file?  
This is the system wide fetchmail configuration.  You have to make that
file according to the man page specifications.  Then it will run like a daemon,
if that's what you tell it to do.

 Will it effectively replace my
 ~/.fetchmailrc file, since I'm running it as root at bootup?  If yes,
 then I presume the contents would be the same as that dot file in my
 home.
Yes, pretty close if not identical. 

 
 Am I only dreaming?
No, set it up as I described.  It will run without maintenance and you'll learn
something too.


 Would that I could find a simple diagram of how these pieces fit
 together.  But perhaps one of you system admin types could wax eloquent
 on the matter.

  .===.
  v  ||
POP3 --- fetchmail --- postfix --- procmail --- maildir
inet  local/root local/root   local/user~/maildir

--- email flow
=== initiated by fetchmail

Cory

-- 
Cory Petkovsek   Adapting Information
Adaptable IT ConsultingTechnology to Your
(858) 705-1655   Business
[EMAIL PROTECTED]  www.AdaptableIT.com
___
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug