CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Understanding How the Maildir Option is Envisioned
Pages: [1]

Author Topic: Understanding How the Maildir Option is Envisioned  (Read 1902 times)

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Understanding How the Maildir Option is Envisioned
April 20, 2009, 08:20:30 am
I'm trying to understand how the Maildir option for CiviMailProcessor.php is expected to work.

In a typical Linux/Unix Maildir setup, the Maildir and sub directories belong to the mail user with mode 700 permissions.  CiviMailProcessor.php runs under the uid of the web server when called via curl.  It fails completely unless some kind of permission for the web server user to access the Maildir is given.

I can give permission via adjusting the group and group permissions on the catchall Maildir. It properly creates its own Maildir at the custom files path location and moves the messages into that local mail store, but it then again fails because the messages are still "owned" by the catchall mail user at mode 700.

So was the Maildir option envisioned to run via command line interface under root's crontab?  If so, do the authentication variables need to be defined in the script itself?

Or was the catchall email user envisioned to be the same as the web server user?  Or am I completely looking up the wrong path?
Lead Developer, C3 Design.
Twitter: @FatherShawn

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Understanding How the Maildir Option is Envisioned
April 21, 2009, 02:30:32 am
The Maildir solution was created first, as a ‘dummy’(-ish) email source when we were developing the parsing part; we actually didn’t think it would be used in production by many people – but it’s great to see it’s (or could be…) useful to you. :)

Quote from: FatherShawn on April 20, 2009, 08:20:30 am
Or was the catchall email user envisioned to be the same as the web server user?

Basically, yes. The idea was that the email stuff of the relevant email account and web stuff are ran in a way that can be shared – so the files are either owned by a particular ‘real’ user (and CiviCRM runs through suPHP), or, if the webserver runs under a shared user/group, that group can manipulate that particular Maildir directory.

You are free to hack CRM/Mailing/MailStore/Maildir.php of course – and any ideas are more than welcome. As I said, we mostly added Maildir support for easy testing of the rest of CiviMail Processor, and didn’t think much about its production uses.
« Last Edit: April 21, 2009, 02:33:15 am by Piotr Szotkowski »
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Understanding How the Maildir Option is Envisioned

This forum was archived on 2017-11-26.