Re: [Dovecot] Why can NOT login as root

2011-09-10 Thread John Allen

As far as I recall, IMAP servers generally don't allow access to root.

According to the Dovecot wiki, this is hard-coded in the binary:
http://wiki.dovecot.org/MainConfig
see under "first_valid_uid"

If the root user is receiving emails, these need to be redirected to another 
user so they can be read via IMAP.

John

On 10/09/2011 10:04, jana1...@centrum.cz wrote:

Hi i use Dovecot and it works ok for users except for root user.
It is impossible to login as  root
Here is a log


Sep 10 10:15:44 auth: Debug: Loading modules from directory:
/usr/local/lib/dovecot/auth
Sep 10 10:15:44 auth: Debug: auth client connected (pid=18077)
Sep 10 10:15:44 auth: Debug: client in: AUTH1   PLAIN   service=imap
secured lip=212.97.133.82   rip=212.97.133.82   lport=143   
rport=34645 resp=
Sep 10 10:15:44 auth: Debug: Loading modules from directory:
/usr/local/lib/dovecot/auth
Sep 10 10:15:44 auth: Debug: pam(root,212.97.133.82): lookup service=dovecot
Sep 10 10:15:44 auth: Debug: pam(root,212.97.133.82): #1/1 style=1
msg=Password:
Sep 10 10:15:44 auth: Debug: client out: OK 1   user=root
Sep 10 10:15:44 auth: Debug: master in: REQUEST 2889482241  18077   1   
3500554cf70742dfc0515671c7671bbd
Sep 10 10:15:44 auth: Debug: passwd(root,212.97.133.82): lookup
Sep 10 10:15:44 auth: Debug: master out: USER   2889482241  root
system_groups_user=root uid=0   gid=0   home=/root
Sep 10 10:15:44 imap-login: Info: Login: user=, method=PLAIN,
rip=212.97.133.82, lip=212.97.133.82, mpid=18082, secured
Sep 10 10:15:44 imap: Error: user root: Invalid settings in userdb: userdb
returned 0 as uid
Sep 10 10:15:44 imap: Error: Invalid user settings. Refer to server log for
more information.


Can anyone help?
Thanks
LL.





[Dovecot] Sieve, before script - Can it include "personal" scripts?

2011-09-10 Thread Steve Fatula
Using sieve_before, can the script it references include a file from the 
personal space?

I want to set some parameters (by user using the variables extension) there to 
control what the before script does, so, every user would have the file in 
their personal include space.

If not, is there another way?

Can the sieve_before and sieve_global_path be set from userdb extra fields?


Re: [Dovecot] MySQL, map files

2011-09-10 Thread Steve Fatula
- Original Message -

> From: Steve Fatula 
> To: Dovecot List 
> Cc: 
> Sent: Thursday, September 8, 2011 6:52 PM
> Subject: [Dovecot] MySQL, map files
> 
> I'll try and break up my questions the other day about extdata that went 
> unanswered into pieces in the hopes it will be more specific and clear.
> 
> In general, I am trying to figure out the syntax of the map statement and 
> what 
> is allowed in that statement. So, by map statement, I mean for example 
> perhaps 
> the dovecot-dict-expire.conf.ext file as shown in the doc. Is the syntax the 
> same for the various types of files (quota vs expire)? Is there syntax to 
> allow 
> the specification of a different key? If so, where is this documented. I have 
> an 
> existing table I want to use, not the table shown in the doc.
> 
> The reason I am asking is I have seen web pages that reference all sorts of 
> statements within the map statement, and I have no idea where they are 
> documented. Specifically, I see an example here (which is LDAP), look in 
> section 
> 3:
> 
> http://dovecot.org/patches/1.2/ldap/HOWTO_dictldap+extdata.txt
> 
> 
> You will see lots of statements, not sure which ones can be used for MySQL 
> (instead of LDAP). So, would like to find a list of ALL valid syntax within 
> the 
> map.
>

I am guessing no one knows the answer then. Oh well, will have to give up on it 
then as it is un-documented.


[Dovecot] sieve and pattern matching

2011-09-10 Thread David Newman
Dovecot 1.2.17

