Re: last_login plugin with MySQL

2014-10-19 Thread Michael Cramer

Zitat von Luigi Rosa li...@luigirosa.com:


Gedalya wrote on 18/10/2014 17:36:


The code looks at shared/$last_login_key, so shared/last-login/username,
but your map says /shared/last-login/$user, note the leading slash! That's
probably all it is.



BINGO!

Now that we killed the mosters of this level, let's move to the next  
level.



Welcome to the SQL query level!

I was expecting an UPDATE...WHERE but I got this:

INSERT INTO mailbox (lastlogin,username) VALUES ('1413647370','username') ON
DUPLICATE KEY UPDATE lastlogin='1413647370'

This is not very useful if I want a `lastlogin` field of the `mailbox` table
updated on every login.




Ciao,
luigi

- --
/
+--[Luigi Rosa]--
\

For every human problem, there is a neat, simple solution;
and it is always wrong.


anybody knows how this can be achieved with postgresql, because 'ON  
DUPLICATE KEY UPDATE' syntax is mysql specific


Re: last_login plugin with MySQL

2014-10-19 Thread Gedalya

On 10/19/2014 04:10 AM, Michael Cramer wrote:

Zitat von Luigi Rosa li...@luigirosa.com:


Gedalya wrote on 18/10/2014 17:36:

The code looks at shared/$last_login_key, so 
shared/last-login/username,
but your map says /shared/last-login/$user, note the leading slash! 
That's

probably all it is.



BINGO!

Now that we killed the mosters of this level, let's move to the next 
level.



Welcome to the SQL query level!

I was expecting an UPDATE...WHERE but I got this:

INSERT INTO mailbox (lastlogin,username) VALUES 
('1413647370','username') ON

DUPLICATE KEY UPDATE lastlogin='1413647370'

This is not very useful if I want a `lastlogin` field of the 
`mailbox` table

updated on every login.




Ciao,
luigi

- -- 
/

+--[Luigi Rosa]--
\

For every human problem, there is a neat, simple solution;
and it is always wrong.


anybody knows how this can be achieved with postgresql, because 'ON 
DUPLICATE KEY UPDATE' syntax is mysql specific
The user is not causing the 'ON DUPLICATE KEY UPDATE', that's the 
dovecot mysql driver.
Dict is an abstraction layer. It will just work if you do pretty much 
the same config but with the postgres driver.


Re: Permissions for shared mail don't work

