Fetchmail + Email Rules

Fetchmail + Email Rules

Post by VasantKumar Nai » Wed, 26 Feb 2003 15:20:30



Hi,

is there anyway i can implement rules in my fetchmail, like if the
subject contains vasant, then redirect that message to
/var/spool/mail/vasant.

my problem is, fetchmail polls 3 of our mail servers and distributes
all the messages thus fetched to all the users, whereas i only want
the users to be able to get those messages where their names are in
the subject line or To, etc. I can implement in in the users
individual outlook express, but then the remaining messages which they
receive tend to remain on the server and clog up the space.

i have a .fetchmailrc file containing the following:

poll pop.test.com proto pop3
     user 'test' there with password '' is some_aliase here
     options fetchall

 -- the same for the remaining 2 servers --

i am aware of this option:

       properties               String value is ignored by  fetch-
                                mail  (may  be  used  by extension
                                scripts)
but then i want to say " if <vasant> is found in the subject then
fetch", is this possible, do i have to use any 3rd party software for
this.

thanks,

Vasant

 
 
 

Fetchmail + Email Rules

Post by filip beije » Wed, 26 Feb 2003 16:11:10



> Hi,

> is there anyway i can implement rules in my fetchmail, like if the
> subject contains vasant, then redirect that message to
> /var/spool/mail/vasant.

> my problem is, fetchmail polls 3 of our mail servers and distributes
> all the messages thus fetched to all the users, whereas i only want
> the users to be able to get those messages where their names are in
> the subject line or To, etc. I can implement in in the users
> individual outlook express, but then the remaining messages which they
> receive tend to remain on the server and clog up the space.

> i have a .fetchmailrc file containing the following:

> poll pop.test.com proto pop3
>      user 'test' there with password '' is some_aliase here
>      options fetchall

>  -- the same for the remaining 2 servers --

> i am aware of this option:

>        properties               String value is ignored by  fetch-
>                                 mail  (may  be  used  by extension
>                                 scripts)
> but then i want to say " if <vasant> is found in the subject then
> fetch", is this possible, do i have to use any 3rd party software for
> this.

> thanks,

> Vasant

Yes there  is , use procmail. See man procmailex for some example how to
implement that.

Filip

 
 
 

Fetchmail + Email Rules

Post by VasantKumar Nai » Wed, 26 Feb 2003 21:09:27


yah filip,

procmail is one, i just searched google and came up with MailF by
steines. I presume my problem is "filtering multi-mail-drop", well
MailF is a mail filter and also uses my Virus Scan to scan all
incoming messages.

http://www.steines.com/mailf/

I was just reading up on that when i read this message, now i am a bit
confused on what to use? procmail is already installed on my system,
where this MailF needs compilation, etc... which I have never
attempted before. What do you advise?

Can I use procmail for filtering and MailF for Virus Scanning or are
both these present in procmail? or should I stick to just one of these
programs?

forgive my for not reading the procmail documentation bef. asking you
these questions, i intend to do so now :)

thanks,
vasant



> > Hi,

> > is there anyway i can implement rules in my fetchmail, like if the
> > subject contains vasant, then redirect that message to
> > /var/spool/mail/vasant.

> > my problem is, fetchmail polls 3 of our mail servers and distributes
> > all the messages thus fetched to all the users, whereas i only want
> > the users to be able to get those messages where their names are in
> > the subject line or To, etc. I can implement in in the users
> > individual outlook express, but then the remaining messages which they
> > receive tend to remain on the server and clog up the space.

> > i have a .fetchmailrc file containing the following:

> > poll pop.test.com proto pop3
> >      user 'test' there with password '' is some_aliase here
> >      options fetchall

> >  -- the same for the remaining 2 servers --

> > i am aware of this option:

> >        properties               String value is ignored by  fetch-
> >                                 mail  (may  be  used  by extension
> >                                 scripts)
> > but then i want to say " if <vasant> is found in the subject then
> > fetch", is this possible, do i have to use any 3rd party software for
> > this.

> > thanks,

> > Vasant

> Yes there  is , use procmail. See man procmailex for some example how to
> implement that.

> Filip

 
 
 

Fetchmail + Email Rules

Post by filip beije » Wed, 26 Feb 2003 21:15:19



> yah filip,

> procmail is one, i just searched google and came up with MailF by
> steines. I presume my problem is "filtering multi-mail-drop", well
> MailF is a mail filter and also uses my Virus Scan to scan all
> incoming messages.

> http://www.steines.com/mailf/

> I was just reading up on that when i read this message, now i am a bit
> confused on what to use? procmail is already installed on my system,
> where this MailF needs compilation, etc... which I have never
> attempted before. What do you advise?

> Can I use procmail for filtering and MailF for Virus Scanning or are
> both these present in procmail? or should I stick to just one of these
> programs?

> forgive my for not reading the procmail documentation bef. asking you
> these questions, i intend to do so now :)

> thanks,
> vasant



>>>Hi,

>>>is there anyway i can implement rules in my fetchmail, like if the
>>>subject contains vasant, then redirect that message to
>>>/var/spool/mail/vasant.

>>>my problem is, fetchmail polls 3 of our mail servers and distributes
>>>all the messages thus fetched to all the users, whereas i only want
>>>the users to be able to get those messages where their names are in
>>>the subject line or To, etc. I can implement in in the users
>>>individual outlook express, but then the remaining messages which they
>>>receive tend to remain on the server and clog up the space.

>>>i have a .fetchmailrc file containing the following:

>>>poll pop.test.com proto pop3
>>>     user 'test' there with password '' is some_aliase here
>>>     options fetchall

>>> -- the same for the remaining 2 servers --

>>>i am aware of this option:

>>>       properties               String value is ignored by  fetch-
>>>                                mail  (may  be  used  by extension
>>>                                scripts)
>>>but then i want to say " if <vasant> is found in the subject then
>>>fetch", is this possible, do i have to use any 3rd party software for
>>>this.

>>>thanks,

>>>Vasant

>>Yes there  is , use procmail. See man procmailex for some example how to
>>implement that.

>>Filip

guess, you have to read some documentation now :)

Fetchmail and procmail can do the delivering part of the job, they both
are installed and easy to use.

Mailf can scan for virusses with an external virusscanner, but you have
to compile it first and thats up to you. And install the virus scanner.

I'd go for the first option, using procmail, read the doc's (it really
helps a lot). When you got that working you can always extend the
functionality by adding virusscan .

Filip

 
 
 

1. Using rules in Fetchmail/RH 7.2

I am using Fetchmail to retrieve my mail from multiple POP3 servers
and i'd like to setup some rule that drops messages matching a certain
criteria into subfolders.  Is this possible with Fetchmail?  If not,
is there another shell program that will do this?

Basically, I have an account which gets WAY too much spam I need to
check, but I want these messages to get dumped into a different folder
then my normal account.  Also, messages with no recipient (generally
spam) I want to forward into a junk folder.

If anyone can lead me into the right direction, I'd appriciate it.
Thanks,

Sam

2. XTerminal logout errors

3. fetchmail-problem: fetch hangs with first e-mail to be retrieved...

4. Stuck CDrom drive

5. Fetchmail only way to get email into computer?

6. Example of DNS setup

7. e-mail - fetchmail

8. ntfs drive access: compile

9. Fetchmail: Email TO diff users distribute among local boxes?

10. How to get fetchmail to drop e-mail into my IMAP account on localhost.

11. fetchmail & multiple email addresses

12. newbie email-Q, please help: Linux,POP3,fetchmail,sendmail,hostname,FQDN?????

13. fetchmail (?): OE cancelld email-attachements.