procmail
[Top] [All Lists]

RE: FW: Lol Procmail dont work

2006-11-29 02:57:34
Thank You So much for helping! I have commented on each point under the
point.

-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE] On Behalf Of 
Professional
Software Engineering
Sent: Wednesday, November 29, 2006 11:22 AM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: FW: Lol Procmail dont work

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.


------
Ive tried many variantions of the line above
----

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.

----
This purely a test box, this wont be the case in my production server.
----


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

----
I only need procmail for a single user. Don't want it handling everyone
elses mail.

----

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.


------
Permisions are as follows:
-rw-------  1 root  wheel  2931 Nov 29 07:40 .bash_history
-rw-r--r--  2 root  wheel   801 May  7  2006 .cshrc
-rwxr-xr-x  1 root  wheel    31 Nov 28 16:53 .forward
-rw-------  1 root  wheel   232 Nov 28 10:45 .history
-rw-r--r--  1 root  wheel   143 May  7  2006 .k5login
-rw-r--r--  1 root  wheel   293 May  7  2006 .login
-rwxr-xr-x  1 root  wheel   146 Nov 28 16:42 .procmailrc
-rw-r--r--  2 root  wheel   251 May  7  2006 .profile
-rw-------  1 root  wheel  1024 Nov 27 20:09 .rnd
drwx------  2 root  wheel   512 Nov 28 15:15 .ssh
drwxr-xr-x  3 root  wheel   512 Nov 28 13:33 .usermin
-r--r--r--  1 root  wheel  1801 Nov 27 14:33 ports-supfile

-----


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.

-----
The actual rc files and such are edited and created on the box itself, I
simply paste the ouput from putty. So that is correct.
-----

: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?

-----
"plop" is simply a generic term I use while testing. Its simply there for
testing purposes. As I cant get procmail working yet, I will not put it onto
my main server.
-----



: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.

-----
"/var/spool/mail/root" Does not exist for me.
The location is correct ive checked, also I have tested procmail from
command line with this configuration, and it works! It however doesn't from
the ".forward" file
-----

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?

---
Yup nothing there
---

  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



____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>