What is the sieve syntax for matching text somewhere in a subject line,
but not at the beginning of the line?

Background: Multiple machines each send a message with the subject of
" operations run" to a mail server. The  value is
different for each sender.

This sieve filter does not match any message:

require
["fileinto","envelope","reject","vacation","imapflags","relational","co
mparator-i;ascii-numeric","regex","notify"];
require ["body", "fileinto",  "regex"];

# currentops reports
if header :contains "Subject" ".* operations run"
{
fileinto "currentops";
stop;
}

However, a similar filter will match if, and only if, the string occurs
at the beginning of the subject line.

The various sieve help pages I've found suggest that pattern matching
anywhere in the subject line should work, not just at the beginning. How
to achieve this?

TIA

dn



Re: [Dovecot] BestPractice to migrate imap mailbox from one machine to another

2011-09-10 Thread Michael Orlitzky
On 09/09/11 09:34, Tobias Hachmer wrote:
> On Fri, 09 Sep 2011 15:22:54 +0200, Robert Schetterer wrote:
>> Am 09.09.2011 15:14, schrieb Tobias Hachmer:
>>> What is the best way to copy the existing mailboxes from the older
>>> machine running dovecot v1.2.15 to the new naked machine?
>>
>> i used imapsync in a bash script
>> http://ks.lamiral.info/imapsync/
>> at a massive migration
> 
> ok, but this tool is not free of charge.
> Are there any known problems just copying the mailboxes with scp or 
> rsync?
> 

https://fedorahosted.org/released/imapsync/


Re: [Dovecot] BestPractice to migrate imap mailbox from one machineto another

2011-09-10 Thread David Favor

Johan Hendriks wrote:

Tobias Hachmer schreef:

Hi list,

currently I use dovecot v1.2.15 with maildir++ mailboxes. (Debian 
Squeeze)
I want to set up a different server with dovecot v2, also maildir++ 
mailboxes. (also Debian Squeeze)


What is the best way to copy the existing mailboxes from the older 
machine running dovecot v1.2.15 to the new naked machine?


Greetz, Tobias

I did the same thing, with no know issues so far.

My old server was running dovecot 1.2.x and i coppied the whole maildir 
structure to the other machine.

Then started Dovecot 2.x and all was fine.

Should be the same as instlling 2.0 over the old 1.2.x version, then it 
uses the old maildir also.


Well test it i would say.
Just do the copy, and try if everything works.
then do it for a final migration.

Gr
Johan Hendriks


Yes.

So long as you're using same file structure, just tar + compress your
Maildir hierarchy + scp it to your new machine + untar/uncompress...

You'll be good to go.

--
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!


Re: [Dovecot] mysql auth failover failing

2011-09-10 Thread Noel Butler
On Fri, 2011-09-09 at 20:16 -0700, Paul B. Henson wrote:

> On Fri, Sep 09, 2011 at 08:02:57PM -0700, Noel Butler wrote:



> > suggest, having just one master server, after all, dovecot and postfix
> > just need to read, not alter/update/insert etc.
> 
> True; but the pieces that are altering/updating/inserting the data that
> postfix/dovecot need to read need redundancy as well :).
>  


Yep, depends on your network design I suppose, I rather leave the front
ends to be just that, with all interactions with master DB server and
the NAS done via second  interface on a dedicated private LAN so those
nasty bored teenagers out there can't get near it :) 


> > yep thats correct because it has " gone away" but it still uses the
> > second host immediately, thats just dovecot trying to re-establish its
> > link with primary
> 
> Based on my testing, it doesn't use the second host immediately, but
> only sporadically, with most of the authentications failing.


Sounds like you have bigger issues, maybe relating as to why the primary
fails?


>  
> > err postfix is not dovecot, you need to also add failover in postfix's
> > sql lookup commands
> 
> postfix relies on dovecot for authentication, this postfix error message
> is the result of dovecot not successfully processing an authentication
> request. postfix itself handles mysql failure well, it both load
> balances queries across both servers and also continues to function when
> one isn't available.
> 


