Operating System - HP-UX
1748085 Members
5026 Online
108758 Solutions
New Discussion юеВ

Re: EMS mail to root account filtering

 
Jos├й L. Marcos
Occasional Advisor

EMS mail to root account filtering

Hi *,

i'm trying to filter some EMS events notified to root by E-mail (severity >= MAJOR WARNING)...

I've installed procmail 3.21 software depot on my HPUX 11.00 server, and just try to configure procmail.

The first steps are :
- /home/root/.procmailrc file creation. Nothing special here I just use - for the moment - a silly rule telling procmail to deliver any message to the default mailbox...
- /home/root/.forward. I've configured this file according to the many docs/faq found on the Net :
"|IFS=' ' && exec /opt/procmail/bin/procmail || exit 75 "

And here is my problem... Without those files in place on my /home/root directory, everything goes nice : a 'mailx root < /etc/issue' command sends /etc/issue in /var/mail/root.

If I configure both files (~/.procmailrc and ~/.forward), the same commands goes to /var/mail/daemon !!!!

This is just driving me nuts !

Any ideas ?

Regards,
Jose L. Marcos
2 REPLIES 2
Jordan Bean
Honored Contributor

Re: EMS mail to root account filtering

Are you saying that the procmail and forward rules for user root also affect user daemon?

From your post, root's home dir is /home/root. What's the home directory for daemon?

What does this show you?

$ echo ~root ~daemon



Jos├й L. Marcos
Occasional Advisor

Re: EMS mail to root account filtering

> Are you saying that the procmail and forward rules for user root also affect user
> daemon?

No. What I'm saying is that : mail adressed to user root aren't correctly handled via forward and procmail rules.

> From your post, root's home dir is /home/root. What's the home directory for daemon?

Home directory for root is '/home/root' and home directory for daemon is '/'.

I've tested the same procmail and forward rules with a "normal' account. After setting the correct permissions to /opt/procmail/bin/procmail (root:mail and chmod 2755) it works correctly for this normal account, I mean the mail is correctly forwarded to the /var/mail/account mailbox.

The point is that mail sent to 'root account' is misdistributed into /var/mail/daemon !

It's still driving me nuts...

Jose L.