Hiya -
I've installed the mailhandler module on my Drupal 4.7.6 install. In setup, I entered the path to a local folder that I'd like mailhandler to access. Underneath the "Folder" text entry box it says:

"Optional. The folder where the mail is stored. If you want this mailbox to read from a local folder, give the full path. Leave domain, port, name, and pass empty below. Remember to set the folder to readable and writable by the webserver."

So, as per instructions I left those items empty. But when I attempt to save my configuration, I get this error:

Mailbox domain field is required.

Comments

Clemens’s picture

Same problem with version 5.x-1.0... I have tried to use mailhandler several times since it was released over the years.

It appears to be a much needed module.

The 'IMAP dynamic extension' does not appear to be available on my server.

Without a fix for this bug I will not be able to use Mailhandler. That is sad.

ChrisKennedy’s picture

Component: User interface » Code
Priority: Critical » Normal
Status: Active » Fixed

Fixed in HEAD, DRUPAL-5, and DRUPAL-4-7.

Clemens’s picture

Version: 4.7.x-1.x-dev » 5.x-1.1
Status: Fixed » Postponed (maintainer needs more info)

After installing the latest  5.x-1.1 dated 15/03 the configuration indeed accepts a path to a folder as suggested. Thank you.

However, when you the 'retrieve' e-mail from that folder the following error occurs:  warning: imap_open() [function.imap-open]: Couldn't open stream /var/www/test/ in /var/www/drupal/modules/mailhandler/mailhandler.module on line 21.

I did not expect to see an 'imap' error here... :-(

muhammadyaseen’s picture

Component: Code » Documentation
sime’s picture

@clemens. http://php.net/imap_open states that this function can be used to access POP accounts as well, so I wouldn't worry about that.

I personally tried the direct access method and got this error. Reading php.net I don't see that how mailhandler was accessing the mailbox is consistent with the documentation, the only example I found of skipping the second and third parameters is this one:

// To connect to an NNTP server on port 119 on the local server, use:
$nntp = imap_open ("{localhost:119/nntp}comp.test", "", "");

Soo. I just did the normal access method with username/password etc, and it works fine. In fact making a mail directory 777 so that apache can read it is IMHO probably not the best option, but I'm sure it is preferable in some cases.

ilo’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

'folder' is a wrong assumption for local mailboxes. When working with local mailboxes you must specify the full file path. In any case, the imap class is unable to handle the folder at: "Couldn't open stream /var/www/test/", wich is a clear error about wrong folder configuration.