my bad, I did see that and it is as how I do it (i'm not all there at
present, had the flu for a week g) but I never had a situation where
primary (local slave copy) has gone away unless I'm deliberately
upgrading mysql ) when doing so (tested) it hits the master server (as
in secondary host=) right away, no auth failures.


Cheers

<>

signature.asc
Description: This is a digitally signed message part


[Dovecot] Annoying "feature" in dovecot/pidgeonhole - include depth limitation

2011-09-10 Thread Mihai Moldovan
Hi all,

I'm using dovecot 2.0.14 build on Debian.

The maintainers obviously patch the dovecot source so that it uses the
pidgeonhole sieve system.

Today I ran into a very annoying issue: I created several sieve scripts
and interlinked via the include command, only to find dovecot spewing
this error message at me:
SWREG Newsletter: line 14: error: cannot nest includes deeper than 10
levels.

As far as I could see this limitation is hardcoded to a depth of 10 and
can only be changed at compile time.

Why is it in place? I understand that you CAN create loops via the
include command and limiting the inclusion depth is a way to circumvent
loops - but ten is a very low value and the fact that you can't change
it via a config file or sorta is even worse.

My "fix" so far has been ignoring this, i.e. not returning false. I'm
pretty sure that's not the best way to do it but it seems to be working
so far.

I'd really like to hear your opinion on this issue.

Best regards,


Mihai
**



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] Why can NOT login as root

2011-09-10 Thread Pascal Volk
On 09/10/2011 10:04 AM jana1...@centrum.cz wrote:
> Hi i use Dovecot and it works ok for users except for root user.
> It is impossible to login as  root 
> Here is a log
> …
> Sep 10 10:15:44 imap: Error: user root: Invalid settings in userdb: userdb 
> returned 0 as uid
> Sep 10 10:15:44 imap: Error: Invalid user settings. Refer to server log for 
> more information.
> 
> 
> Can anyone help?


http://hg.dovecot.org/dovecot-1.2/file/02c2ac9ddf8c/dovecot-example.conf:

   374 # Valid UID range for users, defaults to 500 and above. This is mostly
   375 # to make sure that users can't log in as daemons or other system users.
   376 # Note that denying root logins is hardcoded to dovecot binary and can't
   377 # be done even if first_valid_uid is set to 0.


Regards,
Pascal
-- 
The trapper recommends today: cafebabe.1125...@localdomain.org


[Dovecot] Why can NOT login as root

2011-09-10 Thread jana1972
Hi i use Dovecot and it works ok for users except for root user.
It is impossible to login as  root 
Here is a log


Sep 10 10:15:44 auth: Debug: Loading modules from directory: 
/usr/local/lib/dovecot/auth
Sep 10 10:15:44 auth: Debug: auth client connected (pid=18077)
Sep 10 10:15:44 auth: Debug: client in: AUTH1   PLAIN   service=imap
secured lip=212.97.133.82   rip=212.97.133.82   lport=143   
rport=34645 resp=
Sep 10 10:15:44 auth: Debug: Loading modules from directory: 
/usr/local/lib/dovecot/auth
Sep 10 10:15:44 auth: Debug: pam(root,212.97.133.82): lookup service=dovecot
Sep 10 10:15:44 auth: Debug: pam(root,212.97.133.82): #1/1 style=1 
msg=Password: 
Sep 10 10:15:44 auth: Debug: client out: OK 1   user=root
Sep 10 10:15:44 auth: Debug: master in: REQUEST 2889482241  18077   1   
3500554cf70742dfc0515671c7671bbd
Sep 10 10:15:44 auth: Debug: passwd(root,212.97.133.82): lookup
Sep 10 10:15:44 auth: Debug: master out: USER   2889482241  root
system_groups_user=root uid=0   gid=0   home=/root
Sep 10 10:15:44 imap-login: Info: Login: user=, method=PLAIN, 
rip=212.97.133.82, lip=212.97.133.82, mpid=18082, secured
Sep 10 10:15:44 imap: Error: user root: Invalid settings in userdb: userdb 
returned 0 as uid
Sep 10 10:15:44 imap: Error: Invalid user settings. Refer to server log for 
more information.


Can anyone help?
Thanks
LL.