Olivier Nicole | 1 Sep 2009 03:25
Picon
Favicon

Re: How to simulate procmail

Hi,

> The user's .procmailrc is irrelevant, deposit the mail directly into  
> their maildir into a folder named SYSTEM_ALERT or something like that.
> 
> If they are overquota, they must be storing mail on your server, so  
> you don't care where they forward to.

If they have a procmail receipt to forward all their mail to, let's
say a gmail account, they will never read mail on my local server, so
they will never see the alert.

I need to deliver the alert in the mailbox they are actually reading.

Best regards,

olivier
Zhiliang Hu | 1 Sep 2009 15:38

Re: How to simulate procmail

On Tue, 1 Sep 2009, Olivier Nicole wrote:

> Date: Tue, 01 Sep 2009 08:25:35 +0700 (ICT)
> From: Olivier Nicole <Olivier.Nicole <at> cs.ait.ac.th>
> To: kremels <at> kreme.com
> Cc: procmail <at> lists.RWTH-Aachen.de
> Subject: Re: How to simulate procmail
> 
> Hi,
>
>> The user's .procmailrc is irrelevant, deposit the mail directly into
>> their maildir into a folder named SYSTEM_ALERT or something like that.
>>
>> If they are overquota, they must be storing mail on your server, so
>> you don't care where they forward to.
>
> If they have a procmail receipt to forward all their mail to, let's
> say a gmail account, they will never read mail on my local server, so
> they will never see the alert.
>
> I need to deliver the alert in the mailbox they are actually reading.

Put the message into the user's login prompt will be more practical.
A message to alert the user when the quota is 90% full would be more 
useful.

Automated emails, especially email from 'root', 'admin', could be easliy 
lost along with spam mails therefore would never reach the user.

Zhiliang
(Continue reading)

Davy Leon | 4 Sep 2009 18:46
Picon

executing a shell command

Hi folks
 
I have a question for you. I'm new to procmail, so sorry if it's a dumb one.
Can any of you help me to design a recipe?
 
The problem it's the following.
I'm the postmaster. My address is let's say john <at> example.com I want to send an email to an special account I just created wich address is special <at> example.com . The subject must be "messages" and get a reply with the result of cat/var/log/messages. If it's possible I will apreciate get it ina tar.gz file attached to the auto-reply.
 
So, if the message From is john <at> example.com and subject is exactly "messages" send me a reply with the file  /var/log/messages
 
Thanks in advance
 
David
 
 
 
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
Thomas Göbel | 4 Sep 2009 19:42
Picon
Gravatar

Re: executing a shell command

* <davy <at> scu.escambray.com.cu> [04.09.2009 18:17]:
> So, if the message From is john <at> example.com and subject is exactly
> "messages" send me a reply with the file  /var/log/messages

I am using msmtp as smtp client, so maybe you have to change msmtp to
i.e. sendmail.

:0 H
* ^FROM:.john <at> example.com
* ^Subject:.messages
| msmtp -a account "special <at> example.com" < /var/log/messages

--

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
Davy Leon | 4 Sep 2009 21:18
Picon

Re: executing a shell command

ok thanks I tried it and works fine using sendmail. The problem is this. I 
run the command from the cmmand lien fr testing purposes and get the 
following response

sendmail special <at> example.com < /var/log/messages

response:    /var/log/messages: Permission denied

David

----- Original Message ----- 
From: "Thomas Göbel" <goebel.thomas <at> gmx.net>
To: <procmail <at> lists.RWTH-Aachen.de>
Sent: Friday, September 04, 2009 12:42 PM
Subject: Re: executing a shell command

> ____________________________________________________________
> procmail mailing list   Procmail homepage: http://www.procmail.org/
> procmail <at> lists.RWTH-Aachen.de
> http://mailman.rwth-aachen.de/mailman/listinfo/procmail
> 
Michelle Konzack | 4 Sep 2009 20:18

Re: executing a shell command

Evening,

Am 2009-09-04 19:42:07, schrieb Thomas Göbel:
> * <davy <at> scu.escambray.com.cu> [04.09.2009 18:17]:
> > So, if the message From is john <at> example.com and subject is exactly
> > "messages" send me a reply with the file  /var/log/messages
> 
> I am using msmtp as smtp client, so maybe you have to change msmtp to
> i.e. sendmail.
> 
> :0 H

"H" ist the default and not nessesary

> * ^FROM:.john <at> example.com
> * ^Subject:.messages

Maybe you should use .*

> | msmtp -a account "special <at> example.com" < /var/log/messages

Hmmm, you are piping the whole message to msmtp?

I would do simpel:

