Re: [gentoo-user] Where is (and how do I read) root's mail?
On Wed, Mar 02, 2005 at 01:54:34PM -0700, Scott Taylor wrote The ssmtp package sets up a simplistic mail relay that'll allow local apps to send mail to localhost and ssmtp just forwards it to a real mail server somewhere else. But you'll need to tell even it where to send your root emails. Booby trap alert. ssmtp can install a symlink as /usr/sbin/sendmail which points back to /usr/sbin/ssmtp. I did that once... and chatty cron jobs sent their emails to root. sendmail forwarded them to my smarthost, i.e. my ISP's MTA. It in turn forwarded the emails to root@ my ISP. I got a polite email from my ISP asking me to stop thatg. That's been my most embarressing moment as a user. I solved that by setting root=waltdnes. As a safety measure, I also deleted the sendmail symlink. This is where I learned about apps that *WILL NOT BUILD* if they can't find sendmail. Surprisingly, mutt builds OK, and I point it to /usr/sbin/ssmtp. The surprises were gnupg and slrn refusing to build when they couldn't find sendmail. In frustration, I went and did... touch /usr/sbin/sendmail chmod 755 /usr/sbin/sendmail chattr +i /usr/sbin/sendmail The presence of a zero-byte executable called /usr/sbin/sendmail gave gpg and slrn the necessary warm fuzzies to build on my system. While we're on the subject of ssmtp, I own my personal domain, and use several names @waltdnes.org (including postmaster and abuse) which are forwarded to my waltdnes account. It seems that ssmtp absolutely *INSISTS* on setting the From: to useraccount@, regardless of what I set the From: to in mutt. The only override I've managed to find is revaliases. It's somewhat clunky having to su - and edit revaliases to answer an email to one of my other aliases. Is there a glaringly obvious easier way that I've missed somewhere? -- Walter Dnes [EMAIL PROTECTED] An infinite number of monkeys pounding away on keyboards will eventually produce a report showing that Windows is more secure, and has a lower TCO, than linux. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
ME wrote: Hi, I feel a bit dumb here. On my Redhat systems, when I open a root shell and have the message You have new mail in /root, I just type mail and there I am reading the messages on the command line. With Gentoo, I get the You have new mail... message, but I don't have the proper application to read it (and do not know what to emerge). When that happens with me, I usually type mutt and read them, but mutt is often installed by default with many systems. I gather there is no default with Gentoo, but I'm willing to bet that if you emerge mutt you'll be able to read them. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
On Tue, 01 Mar 2005 21:07:41 -0800, ME [EMAIL PROTECTED] wrote: With Gentoo, I get the You have new mail... message, but I don't have the proper application to read it (and do not know what to emerge). Moreover, I am not able to find the messages! I looked under /root, under /var and did not find any (I might just be missing them, but I suspect they are not getting where they should). This sometimes happens when the $MAIL environment variable gets set wrong. The directory specified in that variable will be watched for new mail; sometimes (I think this is mainly a problem with su, but I'm not sure) it gets set to /root and gets confused. -- Be the person your dog thinks you are -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
quoth the ME: Hi, I feel a bit dumb here. On my Redhat systems, when I open a root shell and have the message You have new mail in /root, I just type mail and there I am reading the messages on the command line. With Gentoo, I get the You have new mail... message, but I don't have the proper application to read it (and do not know what to emerge). Moreover, I am not able to find the messages! I looked under /root, under /var and did not find any (I might just be missing them, but I suspect they are not getting where they should). Can anyone let me know what to install / setup to get this going? BTW, I have installed metalog for system logger, if that matters. Thanks. Marc Well, to put in my 2cents, what I do is edit the /etc/mail/aliases file so that root's mail resolves to my normal user account and read it there... Why screw around with two different clients just to read your cron report? -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org ...the number of UNIX installations has grown to 10, with more expected... - Dennis Ritchie and Ken Thompson, June 1972 pgpu4mGzMFGYT.pgp Description: PGP signature
Re: [gentoo-user] Where is (and how do I read) root's mail?
I believe the application you're looking for is mailx, The /bin/mail program. It is in portage. I think messages are stores in /var/mail, don't take my word for it though. On Wed, 2 Mar 2005 12:11:56 -0800, darren kirby [EMAIL PROTECTED] wrote: quoth the ME: Hi, I feel a bit dumb here. On my Redhat systems, when I open a root shell and have the message You have new mail in /root, I just type mail and there I am reading the messages on the command line. With Gentoo, I get the You have new mail... message, but I don't have the proper application to read it (and do not know what to emerge). Moreover, I am not able to find the messages! I looked under /root, under /var and did not find any (I might just be missing them, but I suspect they are not getting where they should). Can anyone let me know what to install / setup to get this going? BTW, I have installed metalog for system logger, if that matters. Thanks. Marc Well, to put in my 2cents, what I do is edit the /etc/mail/aliases file so that root's mail resolves to my normal user account and read it there... Why screw around with two different clients just to read your cron report? -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org ...the number of UNIX installations has grown to 10, with more expected... - Dennis Ritchie and Ken Thompson, June 1972 -- Steven Susbauer -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
Ryan Sims wrote: This sometimes happens when the $MAIL environment variable gets set wrong. The directory specified in that variable will be watched for new mail; sometimes (I think this is mainly a problem with su, but I'm not sure) it gets set to /root and gets confused. I have the exact same issue here. Does anybody know where the $MAIL variable gets set, or how to prevent it from being set at all? Christoph Gysin -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
On Wed, 2 Mar 2005 14:09:46 -0800 Steven Susbauer wrote: I believe the application you're looking for is mailx, The /bin/mail program. It is in portage. I think messages are stores in /var/mail, don't take my word for it though. Where the mail is stored will very much depend on where it is coming from and what mta/lda is delivering it, or more particularly how the mta/lda is configured. the standard for unix mail is to deliver to an mbox file of the user's name in /var/spool/mail, so all of root's mail would be in a file named /var/spool/mail/root, in mbox format. I see on my gentoo server that /var/mail is a symlink to /var/spool/mail, so we are both right :-) However unix systems are very configurable, and if you are using a particular imap or pop server such as courier or cyrus you will not want mail set up that way. in that case, courier wants to serve up maildir format files, and you would set up your mta/lda to deliver to something like ~/.maildir/ (but configurable to be anywhere sensible) Cyrus has its own mail format which its deliver binary takes care of, the mta/lda delivers to the deliver binary, which puts the mail in somewhere like /var/spool/imap/user/$USERNAME/ (again configurable) so where is my mail depends on how your system is set up. So far those are only examples. But the best advice so far in this thread is to alias root's mail to the user who will be reading it. -- Nick Rout -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
On Wed, 02 Mar 2005 23:28:01 +0100, Christoph Gysin [EMAIL PROTECTED] wrote: Ryan Sims wrote: This sometimes happens when the $MAIL environment variable gets set wrong. The directory specified in that variable will be watched for new mail; sometimes (I think this is mainly a problem with su, but I'm not sure) it gets set to /root and gets confused. I have the exact same issue here. Does anybody know where the $MAIL variable gets set, or how to prevent it from being set at all? Christoph Gysin I put unset MAIL in my root's .bashrc since I'm running a single-user system where that mail feature is pretty useless to me. For other applications, that workaround might be a problem. check this thread: http://forums.gentoo.org/viewtopic-t-246271-highlight-mail+variable.html it looks like it's a problem with shadow-4.0.5-r2 -- Be the person your dog thinks you are -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
Ryan Sims wrote: I put unset MAIL in my root's .bashrc since I'm running a single-user system where that mail feature is pretty useless to me. For other applications, that workaround might be a problem. I know that I could just unset MAIL at every login, but thats a workaround, not a solution... I followed your link to the forum. You have to set in /etc/login.defs: MAIL_CHECK_ENABno That did the trick. Christoph Gysin -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
[gentoo-user] Where is (and how do I read) root's mail?
Hi, I feel a bit dumb here. On my Redhat systems, when I open a root shell and have the message You have new mail in /root, I just type mail and there I am reading the messages on the command line. With Gentoo, I get the You have new mail... message, but I don't have the proper application to read it (and do not know what to emerge). Moreover, I am not able to find the messages! I looked under /root, under /var and did not find any (I might just be missing them, but I suspect they are not getting where they should). Can anyone let me know what to install / setup to get this going? BTW, I have installed metalog for system logger, if that matters. Thanks. Marc -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Where is (and how do I read) root's mail?
On Tue, Mar 01, 2005 at 09:07:41PM -0800, ME wrote: Hi, I feel a bit dumb here. On my Redhat systems, when I open a root shell and have the message You have new mail in /root, I just type mail and there I am reading the messages on the command line. With Gentoo, I get the You have new mail... message, but I don't have the proper application to read it (and do not know what to emerge). Moreover, I am not able to find the messages! I looked under /root, under /var and did not find any (I might just be missing them, but I suspect they are not getting where they should). Can anyone let me know what to install / setup to get this going? BTW, I have installed metalog for system logger, if that matters. Thanks. Marc -- gentoo-user@gentoo.org mailing list A few usual suspects: ~/.maildir /var/mail /var/spool/mail If you want to use the mail command, you will need to emerge mailx For other clients, check /usr/portage/mail-client/ I personally use mutt for my user accounts, and just less for root. What MTA/MDA did you install? qmail? Postfix? Check their settings in /etc, they usually offer a clue to where the mail is being delivered. W -- * Address: 45 Spelman Hall, Princeton University 08544 * * Phone: x68958 AIM: AngularJerk* *E-mail: [EMAIL PROTECTED]From: sep.dynalias.net * I think we dream so we don't have to be apart so long. If we're in each other's dreams, we can play together all night. -- Calvin Sortir en Pantoufles: up 6 days, 21:20 -- gentoo-user@gentoo.org mailing list