FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 12-30-2007, 09:57 PM
David Fletcher
 
Default procmail - can it send a notification email?

The situation:-

I've got a machine currently running Dapper server. This is my first attempt
at a mail server but it's almost doing everything I initially want, which
is:-
to use fetchmail to collect email for everybody in the house from a single POP
account
sort it into the correct mbox files using procmail
provide POP service for collecting mail using Dovecot

One of the people here gets email but only occasionally, and does not bother
to log in every day (or every week!) so will not know if there is mail
waiting for collection. So, what I want to do is get procmail to send a
notification email to me so that I can tell her that she has mail. I can get
it to carbon copy the mail to my mbox - that's no problem - it's clearly
documented and simple to do, but I don't feel that making the system copy her
mail to my account is the proper way to do it.

What I have had a play with this afternoon is a command line package called
sendEmail which does exactly what it says on the tin. Using the command

sendEmail -f me@example.com -t you@example.com -u "Notification" -m "Your wife
has new email" -s auth.smtp.example.com -xu userid -xp password

from bash on the server "just works" and sends the email to me via my service
provider. What I want to do if possible is work this command into a
procmailrc recipe so that procmail notifies me that she has email, without
saying what the email is or where it's from. That's her business.

What I have at the moment is this:-

:0
* ^To.*wife@
{
:0:
wife

:0 A
(sendEmail
-f procmail@example.com
-t me@example.com
-u "Notification"
-m "Your wife has new email"
-s auth.smtp.example.com
-xu userid -xp password)
}

which is made up from what I've found in the man pages and google. The message
gets delivered to the mail box, but I can't get it to send the notification.
Am I taking a reasonable approach or is this completely wrong?

Any help appreciated, thanks.

Dave


--
Registered Linux user number 393408

I use and recommend the email service at 1 & 1
For domain registration, email and web hosting please visit:
http://oneandone.co.uk/xml/init?k_id=6389763

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 12-31-2007, 05:15 PM
Derek Broughton
 
Default procmail - can it send a notification email?

David Fletcher wrote:

> One of the people here gets email but only occasionally, and does not
> bother to log in every day (or every week!) so will not know if there is
> mail waiting for collection. So, what I want to do is get procmail to send
> a notification email to me so that I can tell her that she has mail.

It sounds like you're doing this the hard way (and I don't know procmail to
know if what you want is possible).

How is the mail stored? If in Maildirs, you could just have a cron job that
checks for existence of any file in the /new subdirectory.

> sendEmail -f me@example.com -t you@example.com -u "Notification" -m "Your
> wife has new email" -s auth.smtp.example.com -xu userid -xp password

mailx is pretty much the same.

--
derek


--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-02-2008, 09:08 AM
Christian Schult
 
Default procmail - can it send a notification email?

Hello David,

David Fletcher wrote:

[...]
> >from bash on the server "just works" and sends the email to me via my service
> provider. What I want to do if possible is work this command into a
> procmailrc recipe so that procmail notifies me that she has email, without
> saying what the email is or where it's from. That's her business.
>
> What I have at the moment is this:-
>
> :0
> * ^To.*wife@
> {
> :0:
> wife
>
> :0 A
> (sendEmail
> -f procmail@example.com
> -t me@example.com
> -u "Notification"
> -m "Your wife has new email"
> -s auth.smtp.example.com
> -xu userid -xp password)
> }
>
> which is made up from what I've found in the man pages and google. The message
> gets delivered to the mail box, but I can't get it to send the notification.
> Am I taking a reasonable approach or is this completely wrong?

Looks good to me, maybe the round brackets aren't needed. What's in
the logfiles? Turn logging on in .procmailrc:

PMDIR="$HOME/.procmail # where your procmail files reside
LOGFILE=$PMDIR/log
LOGABSTRACT=all
VERBOSE=on

Also look into the log of sendEmail to see if the mail was even
generated and track the way the mail took.

Christian


--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org