Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I cannot make procmail to write to local mailbox.
get following error message:
procmail: Error while writing to "/var/mail/...
What is missing, permission ?
Thanks for assistance.
Cheers mike
FEATURE(`local_procmail',`',`procmail -t -f- -a $h -d $u')dnl
MAILER(procmail)dnl
Code:
file /var/mail
/var/mail: symbolic link to spool/mail
ls -la /var/mail/
total 132
drwxrwxrwt 2 root mail 4096 Mar 28 16:07 ./
drwxr-xr-x 19 root root 4096 Feb 23 13:15 ../
procmail: Match on "^Subject:.*Undelivered Mail.*Returned.*to.*Sender"
procmail: Assigning "LASTFOLDER=/var/mail/admin"
procmail: Opening "/var/mail/admin"
procmail: Error while writing to "/var/mail/admin"
It seems to me that a possible solution to the OP's question would be if the OP were able to create a standard user and configure said user with a mailbox as a debugging step.
Just add user 'root' to /var/mail/admin (root is the user of procmailrc)
permission 660 is now OK for /var/mail/admin.
adding the t bit to /var/mail/ is not needed.
everything works now as wanted.
just one more question:
ls -la /var/mail/
total 76
drwxrwsr-x 2 root mail 4096 Mar 29 16:15 .
drwxr-xr-x 13 root root 4096 Feb 26 2020 ..
First entry is the permission of the folder itself.
But what is the second permission?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.