At 09:39 2006-11-29 +0200, Marcel Grandemange wrote:
My .forward looks like this:
"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #root"
You used a proportional font, so it isn't clear that there's a space within
the single quotes. After checking, it seems that there is, which there is
supposed to be.
In general, it's a good idea to send root email to another user - no sense
in having to log in as root (or be tempted to use an unencrypted email
login protocol to access it remotely) just to check mail. Plus, you really
don't want the temptation of invoking automated processes as root based on
emails.
Nov 19 19:05:28 plop postfix/local[1889]: 491B3398AA:
to=<root(_at_)plop(_dot_)com>,
orig_to=<root>, relay=local, delay=0, status=sent (delivered to command:
IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #root)
Nov 19 19:05:28 plop postfix/qmgr[1517]: 491B3398AA: removed
Caveat: I don't use postfix.
So I know it gets it.
Well, this says the .forward was parsed.
Instead of having to use .forward, why not configure postfix to use
procmail as the LDA? in /etc/postfix/main.cf:
mailbox_command = /usr/local/bin/procmail
note that <http://www.securityfocus.com/infocus/1606> even suggests
forwarding root mail to a user account.
My .procmailrc looks like this:
What are the permissions on the file?
SHELL=/bin/sh
VERBOSE=on
LOGABSTRACT=all
DEFAULT=/var/mail/root
LOGFILE=/var/log/proclog
ick.
First, the doublespacing in your post makes it look likely that you have
DOS CR+LF line terminations, rather than *nix LF ones. You should check
the rc file and correct the situation if this is the case.
:0H
* plop
! thavinci(_at_)thavinci(_dot_)za(_dot_)net
Anything having "plop" somewhere in the headers will be forwarded. Why not
specify a specific header?
:0
/var/mail/root
This doesn't have _locking_ (trailing colon on the :0 line), so you're
asking for trouble here. If this is where mail should normally go (not
/var/spool/mail/root ?), then simply DON'T DO ANYTHING at the bottom of
your rcfile, and procmail will deliver to your mailbox because it didn't
otherwise deliver it elsewhere.
When I send mail to root procmail doesn t add anything into its log.
This implies that procmail isn't actually executing, or isn't getting far
into the rcfile.
It doesn t seem to even run! And all mail gets lost.
Have you checked the mail queue?
---
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