At 12:28 2008-10-09 +0200, Remien, Carsten wrote:
after I have migrated to Webmin, my .procmailrc will not work properly.
This script has worked before the migration (from ISPConfig to Webmin),
but not now.
Did anything change about the user account for which procmail is
running? Is mail processed by a separate HOST from the one on which your
user shell is?
From the debug logfile, it looks for me, that formail is working, but I
didn't see anything from "mail" and no logfile in the mail.log
formail is a procmail component which extracts and manipulates message
headers. It doesn't _send_ (or for that matter _receive_) messages.
I would like to grep the subject content and forward the subject in a new
mail to my mobile phone as a notification per SMS.
I only see, that the mail is normally stored into the Maildir folder, but
I didn't see any outgoing mail.
# cat .procmailrc
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
ORGMAIL=$MAILDIR
Generally, there should be no reason to futz with ORGMAIL. The only time
it should be used is when there's a problem delivering to the specified
mailboxes, and then you REALLY do want to have this go somewhere else
(like, to a different filesystem, which /var/ frequently is on) whenever
possible, else the messages will bounce.
VERBOSE=9
No doubt, this doesn't mean what you think it does. Please check 'man
procmailrc'
:0
* ^Subject:(.*\<)\/[^ ].*
{
SUB=$MATCH
}
:0c
| formail -r -A "Subject:.*Anrufbeantworter" | mail -s "$SUB"
number(_at_)t-mobile-sms(_dot_)de
Why do you have formail append a subject header if you're going to turn
around and specify a subject to mail ?
What is your shell set to for this user account?
Also, you might try:
| ( formail -r -A "Subject:.*Anrufbeantworter" | mail -s "$SUB"
number(_at_)t-mobile-sms(_dot_)de )
(note added parens around the pair of shell commands)
FTR, as invoked, that formail will discard the body of the message.
Create some OTHER shell script instead of mail which you would invoke:
mailtest.sh
#!/bin/sh
echo parameters: $@ >> $HOME/mailtest.log
cat - >> $HOME/mailtest.log
set +x on it, and invoke THAT instead of mail from your rcfile, and run
your tests. Inspect the mailtest.log 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.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail