Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

bash, mailx and maildir

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
dju`
Retired Dev
Retired Dev
Posts: 370
Joined: Tue Feb 11, 2003 5:33 pm

bash, mailx and maildir

  • Quote

Post by dju` » Fri Jul 04, 2003 9:23 pm

Hi,
does mailx support maildirs ? i have mail waiting in ~/.maildir/new/ but i get a "No mail for me" when i enter "mail".
does bash's mail checking support maildirs ? I have exported MAILPATH=~/.maildir/ but no new mail notification appears.
Thanks
Top
jkcunningham
l33t
l33t
Posts: 648
Joined: Mon Apr 28, 2003 4:28 pm
Location: 47.49N 121.79W

  • Quote

Post by jkcunningham » Sat Jul 05, 2003 4:34 pm

I don't know if mailx supports maildir format or not. If it doesn't, mutt does. I don't believe bash has anything to do with mail, other than being the owner of environment variables. You need some notification app running, like biff, that watches a folder for activitiy.

According to this site:

http://www.mkssoftware.com/docs/man1/ma ... _VARIABLES

you aren't using the right environment variable for mailx. Try setting MAILDIR in your .bashrc. to "~/.maildir/" (some mail apps need the trailing slash to tell them it is in maildir format).

If that doesn't work, what is delivering the mail to ~/.maildir now? Tell it to use mbox format (the only format mentioned in the doc mentioned above on mailx).

-Jeff
Top
dju`
Retired Dev
Retired Dev
Posts: 370
Joined: Tue Feb 11, 2003 5:33 pm

  • Quote

Post by dju` » Sun Jul 06, 2003 10:25 am

it seems that mailx doesn't work with maildir, your solution doesn't work.

according to the bash manual, bash can check mail :

Code: Select all

MAILCHECK
    How often (in seconds) that the shell should check for mail in the files specified in the MAILPATH or MAIL variables. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, or set to a value that is not a number greater than or equal to zero, the shell disables mail checking.
so there's no need to use biff or similar. furthermore, i believe that biff isn't in portage.
Top
jkcunningham
l33t
l33t
Posts: 648
Joined: Mon Apr 28, 2003 4:28 pm
Location: 47.49N 121.79W

  • Quote

Post by jkcunningham » Sun Jul 06, 2003 6:16 pm

Interesting. I didn't know that about bash. But it seems your problem is trying to use maildir format with mailx which doesn't support it. You probably need to make your mail delivery agent deliver in mbox format which mailx does understand (or switch mail client to something like mutt which supports all of them).

Have fun.
-Jeff
Top
snowpatch
n00b
n00b
Posts: 38
Joined: Sun Mar 09, 2003 8:31 pm
Location: Philadelphia

mailx, mail command, and maildir

  • Quote

Post by snowpatch » Sat Mar 20, 2004 8:06 pm

I have postfix setup as per the howto, with mail going to ~/.maildir/ for each user. While it is true that using

Code: Select all

mail
to check for mail doesn't work with maildir format, I can send mail to another user with the mail command. I just use mutt to read it.
Top
riscycdj
n00b
n00b
Posts: 61
Joined: Sun Oct 09, 2005 8:21 am

  • Quote

Post by riscycdj » Tue Nov 15, 2005 2:31 am

I have the same situation. But I can't seem to work out what to put in .bashrc to get the mail checking to work. Mailx doesn't work with maildir so I am going to unmerge it. Mutt works fine.

I just can't get the mail notification in bash working.
Top
shaman200
n00b
n00b
User avatar
Posts: 30
Joined: Thu Dec 29, 2005 5:57 pm

  • Quote

Post by shaman200 » Tue Jan 03, 2006 4:29 pm

Just in case you really like mailx:
1/emerge -C mailx (yeah, i know :lol: )

2/emerge nail
here's an excerpt of the install:
>>> /usr/bin/nail
>>> /usr/bin/mailx -> /usr/bin/nail
>>> /usr/bin/mail -> /usr/bin/nail
>>> /usr/bin/Mail -> /usr/bin/nail
so you don't have to change your ways....

3/Be sure that the MAIL variable is set correctly
Linuxboxx:/home/user >>env|grep -i mail
MAIL=/home/user/.maildir

NOW, it's working just right :P
Top
Merlin8000
n00b
n00b
Posts: 29
Joined: Wed Jan 26, 2005 5:11 am
Location: Louisiana
Contact:
Contact Merlin8000
Website

  • Quote

Post by Merlin8000 » Tue Jun 06, 2006 12:12 am

worked great for me, thanks, my curiosity about doing this just now reached a level high enough to seek out an answer

There should really be something in the courier/postfix/maidir wiki pages about this
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic