> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Aaron Stone
> Sent: Friday, July 20, 2007 1:13 PM
> To: DBMail mailinglist
> Subject: RE: [Dbmail] Dbmail-export search options
>
> On Fri, Jul 20, 2007, List Receiver <[EMAIL PROTECTED]>
> said:
>
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On
> >> Behalf Of Aaron Stone
> >> Sent: Friday, July 20, 2007 12:34 PM
> >> To: DBMail mailinglist
> >> Subject: RE: [Dbmail] Dbmail-export search options
> >>
> >> On Fri, Jul 20, 2007, List Receiver <[EMAIL PROTECTED]>
> >> said:
> >>
> >> >> -----Original Message-----
> >> >> From: [EMAIL PROTECTED] [mailto:dbmail-
> [EMAIL PROTECTED]
> >> On
> >> >> Behalf Of Paul J Stevens
> >> >> Sent: Friday, July 20, 2007 11:38 AM
> >> >> To: DBMail mailinglist
> >> >> Subject: Re: [Dbmail] Dbmail-export search options
> >> >>
> >> >> List Receiver wrote:
> >> >> > I'm trying to use the dbmail-export feature from 2.2.5 to
> create
> >> an
> >> >> mbox file from a mailbox that only has certain addresses in the
> To
> >> or
> >> >> From fields.  I'm unfamiliar with how to format that, and the man
> >> page
> >> >> and example from -h hasn't been enough to get me going.  I've
> tried
> >> >> this:
> >> >> >
> >> >> > dbmail-export -u user -m "my box" -s "1:* FROM [EMAIL PROTECTED]"
> >> >> >
> >> >> > That didn't work, however.  It produced a 0 byte file and no
> error
> >> >> code.  How do I format an IMAP search string to select To and
> From?
> >> As
> >> >> well, is there a way to do search strings for multiple To/From
> >> >> addresses?  I guess I just need to know how to do search strings
> in
> >> >> IMAP land.  :^)
> >> >>
> >> >> dbmail-export -u user -m 'mailbox' -s "OR (HEADER FROM
> >> >> [EMAIL PROTECTED])(HEADER FROM [EMAIL PROTECTED])"
> >> >>
> >> >
> >> > Thanks.  This doesn't seem to be working on my machine.  I have
> even
> >> tried a simpler:
> >> >
> >> > dbmail-export -u user -m "mailbox" -s "HEADER FROM [EMAIL PROTECTED]"
> >> >
> >> > ..but the result is an empty file when I am staring right at an e-
> >> mail in that mailbox from [EMAIL PROTECTED]  I'm perplexed.  What
> should I
> >> try next?
> >>
> >> The mailbox name might be case sensitive in dbmail-export <
> 2.2.6rc1.
> >> See
> >> if that resolves the problem for you. Do you get output on stderr
> like:
> >>
> >> Exporting [1] mailboxes for [user]
> >>  export mailbox INBOX -> ./user/INBOX.mbox
> >>
> >> or...
> >>
> >> Exporting [0] mailboxes for [user]
> >>
> >> ..the latter of which means that the mailbox is not being found,
> rather
> >> than indicating a problem with the IMAP search query.
> >>
> >> Aaron
> >
> > I get:
> >
> > export mailbox /user/mailbox -> user/mailbox
> >
> > ...so it appears to be similar to the correct example you cite above.
> >
>
> Right. Huh. Ok, so if you edit dbmail.conf and in the DBMAIL section,
> set
> TRACE_SYSLOG=5, and run dbmail-export as root, then you'll get all
> sorts
> of details in your maillog.
>

OK, here's the output in the maillog:

Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[db] 
dbmodule.c,db_load_driver(+56): library_directory is [/usr/local/lib/dbmail]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[db] 
dbmodule.c,db_load_driver(+69): looking for mysql as 
/usr/local/lib/dbmail/libmysql.so
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[sql] 
dbmysql.c,db_query(+290): query [SET NAMES latin1]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[sql] 
dbmysql.c,db_query(+290): query [SHOW VARIABLES LIKE 'collation_%']
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[sql] 
dbmysql.c,db_mysql_check_collations(+120): does 
[collation_database:latin1_swedish_ci] match 
[collation_connection:latin1_swedish_ci]?
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[auth] 
authmodule.c,auth_load_driver(+51): library_directory is [/usr/local/lib/dbmail]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[auth] 
authmodule.c,auth_load_driver(+64): looking for auth_sql as 
/usr/local/lib/dbmail/libauth_sql.so
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[sql] 
dbmysql.c,db_query(+290): query [SELECT user_idnr FROM dbmail_users WHERE 
lower(userid) = lower('user')]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[db] 
db.c,db_findmailbox(+2640): looking for mailbox with FQN [mail/2006_01 archive].
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[sql] 
dbmysql.c,db_query(+290): query [SELECT mailbox_idnr FROM dbmail_mailboxes 
WHERE name LIKE 'mail/2006_01 archive' AND owner_idnr=6]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[sql] 
dbmysql.c,db_query(+290): query [SELECT message_idnr FROM dbmail_messages WHERE 
mailbox_idnr = 77 AND status IN (0,1) ORDER BY message_idnr]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,mailbox_build_uid_map(+180): ids [24828], msn [24828]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[imapsession] 
dbmail-imapsession.c,build_args_array_ext(+2389): arg[0]: '1:*'
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[imapsession] 
dbmail-imapsession.c,build_args_array_ext(+2389): arg[1]: 'HEADER'
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[imapsession] 
dbmail-imapsession.c,build_args_array_ext(+2389): arg[2]: 'From'
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[imapsession] 
dbmail-imapsession.c,build_args_array_ext(+2389): arg[3]: 'Patrick'
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[misc] 
misc.c,check_msg_set(+996): [1:*] [ok]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,append_search(+589): [0x80f0cd8] leaf [1] type [1] field [] 
search [1:*] at depth [1]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,append_search(+589): [0x80f1d80] leaf [1] type [5] field 
[From] search [Patrick] at depth [1]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,dbmail_mailbox_build_imap_search(+1135): done [0] at idx [4]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,dbmail_mailbox_get_set(+1387): [1:*] uid [0]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[misc] 
misc.c,g_tree_merge(+1267): (0x8061ce8) (0x8061d08): a[0] [OR] b[24828] -> 
a[24828]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,_do_search(+1569): [0x80f0cd8] depth [1] type [1] rows [24828]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[sql] 
dbmysql.c,db_query(+290): query [SELECT message_idnr FROM dbmail_messages m 
JOIN dbmail_physmessage p ON m.physmessage_id=p.id JOIN dbmail_headervalue v ON 
v.physmessage_id=p.id JOIN dbmail_headername n ON v.headername_id=n.id WHERE 
mailbox_idnr = 77 AND status IN (0,1) AND headername LIKE 'From' AND 
headervalue LIKE '%Patrick%' ORDER BY message_idnr]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,_do_search(+1569): [0x80f1d80] depth [2] type [5] rows [0]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[misc] 
misc.c,g_tree_merge(+1267): (0x8061c18) (0x8061ce8): a[24828] [AND] b[24828] -> 
a[24828]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,_merge_search(+1646): [0x80f0cd8] leaf [0] depth [1] type [1] 
found [24828]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[misc] 
misc.c,g_tree_merge(+1267): (0x8061c18) (0x8061d08): a[24828] [AND] b[0] -> a[0]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,_merge_search(+1646): [0x80f1d80] leaf [1] depth [2] type [5] 
found [0]
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,dbmail_mailbox_search(+1678): found [0] ids
Jul 20 13:43:32 archfe1 dbmail/export[8718]: Debug:[mailbox] 
dbmail-mailbox.c,dbmail_mailbox_dump(+283): cannot dump empty mailbox


That is the output of this command:

dbmail-export -u user -m "mail/2006_01 archive" -s "1:* HEADER From Patrick"

I've tried full e-mail addresses as well, and they generate the same messages.  
I guess the key is the "cannot dump empty mailbox" on the last line.  What 
would cause that?  Did I possibly miss a step in one of my many upgrades 
somewhere?


> Also, I thought that I'd changed the mailbox case sensitivity by
> changing
> the function call that gets the list of matching mailboxes, but they're
> both case sensitive, so that behavior actually has not changed at all
> in
> SVN since the 2.2.5 release.
>
> Aaron
> _______________________________________________
> DBmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to