:0
* ^FROM:.*john <at> example\.com
* ^Subject:.*messages
{
  DUMY_EXEC=`msmtp -a account "special <at> example.com" < /var/log/messages`
  :0
  .REQUEST/
}

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant

--

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>                 Michelle Konzack
<http://www.can4linux.org/>                   Apt. 917
<http://www.flexray4linux.org/>               50, rue de Soultz
Jabber linux4michelle <at> jabber.ccc.de           67100 Strabourg/France
IRC    #Debian (irc.icq.com)                  Tel. DE: +49 177 9351947
ICQ    #328449886                             Tel. FR: +33  6  61925193
Thomas Göbel | 4 Sep 2009 20:39
Picon
Gravatar

Re: Re: executing a shell command

* <davy <at> scu.escambray.com.cu> [04.09.2009 20:34]:
> ok thanks I tried it and works fine using sendmail. The problem is
> this. I run the command from the cmmand lien fr testing purposes and
> get the following response
> 
> sendmail special <at> example.com < /var/log/messages
> 
> response:    /var/log/messages: Permission denied

Simply change the group of /var/log to i.e. log and add your user to the
group log. Should solve it.
--

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
bernard.schoenacker | 4 Sep 2009 20:52
Picon
Favicon

Re: Re: executing a shell command

Selon Thomas Göbel <goebel.thomas <at> gmx.net>:

> * <davy <at> scu.escambray.com.cu> [04.09.2009 20:34]:
> > ok thanks I tried it and works fine using sendmail. The problem is
> > this. I run the command from the cmmand lien fr testing purposes and
> > get the following response
> >
> > sendmail special <at> example.com < /var/log/messages
> >
> > response:    /var/log/messages: Permission denied
>
> Simply change the group of /var/log to i.e. log and add your user to the
> group log. Should solve it.
> --
> ()  ascii ribbon campaign - against html e-mail
> /\  www.asciiribbon.org   - against proprietary attachments
>

hi,

	explain thats wy dont use logwatch ?

kindest regard

bernard

Re: executing a shell command

At 14:18 2009-09-04 -0500, Davy Leon wrote:
>sendmail special <at> example.com < /var/log/messages
>
>response:    /var/log/messages: Permission denied

You do understand the concept of file access permissions in Unix, right?

Does the user you're involking this as have permission to access the 
logfile in question?  Commonly, you'd need to be a member of the root or 
wheel group, but check the perms on the file.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.
Rob Henry | 8 Sep 2009 15:15

Help needed setting up simple procmail setup

Hi, I have installed postfix with procmail. Version is v3.15.2.  This is my /etc/procmailrc file: # Logging #LOGFILE=/var/log/procmail.log#VERBOSE=1#LOGABSTRACT=1 LOGFILE=$HOME/mail/procmail.logDROPPRIVS=yes:0fw| /usr/bin/spamassassin:0* ^X-Spam-Status: Yes$HOME/mail/Junk As well I have this .procmailrc file in my home/user/ directory # Comment:  Set VERBOSE=on in next line when debugging.PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.SHELL=/bin/shVERBOSE=on     # Replace "mail" with the name of your mail directory.     # If you use Pine, your mail directory is called mail.     # This directory must exist before you start using procmail.MAILDIR=$HOME/mail/#DEFAULT=$MAILDIR     # Directory for storing procmail log and rc filesPMDIR=$HOME/Procmail/LOGFILE=$HOME/log# Next line for testing.  Add # at beginning when not needed.     #INCLUDERC=$PMDIR/rc.testing      # To sort mailing list mail to a folder, remove # from next line.     #INCLUDERC=$PMDIR/rc.maillists      # To send vacation message, remove # from next INCLUDERC line.     # In most cases, next line should be last in this file.INCLUDERC=$HOME/rc.vacation My problem is that procmail does not seem to log, or process any files. On some occasions I will get an entry in my maillog file that says. Sep  2 13:29:42 linux procmail[3646]: Error while writing to "/home/rjh/log" Or other similar errors. I have searched the web and have changed all permissions on all files to what is suggested but still I just can seem to get it to work. I know I’m missing something stupid. Can anyone offer some suggestions. Centos 5.3

Linux 2.6.18-92.1.22.el5 on x86_64

 

Rob

 

636OQ33!P4901 <at> 8

 

Up To Date Bus Cancellations at www.sharpbus.com

This communication may contain privileged or other confidential information.If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information. Please indicate to the sender that you have received this email in error, and delete the copy you received.

**This message has been scanned on 8/9/2009 by GFI at SHARPBUS.COM and is virus free.**

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

Gmane