Re: [Dovecot] --exec-mail

2010-11-11 Thread David Woodhouse
On Fri, 2010-11-12 at 01:52 +, Timo Sirainen wrote:
> > Once upon a time in the dim and distant past, I believe I used to
> > run /usr/libexec/dovecot/imap directly. But that doesn't set the
> > environment up correctly, so isn't the right way to do it... is it?
> 
> 
> Nowadays it does. 

Ah, right.

If I create ~/Maildir/{cur,new,tmp} manually, then running
/usr/libexec/dovecot/imap does actually work.

(I did have a ~/Maildir on this test machine, but it only included one
mailing list folder which I'd been using as a test case for a QRESYNC
bug a few months ago.)

Thanks.

-- 
dwmw2



Re: [Dovecot] --exec-mail

2010-11-11 Thread Timo Sirainen
On 12.11.2010, at 1.47, David Woodhouse wrote:

> Most of my IMAP access is achieved by
> 'ssh $mailhost exec dovecot --exec-mail imap'.

Just run imap binary.

> I'm testing Dovecot 2.0, and this doesn't seem to work any more — and I
> can't seem to work out how to make it work. The wiki page at
> http://wiki2.dovecot.org/Upgrading/2.0 has no mention of it.

Added.

> Once upon a time in the dim and distant past, I believe I used to
> run /usr/libexec/dovecot/imap directly. But that doesn't set the
> environment up correctly, so isn't the right way to do it... is it?


Nowadays it does.



[Dovecot] --exec-mail

2010-11-11 Thread David Woodhouse
Most of my IMAP access is achieved by
'ssh $mailhost exec dovecot --exec-mail imap'.

I'm testing Dovecot 2.0, and this doesn't seem to work any more — and I
can't seem to work out how to make it work. The wiki page at
http://wiki2.dovecot.org/Upgrading/2.0 has no mention of it.

I looked through the git history to find the commit that broke it and
see if I could find the replacement that way, but it was the commit
entitled 'Initial commit for v2.0 master rewrite.', and wasn't
particularly edifying.

Once upon a time in the dim and distant past, I believe I used to
run /usr/libexec/dovecot/imap directly. But that doesn't set the
environment up correctly, so isn't the right way to do it... is it?

-- 
dwmw2



[Dovecot] [OT] Copying command output to clipboard (was: Re: setting up Dovecot)

2010-11-11 Thread Markus Schönhaber
12.11.2010 00:35, Scott Berry:

> I attached the dovecot.conf file as a screenshot using dovecot -n
> because I am blind and haven't quite figured out how to copy from the
> terminal to Gnome yet.

Don't know if that helps, but
dovecot -n | xclip -selection clipboard
would send the output of "dovecot -n" to the clipboard and you could
paste it to your evolution compose window.
xclip is in the Ubuntu repositories.

-- 
Regards
  mks


Re: [Dovecot] Dovecot 2.0.7 Virtual plugin

2010-11-11 Thread Henrique Fernandes
It works as i Said!


[]'sf.rique


On Thu, Nov 11, 2010 at 12:49 AM, Henrique Fernandes wrote:

> As it turns out, i seens to be a client problem, and an miss understando
> problem.
>
> Using only one namespace this folder ABCD will be under folder virtual
> right ?
>
> I guess for each virtual folder i have to create an namespace so it does
> not apear under any folder righ ?
>
> i mean this.
>
> ABCD ad EFGH will be virtual so for achive this setup need to be 2
> namespaces with prefix ABCD and EFGH right ?
>
> Inbox
> Spam
> ABCD
> EFGH
>
> Other wise would turns out like this: right ? if i use only one namespace
> with prefix vrtual and create both folder in it..
>
> Inbox
> Spam
> virtual
>   -ABCD
>   -EFGH
>
> so, folders ABCD and EFGH will be inside folder virtual correct ?
>
>
> []'sf.rique
>
>
> On Thu, Nov 11, 2010 at 12:41 AM, Timo Sirainen  wrote:
>
>> On 11.11.2010, at 2.35, Henrique Fernandes wrote:
>>
>> > sfri...@hornet:~/TesteEmail$ find /home/sfrique/TesteEmail/virtual/
>> > /home/sfrique/TesteEmail/virtual/
>> > /home/sfrique/TesteEmail/virtual/dovecot.index
>> > /home/sfrique/TesteEmail/virtual/dovecot.index.log
>> > /home/sfrique/TesteEmail/virtual/dovecot-virtual
>> > /home/sfrique/TesteEmail/virtual/ABCD
>> > /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual
>>
>> Looks ok.
>>
>> > sfri...@hornet:~/TesteEmail$ cat
>> /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual
>> > # ~/TesteEmail/Maildir/virtual/ABCD/dovecot-virtual
>> >
>> > *
>>
>> This shows as if there's an empty line as the file's first line?
>> (shouldn't be)
>>
>> Anyway, all looks ok. ABCD should show up in list. Are you sure it's not a
>> client/subscription problem? Try talking IMAP protocol directly and check
>> what the LIST command shows: http://wiki2.dovecot.org/TestInstallation
>
>
>


[Dovecot] Authentication Failure

2010-11-11 Thread Carlos Mennens
I am unable to login to my new mail server running Dovecot and Postfix
for some reason. When I check the mail logs, I am seeing:

Nov 11 16:06:29 mail dovecot: imap-login: Disconnected (no auth
attempts): rip=10.1.10.204, lip=192.168.0.200, TLS handshaking:
SSL_accept() failed: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1
alert unknown ca: SSL alert number 48
Nov 11 16:06:36 mail dovecot: auth: Error: pam(carlos,10.1.10.204):
pam_authenticate() failed: Authentication failure (/etc/pam.d/dovecot
missing?)
Nov 11 16:06:53 mail dovecot: imap-login: Disconnected (auth failed, 3
attempts): user=, method=PLAIN, rip=10.1.10.204,
lip=192.168.0.200, TLS
Nov 11 16:07:12 mail dovecot: imap-login: Disconnected (auth failed, 3
attempts): user=, method=PLAIN, rip=10.1.10.204,
lip=192.168.0.200, TLS

Below is my configuration file for Dovecot:

# 2.0.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.35 x86_64
auth_mechanisms = plain login
mail_location = maildir:~/mail
passdb {
  driver = pam
}
protocols = imap
service auth {
  unix_listener auth-client {
group = postfix
mode = 0660
user = postfix
  }
  user = root
}
ssl_cert = 

Re: [Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap

2010-11-11 Thread Giam Teck Choon



On 11/12/2010 04:46 AM, Timo Sirainen wrote:

On 11.11.2010, at 19.24, Giam Teck Choon wrote:


Will v1.2.16 works with the same options?  Like below?

/usr/libexec/dovecot/imap -O -o mail_location=blah... ...


Nope.



Thanks and already tested... it is not working for v1.

Kindest regards,
Giam Teck Choon



Re: [Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap

2010-11-11 Thread Timo Sirainen
On 11.11.2010, at 19.24, Giam Teck Choon wrote:

> Will v1.2.16 works with the same options?  Like below?
> 
> /usr/libexec/dovecot/imap -O -o mail_location=blah... ...

Nope.



Re: [Dovecot] v1.2.16 released

2010-11-11 Thread Stephan Bosch

Op 8-11-2010 20:48, Timo Sirainen schreef:

http://dovecot.org/releases/1.2/dovecot-1.2.16.tar.gz
http://dovecot.org/releases/1.2/dovecot-1.2.16.tar.gz.sig



Refreshed the ManageSieve patch:

http://www.rename-it.nl/dovecot/1.2/dovecot-1.2.16-managesieve-0.11.12.diff.gz
http://www.rename-it.nl/dovecot/1.2/dovecot-1.2.16-managesieve-0.11.12.diff.gz.sig

Regards,

Stephan.


Re: [Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap

2010-11-11 Thread Giam Teck Choon

I noticed v2.0.7 is not using $MAIL environment variable to override
mail_location?


-o mail_location=blah




Ha... so simple and tested... works!



Will v1.2.16 works with the same options?  Like below?

/usr/libexec/dovecot/imap -O -o mail_location=blah... ...

8<--8<--8<--8<-
#!/bin/sh

if [ -n "$MAIL" ] ; then
export MAIL=maildir:`echo $MAIL | sed 's@:@::@g'`
fi
exec "$@" -O -o mail_location=$MAIL
8<--8<--8<--8<-

Where $@ is actually /usr/libexec/dovecot/imap.

Thanks.

Kindest regards,
Giam Teck Choon


Re: [Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap

2010-11-11 Thread Giam Teck Choon

Hi Timo,

On 11/12/2010 02:53 AM, Timo Sirainen wrote:

On 11.11.2010, at 18.50, Giam Teck Choon wrote:


However, same trick can't be used for dovecot v2.0.7.  First error is 
/etc/dovecot/dovecot.conf must be exists so I just simply touch 
/etc/dovecot/dovecot.conf with empty content to bypass that error.


-O parameter avoids that.


Ok :)




  I noticed v2.0.7 is not using $MAIL environment variable to override 
mail_location?


-o mail_location=blah




Ha... so simple and tested... works!

Many thanks.

Kindest regards,
Giam Teck Choon


Re: [Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap

2010-11-11 Thread Timo Sirainen
On 11.11.2010, at 18.50, Giam Teck Choon wrote:

> However, same trick can't be used for dovecot v2.0.7.  First error is 
> /etc/dovecot/dovecot.conf must be exists so I just simply touch 
> /etc/dovecot/dovecot.conf with empty content to bypass that error.

-O parameter avoids that.

>  I noticed v2.0.7 is not using $MAIL environment variable to override 
> mail_location?

-o mail_location=blah




[Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap

2010-11-11 Thread Giam Teck Choon

Hi,

For the past day, I have been researching about making dovecot to 
support mailfront (http://untroubled.org/mailfront/) imapfront-auth 
natively and able to use mailfront imapfront-auth with dovecot imap 
v1.2.16 without starting any dovecot related services and no 
/etc/dovecot.conf file is required.


More information about this can be read at:

http://lists.untroubled.org/?list=bgware&cmd=showthread&month=201011&threadid=elpfjlnilcganfkokehg

However, same trick can't be used for dovecot v2.0.7.  First error is 
/etc/dovecot/dovecot.conf must be exists so I just simply touch 
/etc/dovecot/dovecot.conf with empty content to bypass that error.  I 
noticed v2.0.7 is not using $MAIL environment variable to override 
mail_location?


I have read the following:

http://wiki2.dovecot.org/MailLocation

Any idea to override mail_location setting?  I have tried various 
setting of environment variables such as below:


8<--8<--8<--8<-
#!/bin/sh

# $MAIL, $HOME, $MAILDIR, $MAILBOX are the same in mailfront
# imapfront-auth
if [ -n "$MAIL" ]; then
  # make dovecot imap escape colon by replacing single : to ::
  export MAIL=maildir:`echo $MAIL | sed 's@:@::@g'`
fi
export USERDB_KEYS="$USERDB_KEYS mail"
# For knowing all env. uncomment the below line and
# see /tmp/imapd-log.txt
# printenv >>/tmp/imapd-log.txt
exec "$@"
8<--8<--8<--8<-

The above script is being placed between imapfront-auth and dovecot imap 
(/usr/libexec/dovecot/imap).


Thanks for any kind assistance.

Kindest regards,
Giam Teck Choon


Re: [Dovecot] dovecot dictionary attacks

2010-11-11 Thread Timo Sirainen
On 11.11.2010, at 17.57, PA wrote:

> Yes postfix is configured for SASL so the spammer ip was able to relay email
> after it obtained the account info. 

Postfix supports Cyrus SASL and Dovecot SASL. You didn't specify which one..

> My concern is how the spammer got the user/pass in the 1st place since
> nowhere on the dovecot logs do I see that particular user attempting to
> login with the wrong/correct password etc. I should be able to see all login
> attempts correct if the user/pass was obtained through a dict. attack? Is
> that's the case then most likely the user/password was obtained from the
> user's PC and not guessed on the mail server. I am trying to make sense of
> what happened and to make sure im not overlooking something on dovecot. 

Yes, all login attempts via Dovecot are logged, but only if you have 
auth_verbose=yes.

If your Postfix authentications went through Cyrus SASL, then I don't know what 
it logs.



Re: [Dovecot] dovecot dictionary attacks

2010-11-11 Thread PA
Timo,

Yes postfix is configured for SASL so the spammer ip was able to relay email
after it obtained the account info. 
My concern is how the spammer got the user/pass in the 1st place since
nowhere on the dovecot logs do I see that particular user attempting to
login with the wrong/correct password etc. I should be able to see all login
attempts correct if the user/pass was obtained through a dict. attack? Is
that's the case then most likely the user/password was obtained from the
user's PC and not guessed on the mail server. I am trying to make sense of
what happened and to make sure im not overlooking something on dovecot. 

-Original Message-
From: Timo Sirainen [mailto:t...@iki.fi] 
Sent: Wednesday, November 10, 2010 8:22 PM
To: PA
Cc: dovecot@dovecot.org
Subject: Re: [Dovecot] dovecot dictionary attacks


On 10.11.2010, at 23.03, PA wrote:

> However on my smtp mail server that ip is already sending out all sorts of
> spam with the sasl username of Paramus. This username Paramus never shows
up
> on the dovevot dictionary attack, as a matter of fact the user Paramus is
> nowhere to be found on the dovecot log at all and I have logs going back
> months. 
> 
> I'm just not sure how they guess the username/password as its not on any
> logs that goes back months and I don't have a dovecot record for that
user. 

Well, probably obvious, but since you didn't explicitly say: You have
configured Postfix to use Dovecot for authentication, not Cyrus SASL,
right?..



[Dovecot] version_ignore=yes

2010-11-11 Thread interfaSys sàrl
Hello,
When upgrading Dovecot, I get this:
Dovecot version mismatch: Master is v2.0.6, imap-login is v2.0.7 (if you
don't care, set version_ignore=yes)

This should not occur as version_ignore=yes is in dovecot.conf, at the top.

Cheers,

Olivier


Re: [Dovecot] Sieve problem with managesieve

2010-11-11 Thread Michael Kliewe

Hi,

"header :is From"  compares against the whole From: header. You only  
want to test the containing email address. See


address
This lets you match on only an address field's email address, not its  
associated name. For example, I could send an email as "John Smith" >. The test header "From" :is "jsm...@example.com" would be false  
because that is not the entire header. But address "From" :is "jsm...@example.com 
" would be true because that is the entire address.


Check the RFC and search for "address", there you will find  
explanations and examples

http://www.faqs.org/rfcs/rfc3028.html

Michael


On Nov 11, 2010, at 11:13 AM, Simone Caruso wrote:


On 10/11/2010 21:14, A.L.E.C wrote:

On Wed, 10 Nov 2010 19:01:02 +0100, Simone Caruso wrote:

I have a problem with a sieve script..
my config is dovecot 1.2.15 with managesieve, and roundcube.
if anyof (header :contains "From" "x...@example.com")
if anyof (header :is "From" "t...@ardeek.com")


":is" is an absolute match, ":contains" is a substring match.

http://tools.ietf.org/html/rfc5228#section-2.7.1

Of course, but with the SAME header "From:" ( From: "AA" > for example) :contains match but :is

_don't_ match... i don't understand the reason :/

For my logic "if anyof (header :is "From" "x...@example.com")" should  
match "From: "AA" ", but in practice that script  
don't.


--
Simone Caruso
IT Consultant
p.iva: 03045250838




Re: [Dovecot] Sieve problem with managesieve

2010-11-11 Thread Simone Caruso

On 10/11/2010 21:14, A.L.E.C wrote:

On Wed, 10 Nov 2010 19:01:02 +0100, Simone Caruso wrote:

I have a problem with a sieve script..
my config is dovecot 1.2.15 with managesieve, and roundcube.
if anyof (header :contains "From" "x...@example.com")
if anyof (header :is "From" "t...@ardeek.com")


":is" is an absolute match, ":contains" is a substring match.

http://tools.ietf.org/html/rfc5228#section-2.7.1


Of course, but with the SAME header "From:" ( From: "AA"  for 
example) :contains match but :is
_don't_ match... i don't understand the reason :/

For my logic "if anyof (header :is "From" "x...@example.com")" should match "From: "AA" ", but in 
practice that script don't.


--
Simone Caruso
IT Consultant
p.iva: 03045250838