[ingo] maildrop driver for ingo

bronto@csd-bes.net bronto at csd-bes.net
Fri Jul 22 10:08:04 PDT 2005


Here's my existing backends.php.  I've eliminated all of the other 
stanzas for simplicity.

/* Maildrop Example */
$backends['maildrop'] = array(
    'driver' => 'vfs',
    'preferred' => 'mail.csd-bes.net',
    'hordeauth' => 'full',
    'params' => array(
        // Hostname of the VFS server
        'hostspec' => 'csd-bes.net',
        // Name of the maildrop config file to write
        'procmailrc' => '.mailfilter',
        // Port of the VFS server
        'port' => 21,
        // The VFS driver to use
        'vfstype' => 'ftp'
    ),
    'script' => 'maildrop',
    'scriptparams' => array(
        // What path style does the IMAP server use ['mbox'|'maildir']?
        'path_style' => 'maildir',
        // An array of variables to append to every generated script.
        // Use if you need to set up specific environment variables.
        'variables' => array(
            // Example for the $PATH variable
          'PATH' => '/usr/bin'
        )
    )
);

I am aware of the issues of using HEAD, but thanks for the warning.  
Are you using HEAD or your original mods to the stable release?  Just 
to be sure you and I are using the same code...

I will comment out that PATH statement, but I don't suspect this is my 
real issue.  It's good to know that localhost works for hostspec, I'll 
switch to that.

I have the config file set to ".mailfilter"; your original notes for 
this modification suggest that this will cause the file to be displayed 
somewhere(?), but I don't see that.  My maildrop installation is 
expecting .mailfilter, and I'd rather not change that if I don't have 
to.

I understand that I need ftp services to read and write the mailfilter, 
but I don't understand how it works.  I had proftp on my last server, 
but am using vsftp on this new server.  I think that I can set up 
virtual users for it.  I really don't understand anything about horde's 
vfs.  Where do you designate in Horde what user to use for ftp?  Jan 
suggested that it would be the currently logged in user, but that user 
isn't a real unix user that ftp would know about.  I am assuming you 
know this, since the whole point of using maildrop is usually to get 
filtering services for virtual users that procmail can't provide.  So 
there must be a place to designate a ftp user.  Where?

Can you explain why the include is needed in /etc/maildroprc?  If the 
script is being written to .mailfilter in the user's mail folder, and 
maildrop reads that file to do the filtering, it doesn't seem like 
anything else would be necessary.  I ask for two reasons: When I don't 
undertand something, it's likely that my next move is to goof up, and 
because I have not yet needed /etc/maildroprc and don't want to 
introduce variables I don't need.

Thanks for writing this, for your help, and for volunteering to 
maintain the mod :)

Rob



Quoting Mathias Weyland <mweyland at phys.ethz.ch>:

> On Tue, Jul 19, 2005 at 10:06:48PM -0700, Rob Brandt wrote:
>> I've just installed ingo from the HEAD snapshot of July 4.  The 
>> maildrop support
>> is one of the main reasons I am upgrading to the new version.
>
> Hi
>
> Nice to hear you like the new features :). Please note that the code I wrote
> is highly experimental. It's always risky to use HEAD snapshots since things
> may break or just fail to work properly.
>
>
>>  I have used horde for several years, but never ingo because I've been using
>> maildrop the whole time.  I'm looking forward to having an interface to
>> manage this :)
>
> If you manage to set it up correctly it will work (at least here it does).
>
>
>> However, it's not working yet.  Several things aren't clear to me.  In
>> backends.php, I've configured the maildrop stanza with my server info,
>> including maildir and path to maildrop.
>
>
> Can you show that stanza? This is mine:
>
> $backends['maildrop'] = array(
>    'driver' => 'vfs',
>    'preferred' => '',
>    'hordeauth' => 'full',
>    'params' => array(
>        // Hostname of the VFS server
>        'hostspec' => 'localhost',
>        // Name of the procmail config file to write
>        'procmailrc' => 'mailfilter',
>        // Port of the VFS server
>        'port' => 21,
>        // The VFS driver to use
>        'vfstype' => 'ftp'
>    ),
>    'script' => 'maildrop',
>    'scriptparams' => array(
>        // What path style does the IMAP server use ['mbox'|'maildir']?
>        'path_style' => 'maildir',
>        // An array of variables to append to every generated script.
>        // Use if you need to set up specific environment variables.
>        'variables' => array(
>            // Example for the $PATH variable
>            // 'PATH' => '/usr/bin'
>        )
>    )
> );
>
> Note that the mailfilter file (which is the file where the user's rules
> will be saved) has to be set with the key 'procmailrc'.
>
> And it's not needed to provide the path to maildrop. Maildrop should be
> called by the MTA and not by horde.
>
> Concerning the maildir stuff, I guess you mean that you've set the
> path_style to maildir (mbox does not work with subfolders). It's not needed
> to set the path to the maildir here (see my comment about the global
> maildroprc at the end of that email).
>
>
>>  I expected then to be able to go into Setup and actually *select* maildrop
>> as my filter backend, but my only option similar to that is "prefs".
>
> Same for me here. 'prefs' is the backend selected in the web interface. I
> don't remember how ingo works with different backends, but I think you can
> bind backands to the domains. (see the 'preferred' directive.)
>
>
>> Oh well, I try running the filters anyway, and I can create one and apply
>> it, but there's no correlation between what it does and what's in my 
>> existing
>> maildrop file.
>
> What did you set and what is in the file?
>
>
>> * Do I need to do anything to designate maildrop as my filter backend?
>
> You need a working vfs setup. I'm using proftpd with a special
> authentification (against my mysql user database) for this.
>
>
>> * Will ingo incorporate my existing maildrop filters, or do I have 
>> to enter them
>> again?
>
> You have to enter them again. It's rather difficult to write an import
> function, and since I'm not in the need for such an import function it looks
> like someone else has to write it :)
>
>
>> * Does it matter that my mail path is different than what is listed 
>> below?  I am
>> at /var/spool/postfix/virtual/(domain)/(user)/
>
> That depends on your vfs driver. I configured proftpd to save the mailfilter
> file in /home/vmail/user at domain/:
>
> DefaultRoot /home/vmail/%u
>
> I'm not quite sure what's the best way to configure this for your setup.
> Maybe someone on the list has a good idea. (Maybe a second folder for the
> mailfilter files if it's not possible to solve it differently)
>
> And please note that you have to include the user's mailfilter file in your
> global maildroprc. This looks like this for me (please note that I added
> some features since the last posting):
>
> ([0.00][root at lists:/var/www/horde/ingo]) > cat /etc/maildroprc
> # Global maildrop filter file
>
> # Uncomment this line to make maildrop default to ~/Maildir for
> # delivery- this is where courier-imap (amongst others) will look.
> DEFAULT="${HOME}"
> logfile "/home/vmail/maildrop.log"
>
> # include user's mailfilter file if present
> exception {
>        include "${HOME}mailfilter"
> }
>
> # move mails tagged as spam in the spam folder if present
> if( /^X-Spam-Flag: .*YES/ )
>        exception {
>           to "${DEFAULT}/.spam/"
>        }
>
> # move mails with VERP extensions into the appropriate folder if present.
> exception {
>        to "${DEFAULT}/.${1}/"
> }
>
> # safety fallback
> to "${DEFAULT}"
> ([0.00][root at lists:/var/www/horde/ingo]) >
>
> To the ingo crew:
> Are you looking for someone who maintains the maildrop driver? I'm planning
> to make some improvements and I have contact to someone who is going to
> write vacation support for the maildrop horde driver. I would volonteer for
> maintaining ingo's maildrop filter.
>
> Best regards
>
> Mathias Weyland
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the ingo mailing list