2014-10-19 Thread Steffen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Damien Desfontaines wrote:
 
 On Sat, Oct 18, 2014 at 03:05:58PM +0200, Steffen wrote:
 Damien Desfontaines wrote:
 
 Here it is: http://paste.fulltxt.net/Xzoq9v
 
 You can actually see when I manually changed all permissions, 
 around October 12, and the fact that the messages received 
 afterwards don't have the correct permissions.
 
 how do you deliver new messages to spam's INBOX?
 
 By sending an e-mail to spam.whate...@desfontain.es ?
 
 (I'm not sure I understand the question?)
 

How does your MTA deliver the messages to the INBOX, do you use
Dovecor LDA, LMTP or the MTA?

- -- 
Steffen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEVAwUBVEN76nD1/YhP6VMHAQKdygf+JNdSRmEzuUuSzeYTdpBy5lVs9lNVjEP3
WIYbQCySmquUNNxiBGNA/qHqeUol/43JpaoO8Bx3YppPcm/S1pl+oyOkX0GX4Nvu
6XSort0Gk9hPHROTL+xSfXXjwVe1AFJP9V8jjwngl8sAQo467Mn90G4VWlQm37WU
jAgZS8oO/mEkiNJrNAOM14OyeTBGJ6wGsUn0QcUCK7D14At6clDvLzVjVOUdY+sa
ZK6Mgm9FxnatLLsiZ2rM388h8zfhLFnRiW6PT+ksFV0Vch4hA3mNeOHBLy1PU07+
fxs02OU/mAbg5I6uw93XaQZWmCXFcfmrWGTjp9ZhIsy9m7Wf9rQNKQ==
=pUXt
-END PGP SIGNATURE-


Re: Fwd: Re: Wiki advice on running getmail on INBOX access - how does that work?

2014-10-19 Thread Gedalya

On 10/18/2014 05:39 PM, c128 mail wrote:

Bit more investigation...

So - the incrontab rule seems to work to the extent that if I directly 
ls the cur folder on the system then it's triggered.


However, the only way I seem to be able to be able to get it to 
trigger from a mail client (I use both Thunderbird and Roundcube) is 
by performing some sort of action on the mail that's already in the 
folder e.g. shifting mail in/out, marking mail read, reading an 
existing mail (in Roundcube only, for the last one, which I suspect is 
related to Thunderbird and local caching?).


Either way, I can't seem to get it to trigger on just access to the 
folder its monitoring...


Looks like the wiki page may be somewhat outdated.
Try /home/user/Maildir rather than /home/user/Maildir/cur. It seems 
dovecot doesn't actually need to open the cur directory if it doesn't 
seem to have changed since indexes were last updated ... or something 
like that.
As for Thunderbird, my guess is the problem is that it keeps connections 
already open. I guess it doesn't need to actually re-open things when 
you click Get Messages, dovecot uses mmap alot. I've been able to get 
the events to trigger for /Maildir only when a new connection is opened.

It should work for roundcube but perhaps not if you use imapproxy.


Re: sieve folder separator

2014-10-19 Thread Stephan Bosch
On 9/25/2014 8:37 AM, Thomas Koch wrote:
 Hi,

 I'm moving from one email provider (me) to another (mailbox.org) and observed 
 that the new provider uses / instead of . as a folder separator. Now I 
 need to adapt my sieve script.

 It's not too much work and I can even just define a variable at the beginning 
 of my script:

 set SEP /

 But it would be great, if SIEVE would come with a predefined constant for the 
 folder separator. Or does this already exists and I didn't find it?

Currently, there is none. :/

Regards,

Stephan.


Re: Fwd: Re: Wiki advice on running getmail on INBOX access - how does that work?

2014-10-19 Thread c128 mail

Switched to using /home/user/Maildir and, yes, I think you're totally right.

With the changed location:

Roundcube seems to work as it generates much more traffic with Dovecot - 
lots of opening and closing of connections and (when re-armed) the 
incrontab rule is triggered as you would expect it to be.


Thunderbird doesn't work - much less traffic.  You can get it fire the 
command with the ways detailed earlier (manipulating the folder in some 
way from the client), or just opening and closing the application, but 
no from Get Messages or entering the inbox.


Considering the https://github.com/marschap/fetchmail_wakeup approach 
(with its getmail script) - dunno whether that would be any better in 
this respect though?


On 19/10/14 11:25, Gedalya wrote:

On 10/18/2014 05:39 PM, c128 mail wrote:

Bit more investigation...

So - the incrontab rule seems to work to the extent that if I directly
ls the cur folder on the system then it's triggered.

However, the only way I seem to be able to be able to get it to
trigger from a mail client (I use both Thunderbird and Roundcube) is
by performing some sort of action on the mail that's already in the
folder e.g. shifting mail in/out, marking mail read, reading an
existing mail (in Roundcube only, for the last one, which I suspect is
related to Thunderbird and local caching?).

Either way, I can't seem to get it to trigger on just access to the
folder its monitoring...


Looks like the wiki page may be somewhat outdated.
Try /home/user/Maildir rather than /home/user/Maildir/cur. It seems
dovecot doesn't actually need to open the cur directory if it doesn't
seem to have changed since indexes were last updated ... or something
like that.
As for Thunderbird, my guess is the problem is that it keeps connections
already open. I guess it doesn't need to actually re-open things when
you click Get Messages, dovecot uses mmap alot. I've been able to get
the events to trigger for /Maildir only when a new connection is opened.
It should work for roundcube but perhaps not if you use imapproxy.



Re: doveadm-move(1)

2014-10-19 Thread Pascal Volk
On 10/16/2014 09:01 AM, Joseph Tam wrote:
 
 It's Solaris10 nroff, and GNU groff 1.19.1.  Ancient stuff so I wouldn't
 spend too much time looking at it.  It's weird that two independent
 software implementations would do the same thing.

Maybe ancient, but supported until January 2021.
I've reworked the example commands in the manual pages.
http://hg.dovecot.org/dovecot-2.2/rev/dcfb0baba621

Thanks for your input.


Regards,
Pascal
-- 
The trapper recommends today: face1e55.1429...@localdomain.org