plz help: fetchmail + procmail + Mail Notification

plz help: fetchmail + procmail + Mail Notification

am 18.04.2006 17:00:04 von Hermann Schneider

Hi folks

I have the following problem: after I run fetchmail to get my mails from 2
servers, and procmail them in ~/Mail/inbox and some other mails in
~/Mail/user/group1 and so on. Now cron run every hour and run fetchmail.
And now I want to be notifiet throuh an E-Mail icon(Im useing Brezzy and
Gnome 2.12). But my problem is that for e.g "Mail - Notification" notifie
me only if mails has been arrived in ~/Mail/inbox and if they get to
~/Mail/user/group1 i dont get a nice icon. Can some one explain, how I
have to configure my "Mail - Notification" programm or how in can get my
nice notifications, when mail also arrive in an other Place then the "main
mail place off Sylpheed-Claws.

plz help


Hermann

Re: plz help: fetchmail + procmail + Mail Notification

am 19.04.2006 00:27:38 von Garen Erdoisa

Hermann Schneider wrote:
> Hi folks
>
> I have the following problem: after I run fetchmail to get my mails from 2
> servers, and procmail them in ~/Mail/inbox and some other mails in
> ~/Mail/user/group1 and so on. Now cron run every hour and run fetchmail.
> And now I want to be notifiet throuh an E-Mail icon(Im useing Brezzy and
> Gnome 2.12). But my problem is that for e.g "Mail - Notification" notifie
> me only if mails has been arrived in ~/Mail/inbox and if they get to
> ~/Mail/user/group1 i dont get a nice icon. Can some one explain, how I
> have to configure my "Mail - Notification" programm or how in can get my
> nice notifications, when mail also arrive in an other Place then the "main
> mail place off Sylpheed-Claws.
>
> plz help
>
>
> Hermann

Please, no one here can read minds. It would help a lot for questions
like this if you posted the relevant sections of code that you want
critiqued by others.

Please when you do so make sure to munge personal information first
and replace any domain names with example.com or example.net as appropriate.

Here is a simple procmail example that should accomplish your goal,
with minor modifications as appropriate, if I'm interpreting your
question accurately.

-=-=-=-

# Define a procmail log file.
LOGFILE=${HOME}/procmail.log

# Define an email address to send notifications
NOTIFYEMAIL=somenotificationmail@example.com

# Define a new line character for use in LOG lines
NL="
"

# Group 1 delivery
# Check the mail headers for a listmail signature.
:0
* H ?? ^X-Listmail: some example listmail pattern
{
# Note the backtics that launch an embedded shell script here
LOG=`echo "Mail has arrived for group1" |mail -s "Mail notification -
group 1" ${NOTIFYEMAIL}`

# Add a procmail log entry noting the event.
LOG="[$$]$_: Group1 notification email sent${NL}"

# Deliver the email to group1 using an implied lock file
:0:
${HOME}/Mail/user/group1
}

# default delivery
:0
{
# Use an embedded shell script to send a mail notification
LOG=`echo "Mail has arrived in inbox" |mail -s "Mail notification -
inbox" ${NOTIFYEMAIL}`

# Add a procmail log entry noting the event.
LOG="[$$]$_: Inbox notification email sent.${NL}"

# Deliver the email to inbox using an implied lock file
:0:
${HOME}/Mail/inbox
}

Hope this helps.
--
Garen

Re: plz help: fetchmail + procmail + Mail Notification

am 19.04.2006 14:10:17 von Hermann Schneider

On Tue, 18 Apr 2006 16:27:38 -0600, Garen Erdoisa wrote:

