🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: uk.comp.os.linux
4 messages
4 total messages Started by Simon Thompson Tue, 01 Jun 1999 00:00
Selectively downloading email based on headers?
#138
Author: Simon Thompson
Date: Tue, 01 Jun 1999 00:00
21 lines
1479 bytes
Does anyone know how/if it is possible to only download mail based on
a header such as the From: field?
The ideal solution is having something like fetchmail dialling in
periodically and downloading all mail for simon@tyrant.demon.co.uk if
it is from the various mailing lists I am subscribed to. This way I
can check my mail when I am at uni or wherever and don't have to
browse through all the list mail which I don't want to see till I get
home.
My .fetchmailrc, via the man page, so far is

poll pop3.demon.co.uk protocol SDPS username simon@tyrant password xxx

Any ideas?

Thanks 

Simon
-- 
Simon Thompson           simon@tyrant.demon.co.uk
Computer Science Student
UMIST
Re: Selectively downloading email based on headers?
#139
Author: David Hallowell
Date: Tue, 01 Jun 1999 00:00
25 lines
1726 bytes
Simon Thompson wrote:
> 
> Does anyone know how/if it is possible to only download mail based on
> a header such as the From: field?
>
> poll pop3.demon.co.uk protocol SDPS username simon@tyrant password xxx
> 
> Any ideas?
You'll need to use procmail (in addition to fetchmail and sendmail which
you already have) to filter the mail on the conditions that you specify.
See the procmail man page for more information on this.

To dial in periorically just use cron to schedule a job to dial in (say)
every hour to connect to the internet and run fetchmail. Then schedule a
job about 5 minutes later to disconnect you from the internet (Demon
disconnects you automatically if you are idle for too long but it's best
to disconnect explicitly just in case they suddenly change their policy
on this - or someone starts pinging you!). For more information on cron
see the crontab man page.


-- 
David Hallowell - <david.hallowell@ukuug.org>
UKUUG Linux '99 Conference 25-26th June 1999
Info and bookings: http://www.linux.ukuug.org/linux99/
Re: Selectively downloading email based on headers?
#140
Author: Simon Child
Date: Tue, 01 Jun 1999 00:00
24 lines
1726 bytes
On Tue, 01 Jun 1999 00:20:18 GMT, Simon Thompson <simon@tyrant.demon.co.uk> 
wrote:
>Does anyone know how/if it is possible to only download mail based on
>a header such as the From: field?
>The ideal solution is having something like fetchmail dialling in
>periodically and downloading all mail for simon@tyrant.demon.co.uk if
>it is from the various mailing lists I am subscribed to. This way I
>can check my mail when I am at uni or wherever and don't have to
>browse through all the list mail which I don't want to see till I get
>home.

Lateral thinking.

As you have a demon account, you can have a different email address for
each mailing list. e.g. resubscribe to your lists as simona for list to 
do with aardvarks, simonb for list to do with books... etc

Then just get fetchmail to fetch the mail for simon only.


-- 
Simon Child       Spam trap in Email Address.
Send email to simon.at.child.demon.co.uk  (Replace .at.)
Send spam to postmaster@127.0.0.1
Re: Selectively downloading email based on headers?
#141
Author: Simon Thompson
Date: Wed, 02 Jun 1999 00:00
28 lines
1942 bytes
On Tue, 01 Jun 1999 17:15:50 +0100, David Hallowell
<david.hallowell@ukuug.org> wrote:

>Simon Thompson wrote:
>> 
>> Does anyone know how/if it is possible to only download mail based on
>> a header such as the From: field?
>>
>> poll pop3.demon.co.uk protocol SDPS username simon@tyrant password xxx
>> 
>> Any ideas?
>You'll need to use procmail (in addition to fetchmail and sendmail which
>you already have) to filter the mail on the conditions that you specify.
>See the procmail man page for more information on this.
It looks like I will be able to filter it correctly with procmail, but
how do I run procmail in conjunction with fetchmail to download only
the headers specified by the procmail recipe? I thought that this
functionality would have to be in fetchmail itself, otherwise it will
just download everything for simon@tyrant before procmail gets a look
at it.

>To dial in periorically just use cron to schedule a job to dial in (say)
>every hour to connect to the internet and run fetchmail. 
That's what I was thinking, thanks.

Regards

Simon
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads