[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading mails: Procmail, Fetchmail, and what?

From: Richard Riley
Subject: Re: Reading mails: Procmail, Fetchmail, and what?
Date: Tue, 04 Aug 2009 14:23:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Merciadri Luca <> writes:

> Hello,
> I have Procmail and Fetchmail both installed on my computer. I have
> configured an .authinfo file, to be able to read my mails using
> However, it does not work.
> There is something that I do not understand:
> 1. Do I need to use Procmail or Fetchmail to fetch my mails, using

Your mails do not come from here. News (usenet) comes from here. I assume
you mean things like your googlemail (or whatever you use for email)  is
what you want? As a suggestion I recommend not using your ISP email
account since you will change isp in coming years. Get a good
independent email account. I like gmail - fast, access via pop3 and imap
and lots of storage.

> 2. Is it really possible to use to fetch my mails? If
> so, how?


> 3. I have configured a .procmailrc (for Procmail), but it seems to be
> unuseful, as I already have an .authinfo file for Gnus;

Procmail *filters* your email after fetchmail fetches it. This has
nothing to do with .authinfo.

> Any help would me much appreciated.

I personally use getmail. I have a script which processes all getmail rc
files in a certain directory so: (~/bin/getmails)

| #!/bin/bash
| host=$(hostname)
| mailserver=""
| if [ $host != "" ]
| then
|     echo "Doing remote call to mailserver $mailserver"
|     ssh $mailserver /home/shamrock/bin/getmails
|     exit
| fi
| cmd="getmail -d -q"
| for file in ~/.getmail/*.rc; do
|     cmd="$cmd --rcfile $file "
| done
| $cmd

an rc file on the remote system looks like this:

here we see ~/.getmails/rileyrgdev.rc getting my pop3 emal and calling
procmail ...

| [retriever]
| type = SimplePOP3SSLRetriever
| server =
| username =
| port = 995
| password = **********************
| [destination]
| type = MDA_external
| path = /usr/bin/procmail

Note it telling getmail to invoke procmail. procmail then filters the
mail and places it where the procmail config tells it. In this case the
rule in the .procmailrc is:

| :0
| * ^(To|Delivered-To):.*rileyrgdev.*
| $MAILDIR/.DevelopmentEmail/

(The .DevelopmentEmail is a MAILDIR for Dovecot which is an IMAP
server. I then connect to my own IMAP server to collect all my email in
my mail program).

Its a lot to learn at the start but a valuable process!

Oh, and "getmails" is run via cron on my mailserver or I can invoke it
manually from my local machine where it ssh's into my mail server to run

Have fun!

> --
> Merciadri Luca
> See
> I use PGP. If there is an incompatibility problem with your mail
> client, please contact me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]