> Hermann Schneider wrote:
>> Hi folks
>>
>> I have the following problem: after I run fetchmail to get my mails from 2
>> servers, and procmail them in ~/Mail/inbox and some other mails in
>> ~/Mail/user/group1 and so on. Now cron run every hour and run fetchmail.
>> And now I want to be notifiet throuh an E-Mail icon(Im useing Brezzy and
>> Gnome 2.12). But my problem is that for e.g "Mail - Notification" notifie
>> me only if mails has been arrived in ~/Mail/inbox and if they get to
>> ~/Mail/user/group1 i dont get a nice icon. Can some one explain, how I
>> have to configure my "Mail - Notification" programm or how in can get my
>> nice notifications, when mail also arrive in an other Place then the "main
>> mail place off Sylpheed-Claws.
>>
>> plz help
>>
>>
>> Hermann
>
> Please, no one here can read minds. It would help a lot for questions
> like this if you posted the relevant sections of code that you want
> critiqued by others.
>
> Please when you do so make sure to munge personal information first
> and replace any domain names with example.com or example.net as appropriate.
>
> Here is a simple procmail example that should accomplish your goal,
> with minor modifications as appropriate, if I'm interpreting your
> question accurately.
>
> -=-=-=-
>
> # Define a procmail log file.
> LOGFILE=${HOME}/procmail.log
>
> # Define an email address to send notifications
> NOTIFYEMAIL=somenotificationmail@example.com
>
> # Define a new line character for use in LOG lines
> NL="
> "
>
> # Group 1 delivery
> # Check the mail headers for a listmail signature.
> :0
> * H ?? ^X-Listmail: some example listmail pattern
> {
> # Note the backtics that launch an embedded shell script here
> LOG=`echo "Mail has arrived for group1" |mail -s "Mail notification -
> group 1" ${NOTIFYEMAIL}`
>
> # Add a procmail log entry noting the event.
> LOG="[$$]$_: Group1 notification email sent${NL}"
>
> # Deliver the email to group1 using an implied lock file
> :0:
> ${HOME}/Mail/user/group1
> }
>
> # default delivery
> :0
> {
> # Use an embedded shell script to send a mail notification
> LOG=`echo "Mail has arrived in inbox" |mail -s "Mail notification -
> inbox" ${NOTIFYEMAIL}`
>
> # Add a procmail log entry noting the event.
> LOG="[$$]$_: Inbox notification email sent.${NL}"
>
> # Deliver the email to inbox using an implied lock file
> :0:
> ${HOME}/Mail/inbox
> }
>
> Hope this helps.

Hello

first thanks for your answer. But u didnt understnad me, its not a
problem with fetchmail or procmail as itself, because i correctly fetch my
mail, and forward(procmail) them to my place like ~/Mail/inbox with my
conditions (let look spamassassin over them) and so on. I correctly
get there. But now I need a programm, like "Mail - Notification" for
Gnome that does create a mail icon if mail arrive in my special folders.
Not only like some programs do that, which only look if the mail has been
arrived in one folder.

So i dont need to post my procmailrc or my fetchmail rc, because its about
mail notifcation and not filtering.

I need a nice Gnome Mail Notification prog.

Hermann

Re: plz help: fetchmail + procmail + Mail Notification

am 20.04.2006 05:29:20 von Garen Erdoisa

Hermann Schneider wrote:
> On Tue, 18 Apr 2006 16:27:38 -0600, Garen Erdoisa wrote:
>
>> Hermann Schneider wrote:
>>> Hi folks
>>>[snip]
>[snip]
> first thanks for your answer. But u didnt understnad me, its not a
> problem with fetchmail or procmail as itself, because i correctly fetch my
> mail, and forward(procmail) them to my place like ~/Mail/inbox with my
> conditions (let look spamassassin over them) and so on. I correctly
> get there. But now I need a programm, like "Mail - Notification" for
> Gnome that does create a mail icon if mail arrive in my special folders.
> Not only like some programs do that, which only look if the mail has been
> arrived in one folder.
>
> So i dont need to post my procmailrc or my fetchmail rc, because its about
> mail notifcation and not filtering.
>
> I need a nice Gnome Mail Notification prog.

Ok, now I understand your question better. Thanks for elaborating.

Unfortunately, I don't use the Gnome desktop very much, so don't have an
answer for you on this one. I'd have to research it myself, which I may
just do if I get really really bored. :)

Garen