Directory path to new mailbox

Directory path to new mailbox

Posted by: geckodancer
Posted on: 2004-03-27 20:17:00

Hi,
I have a cron that runs a script I wrote that checks my Maildir folder for new mail and alerts me by emailing my cell phone. Today, I created an additional mailbox for myself (not just an alias) and would like to run the same script on the new mailbox too. To do that, I need the directory path to the new mailbox. The new box does not seem to be located within the directory for my account. Does anyone know how I can find the path to it, or is this simply not doable? Thanks for any help.

Re: Directory path to new mailbox

Posted by: ardco
Posted on: 2004-03-27 22:35:00

It might work better if you made the new account as a "user" rather than a "mailbox" (m1234567), but... Here's how you might find the path to the new mailbox; however, you might find you don't have permission to access it...

In the shell, cd to above your home directory (i.e. cd .. or cd /home).
Do: ls -l |grep your-user-id
See the -> .some-name/your-user-id
Do cd .some-name
do ls and see if you see your mailbox (m1234567)
cd to your mailbox (cd m1234567)
Do ls -l, and if you're lucky, you have permissions to access the Maildir,
but probably not is my guess. Anyway, you probably have the path now, fwiw...

Cheers,

BobS

Re: Directory path to new mailbox

Posted by: Atropos7
Posted on: 2004-03-27 22:51:00

You won't be able to access the maildir directory, it is owned by the mailbox user (mxxxxx) and of course there is no group or public permissions enabled at all. Well at least when I try.

I would suggest using a POP3 or IMAP capable script to check for new messages myself. For example with Perl you could use the Net::POP3 module.


cool Perl / MySQL / HTML+CSS

Re: Directory path to new mailbox

Posted by: geckodancer
Posted on: 2004-03-29 12:00:00

Bob,
Thanks so much, and you're absolutely right that permission is denied to the mailbox when created as a separate box like that. Nice to know, just as a pointless factoid, where it was located though. I got rid of it and created a new user instead, and that's just what was needed.
Regards,
Geckodancer

Tags: directory pathnew mailmailboxaliascell phonedoablecronemailingcheckshelp