Subject: abusing WU-IMAP to create files with c-client (PHP4)

From: Friedrich Lobenstock <[email-masked]>
Date: Sun, 07 Apr 2002 23:40:10 +0200

Hi!

We use the vimap (patched wu-imapd) package in combination with 
linuxconf where the deliver program has a built-in vacation that
relies on the files ".vacation.msg" and ".vacation.db" to be in 
the users homedir.

The file ".vacation.msg" looks like this:
# cat -n /vhome/DOMAIN.net/home/test/.vacation.msg
     1  Return-Path: <[email-masked]>
     2  Subject: =?iso-8859-15?Q?Vacation?=
     3  From: "=?iso-8859-15?Q?[email-masked]?=" <[email-masked]>
     4  Content-Transfer-Encoding: 8bit
     5  Precedence: bulk
     6  X-Mailer: Linuxconf + Vacationmanager
     7  X-Vacation-Installed: Sun Apr 7 23:21:14 CEST 2002
     8
     9  Hallo!
    10
    11  Ich bin derzeit nicht erreichbar, werde mich um die Mails kümmern
    12  sobald ich wieder zurück bin.
    13
    14  Guten Tag.
    15
    16  =================================================================
    17  Hello!
    18
    19  I'm currently unavaiable. When I'm back I'll read my mails.
    20
    21  Have a nice day.

The ".vacation.db" file just needs to be created empty.

Now my question, can I create those files via a c-client client (PHP4)
on a WU-IMAP server?

A problem could be that I set the default mailbox format to be mbx so the
users can access their mails via different clients simultaneously. 

Can I tell the server to store the message shown above in a unix-style 
mailbox  without a trailing message where it stores folder infos?

Can I create an empty ".vacation.db"?

Thanks for any infos you have on this matter.

-- 
MfG / Regards
Friedrich Lobenstock
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Sun, 7 Apr 2002 14:46:12 -0700 (PDT)

By the way, it's "UW", not "WU".  We are the University of Washington in
Seattle, Washington.  That's a different institution from Washington
University, which is located far away from us.

To answer your question, Pine uses IMAP for non-message purposes, such as
address book and remote configuration.  You can't use IMAP to write a file in
arbitrary (non-mailbox) format, but it's not all that difficult to teach
"vacation" (or whatever) software to read a mailbox-format file.  Ideally, you
would like it to open the file as a mailbox, and use the last message in it.
That way, you can have backup versions.

---

From: Friedrich Lobenstock <[email-masked]>
Date: Mon, 08 Apr 2002 00:25:22 +0200

> University, which is located far away from us.

Aha...ok I'll try to remember that.

> address book and remote configuration.  

I know and that's why it came to my mind to do something like this.

> You can't use IMAP to write a file in arbitrary (non-mailbox) format, 

The message is a normal mail message, see my posting, the line numbers are
just for illustration.

> but it's not all that difficult to teach 

The vacation message file needs to be in mailbox-format with ONLY one message in
it. And I can't really teach the delivery agent (with the built-in vacation) to 
only take the last message into account.

Can I tell uw-imap, via namespace, or whatever to create a mailbox in standard 
mailbox-format (unixproto) instead of _my_ default of mbx (CREATEPROTO=mbxproto)? 

Or is there an IMAP extension for vacation?

-- 
MfG / Regards
Friedrich Lobenstock

---

From: Mark Crispin <[email-masked]>
Date: Sun, 7 Apr 2002 16:21:12 -0700 (Pacific Daylight Time)

> mailbox-format (unixproto) instead of _my_ default of mbx (CREATEPROTO=mbxproto)?

#driver.unix/ prefix.

Note that this may still write the pseudo-message which holds the UID base
information.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.