Re: [Dovecot] pop for one ip spop for another

2007-07-09 Thread Timo Sirainen
On Mon, 2007-07-09 at 22:29 +0200, arjan wrote:
> Dear all,
> 
> Is it possible to enable pop only for a specific ip and enable spop for
> every other ip?
> I've a vserver in which an application can check mail via pop, but not
> spop. And I don't like to enable pop for the outside world. 

a) Firewall. Probably a better idea.

b) Fail authentication if non-secure authentication comes from outside
world. If you're using SQL as passdb this would be easy. With anything
else probably not. %r and %c variables anyway allow this
(http://wiki.dovecot.org/Variables)



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


Re: [Dovecot] problem with subscriptions file version 1.0.1

2007-07-09 Thread Timo Sirainen
On Fri, 2007-07-06 at 11:49 -0400, Liz wrote:
> The first thing I did was get the configuration file working for 
> Maildir. So I know that the problem has nothing to do with the 
> configuration file. Next I looked through the actual source code to find 
> any place where a dot might be added to the beginning of a folder. It 
> transpired that there is a constant, MAILDIR_FS_SEP_S, which is assigned 
> the value ".". I deleted all the occurrences of this constant, compiled 
> the source code again, and ran into a rather interesting problem.

I hope you noticed also MAILDIR_FS_SEP?

> When I try to create a new folder through Thunderbird on a separate 
> machine, the folder is not visible unless I restart Thunderbird. I 
> checked on the machine acting as a server and the folder is created and 
> the subscriptions file is updated, and the dot at the beginning is 
> indeed absent. So I see no reason why this should not work.

First you could try manually the same thing.

Check that all mailboxes really are listed:

1 LIST "" *

Try creating + subscribing:

2 CREATE mailbox
3 SUBSCRIBE mailbox

Check that it's found from subscriptions:

4 LSUB "" *

And might as well check that LIST also finds it:

5 LIST "" *

If none of that showed anything broken, you could check what Thunderbird
and Dovecot talk with each others and see if there's something wrong
with that. For example use rawlog.
http://dovecot.org/bugreport.html#sniffing

Also if you do this, it might be a good idea to change Dovecot's
internal files to begin with a dot so that user is allowed to create
e.g. "dovecot" mailbox.

#define SUBSCRIPTION_FILE_NAME "subscriptions"
#define MAILDIR_INDEX_PREFIX "dovecot.index"

You should also check that deleting mailboxes works right. There's this:

#define MAILDIR_UNLINK_DIRNAME MAILDIR_FS_SEP_S"DOVECOT-TRASHED"

I'm not sure how it works if you delete the separators. If LIST sees
such a directory it goes and deletes it.


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


Re: [Dovecot] 1.0.1: corrupt index on fresh mailbox, ideas?

2007-07-09 Thread Timo Sirainen
On Mon, 2007-07-09 at 11:45 -0700, Troy Engel wrote:
> A new employee started today, when logging into his new mailbox this 
> morning during a walk-through I got a nasty server error response in 
> Thunderbird - something I never see, DC runs smooth as butter for us. 
> Checking the server log I see this:
> 
> == snip ==
> dovecot: Jul 09 09:38:54 Error: IMAP(xxx): Maildir 
> /home/x/xxx/Maildir sync: UIDVALIDITY changed (1183406107 -> 1183999134)

dovecot-uidlist file had UIDVALIDITY 1183406107 (Mon Jul  2 19:55:07 UTC
2007) and index file had UIDVALIDITY 1183999134 (Mon Jul  9 16:38:54 UTC
2007). This also explains the rest of the errors, Dovecot v1.0 doesn't
handle very nicely these UIDVALIDITY changes (v1.1 does better).

For this to happen:

1. The index files have to be created.

2. dovecot-uidlist file has to be recreated without seeing the existing
index.

3. Accessing mailbox again with the new dovecot-uidlist and old indexes
causes this error.

So the real reasons for these could include temporarily using different
index file paths, restoring indexes/uidlists from backups, temporarily
using index files for accessing other mailbox.



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


Re: [Dovecot] Quota exceeded messages

2007-07-09 Thread Timo Sirainen
On Mon, 2007-07-09 at 17:36 +0100, Frank Church wrote:
>   quota = maildir:storage=10240:messages=1000
..
> Looking at the above settings I assume that 10240 Kb or 1000 messages
> constitute the message limit.

Yes.

> Is there an override on a per mailbox setting in the mailbox folder?

By "mailbox" do you mean users or folders? It's a per-user setting, and
it's possible to override the global quota by having userdb return a
quota field. See the SQL examples in http://wiki.dovecot.org/Quota

> Do Postfix and PostfixAdmin also have their custom settings?
> 
> The problem doesn't appear to apply at the delivery stage, so it
> appears to be something respected by dovecot alone.

If you want to enforce quota, use Dovecot's deliver or some other MDA
that supports Maildir++ quota. Postfix's internal MDA doesn't.



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


Re: [Dovecot] dovecot lda with fetchmail

2007-07-09 Thread JC Júnior

Thank you James...

At least i'm not doing nothing wrong !!



James Turnbull wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
JC Júnior wrote:
  

James Turnbull wrote:


JC Júnior wrote:
  

Hi Don Russel, thank you for you answer...

but , i do not want to use sendmail or postfix, this must be a a
very small system, and users information is on sqlite base, that
postfix or sendmail does not support, i want to deliver from
fetchmail direct to deliver ( if its is possible ).

thanks...  JC júnior



I use fetchmail's --mda option with deliver and sieve to push mail
around with no issues.

Regards

James Turnbull

  

Hi James , thanks for your answer

This is axactly what i want . I using this line in /etc/fetchmailrc

poll pop.server.net protocol pop3 user "[EMAIL PROTECTED]" there with
password "foopass"  mda "/usr/lib/dovecot/deliver -d mail -m
/srv/mail/user1/"

Where /srv/mail/user1/  will be a maildir for user1, but user1 is
not a system account, all maildirs is owned by mail user, and the
user1 password is in a sqlite, but I have this error message:

"MDA retruned nonzero status 75"



Sorry - mine is much less complicated.  I'm just delivering to a local
user.

poll bastion.org with proto POP3
user john there with pass password
options fetchall
mda "/usr/lib/dovecot/deliver"

Regards

James Turnbull

- --
James Turnbull <[EMAIL PROTECTED]>
- ---
Author of Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)

Hardening Linux
(http://www.amazon.com/gp/product/159059/)
- ---
PGP Key (http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x0C42DF40)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFGkrHL9hTGvAxC30ARAkZfAJ9ron34OIWz7p6v4lJBS35JctYwvQCg10Ko

ZNdPbtSZFyjCdwws3I8yJqg=
=51sc
-END PGP SIGNATURE-


  




Re: [Dovecot] dovecot lda with fetchmail

2007-07-09 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
JC Júnior wrote:
> James Turnbull wrote:
>> JC Júnior wrote:
>>> Hi Don Russel, thank you for you answer...
>>>
>>> but , i do not want to use sendmail or postfix, this must be a a
>>> very small system, and users information is on sqlite base, that
>>> postfix or sendmail does not support, i want to deliver from
>>> fetchmail direct to deliver ( if its is possible ).
>>>
>>> thanks...  JC júnior
>>>
>> I use fetchmail's --mda option with deliver and sieve to push mail
>> around with no issues.
>>
>> Regards
>>
>> James Turnbull
>>
> Hi James , thanks for your answer
>
> This is axactly what i want . I using this line in /etc/fetchmailrc
>
> poll pop.server.net protocol pop3 user "[EMAIL PROTECTED]" there with
> password "foopass"  mda "/usr/lib/dovecot/deliver -d mail -m
> /srv/mail/user1/"
>
> Where /srv/mail/user1/  will be a maildir for user1, but user1 is
> not a system account, all maildirs is owned by mail user, and the
> user1 password is in a sqlite, but I have this error message:
>
> "MDA retruned nonzero status 75"
>
Sorry - mine is much less complicated.  I'm just delivering to a local
user.

poll bastion.org with proto POP3
user john there with pass password
options fetchall
mda "/usr/lib/dovecot/deliver"

Regards

James Turnbull

- --
James Turnbull <[EMAIL PROTECTED]>
- ---
Author of Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)

Hardening Linux
(http://www.amazon.com/gp/product/159059/)
- ---
PGP Key (http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x0C42DF40)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFGkrHL9hTGvAxC30ARAkZfAJ9ron34OIWz7p6v4lJBS35JctYwvQCg10Ko
ZNdPbtSZFyjCdwws3I8yJqg=
=51sc
-END PGP SIGNATURE-



Re: [Dovecot] Quota exceeded messages

2007-07-09 Thread Frank Church

On 09/07/07, Frank Church <[EMAIL PROTECTED]> wrote:

When I try to move messages between folders I get 'Quota exceeded' messages.

I installed dovecot without any major configuration and accounts are
created with PostfixAdmin.

Is there some common setting that I must be missing?

Version in use is 1.0 rc26

- Frank



On 09/07/07, Charles Marcus <[EMAIL PROTECTED]> wrote:

Frank Church, on 7/9/2007 11:41 AM, said the following:
> When I try to move messages between folders I get 'Quota exceeded'
> messages.
>
> I installed dovecot without any major configuration and accounts are
> created with PostfixAdmin.
>
> Is there some common setting that I must be missing?
>
> Version in use is 1.0 rc26

Please upgrade to 1.0.1 - there were lots of changes in the last couple
of months leading up to the release, and many of those changes affected
quota support.

Then, if you still have a problem, please report back, and include
dovecot -n output and platform/auth details...

--

Best regards,

Charles



I have my dovecot -n output below.

In any case I want to know more about dovecot configuration, in case
the problem is due to some misconfiguration. A release candidate would
probably be past that stage.

Not to mention that I am afraid of damaging my current setup.

output from dovecot -n

# /usr/local/etc/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot/error_log
info_log_path: /var/log/dovecot/general_log
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
first_valid_uid: 601
last_valid_uid: 601
mail_extra_groups: mail
mail_location: maildir:/var/vmail/%d/%u
maildir_copy_with_hardlinks: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3): outlook-idle
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xu%08Xx
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
user: nobody
verbose: yes
debug: yes
debug_passwords: yes
passdb:
  driver: sql
  args: /etc/dovecot/sql.conf
userdb:
  driver: sql
  args: /etc/dovecot/sql.conf
userdb:
  driver: prefetch
socket:
  type: listen
  client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: mail
  master:
path: /usr/local/var/run/dovecot/auth-master
mode: 432
user: vmail
group: mail
plugin:
quota: maildir:storage=10240:messages=1000
acl: vfile:/etc/dovecot/acls
trash: /etc/dovecot/trash.conf

[EMAIL PROTECTED] rchurch]#


Re: [Dovecot] pop for one ip spop for another

2007-07-09 Thread arjan
Dear all,

Is it possible to enable pop only for a specific ip and enable spop for
every other ip?
I've a vserver in which an application can check mail via pop, but not
spop. And I don't like to enable pop for the outside world. 

Kind regards,
Arjan



Re: [Dovecot] Upgrade from 1.00 to 1.0.1

2007-07-09 Thread Mark Nienberg

Jim Horner wrote:

FWIW, after my upgrade from 1.0.0 -> 1.0.1, I started getting similar error 
messages in my mail.err log but no one is complaining so I figure they are 
harmless.


Jul  5 14:14:08 giganta dovecot: 
IMAP([EMAIL PROTECTED]): /home/h/Maildir/.Development.HUD/dovecot-uidlist: 
Broken header (uidvalidity = 0, next_uid=2)
Jul  5 14:14:08 giganta dovecot: IMAP([EMAIL PROTECTED]): 
Maildir /home/h/Maildir/.Development.HUD sync: UIDVALIDITY changed 
(1168017041 -> 1183659248)


I've been getting these too since upgrading to 1.0.1 but because I have faith in Timo 
I assume that 1.0.1 is fixing some problem caused by the previous 1.0.0 and I have 
not been worrying about it.  No user complaints, and it only seems to happen once per 
 mailbox.


Mark



[Dovecot] 1.0.1: corrupt index on fresh mailbox, ideas?

2007-07-09 Thread Troy Engel
A new employee started today, when logging into his new mailbox this 
morning during a walk-through I got a nasty server error response in 
Thunderbird - something I never see, DC runs smooth as butter for us. 
Checking the server log I see this:


== snip ==
dovecot: Jul 09 09:38:54 Error: IMAP(xxx): Maildir 
/home/x/xxx/Maildir sync: UIDVALIDITY changed (1183406107 -> 1183999134)


dovecot: Jul 09 09:39:06 Error: IMAP(xxx): Corrupted transaction log 
file /var/spool/dovecot/indexes/x/xxx/.INBOX/dovecot.index.log.2: 
invalid indexid (1183406107 != 1183999146)


dovecot: Jul 09 09:39:06 Error: IMAP(xxx): Corrupted index cache 
file /var/spool/dovecot/indexes/x/xxx/.INBOX/dovecot.index.cache: 
indexid changed

== snip ==

Some facts that make this a strange occurrence:

1) new IMAP mailbox, only one email was in it that I had sent last week 
(boilerplate Welcome email)


2) was working perfectly fine on Friday when I set things up 
(Thunderbird and SquirrelMail) and tested with the same client laptop 
and same Thunderbird


3) nothing bad happened with the servers over the weekend, all is 
tip-top - no restarts, reboots, nothing.


4) DC does use NFS mounted maildirs, but there is only one DC accessing 
any maildir - no other servers touch ~/Maildir/. mmap is disabled.


What could be a reason for this index to have gotten corrupted? This is 
the first time I've had an index go corrupt out of all the users, so I'd 
like to try and track down the cause of this...


thx,
-te

== dovecot -n ==
# 1.0.1: /etc/dovecot.conf
log_path: /var/log/dovecot.log
protocols: imap imaps
listen: *
ssl_cert_file: /opt/SSL/server.pem
ssl_key_file: /opt/SSL/server.pem
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
login_process_per_connection: no
mail_location: maildir:~/Maildir:INDEX=/var/spool/dovecot/indexes/%1u/%u
mmap_disable: yes
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
auth default:
  cache_size: 4096
  cache_ttl: 7200
  passdb:
driver: pam
args: cache_key=%u dovecot
  userdb:
driver: passwd
args: blocking=yes
== end ==

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


[Dovecot] Tbird-DC state problem

2007-07-09 Thread Stewart Dean
A experienced sysadmin who's doing some guinea-pig use of DC just ran 
into the following situation:

1) He brings up SeaMonkey
2) About 30 minutes later, he's in the middle of some involved 
messaging, mistakenly hits the redX in the top right of the SeaMonkey 
window,  knocking himself out of SeaMonkey.

3) He immediately reinvokes SeaMonkey, all appeared to be OK
Viewed some e-mail and some web page references, tries to send a message 
and then the Send hung for a time with a message "Sending Authenticate 
Info"..after some minutes, a new E-mail window appeared stating the 
"Server reported a timeout". As far as the message, it was apparently 
sent successfully, and saved in the Sent folder successfully.
4) He  calls me in.  I look through the syslog logging.  There is 
nothing in the  syslog  critical stuff...and everything in the maillog 
looks normal.

5) He starts another message, tries to save it to Drafts and that hangs
6) I look more closely at the maillog and see a lot of logins (one a 
minute in some cases, but all appear to have been cleanly executed) plus 
one bunch of disconnected messages with one disconnected in idle in the 
period when the write to the Drafts would have been hung.


Could it be that DC was in the middle of clean up in the initial 
disconnect/reconnect and SeaMonkey came back in the middle of it and one 
or the other's state tables got messed up (or both of them)?   Shutting 
out of SeaMonkey, waiting a minute and reconnecting seems to have gotten 
things working again.  Any comments? Anything I should be looking for?


OTOH, this is the first real problem I've seen in some person-months of 
testing.


--

Stewart Dean, Unix System Admin, Henderson Computer Resources 
Center of Bard College, Annandale-on-Hudson, New York  12504  
[EMAIL PROTECTED]  voice: 845-758-7475, fax: 845-758-7035




Re: [Dovecot] Quota exceeded messages

2007-07-09 Thread Frank Church

On 09/07/07, Frank Church <[EMAIL PROTECTED]> wrote:

When I try to move messages between folders I get 'Quota exceeded' messages.

I installed dovecot without any major configuration and accounts are
created with PostfixAdmin.

Is there some common setting that I must be missing?

Version in use is 1.0 rc26

- Frank


These are the parts of my configuration I consider relevant

/etc/dovecot.conf


protocol imap {
 mail_plugins = quota imap_quota
 imap_client_workarounds = outlook-idle delay-newmail
}
protocol pop3 {
 mail_plugins = quota
 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
 postmaster_address = [EMAIL PROTECTED]
 mail_plugins = quota
 log_path = /var/log/dovecot-deliver.log
 info_log_path = /var/log/dovecot-deliver.log
}


plugin {
 quota = maildir:storage=10240:messages=1000
 acl = vfile:/etc/dovecot/acls
 trash = /etc/dovecot/trash.conf
}


Looking at the above settings I assume that 10240 Kb or 1000 messages
constitute the message limit.

Is there an override on a per mailbox setting in the mailbox folder?

Do Postfix and PostfixAdmin also have their custom settings?

The problem doesn't appear to apply at the delivery stage, so it
appears to be something respected by dovecot alone.


Re: [Dovecot] dovecot lda with fetchmail

2007-07-09 Thread JC Júnior

James Turnbull wrote:

JC Júnior wrote:

Hi Don Russel, thank you for you answer...

but , i do not want to use sendmail or postfix, this must be a a very 
small system, and users information is on sqlite base, that postfix 
or sendmail does not support, i want to deliver from fetchmail direct 
to deliver ( if its is possible ).


thanks...  JC júnior

I use fetchmail's --mda option with deliver and sieve to push mail 
around with no issues.


Regards

James Turnbull


Hi James , thanks for your answer

This is axactly what i want . I using this line in /etc/fetchmailrc

poll pop.server.net protocol pop3 user "[EMAIL PROTECTED]" there with 
password "foopass"  mda "/usr/lib/dovecot/deliver -d mail -m 
/srv/mail/user1/"


Where /srv/mail/user1/  will be a maildir for user1, but user1 is not a 
system account, all maildirs is owned by mail user, and the user1 
password is in a sqlite, but I have this error message:


"MDA retruned nonzero status 75"


Can you paste me you line???


Thanks for all ,

JC Júnior





[Dovecot] Quota exceeded messages

2007-07-09 Thread Frank Church

When I try to move messages between folders I get 'Quota exceeded' messages.

I installed dovecot without any major configuration and accounts are
created with PostfixAdmin.

Is there some common setting that I must be missing?

Version in use is 1.0 rc26

- Frank


Re: [Dovecot] PHP implementation of dovecotpw passwords

2007-07-09 Thread Frank Church

On 19/03/07, Frank Church <[EMAIL PROTECTED]> wrote:

I am looking for PHP functions that implement passwords that much the
dovecotpw implementation.

I downloaded one from PEAR, Crypt_HMAC, but the passwords  it
generates look nothing like the dovecotpw passwords, which could be my
fault because I know nothing about the field.

Is there a guide or some library that implements them to match dovecotpw?



After some further experimenting and checking the logs I managed to
discover the problem.
Setting the default_pass_scheme in /etc/dovecot/sql.conf fixed the problem

Apparently the password scheme used by PostfixAdmin is the MD5-CRYPT
type, but I suspect there could be still some issues with password
comparision generation in some of its other modules

/etc/dovecot/sql.conf
=
default_pass_scheme = MD5-CRYPT


Re: [Dovecot] dovecot lda with fetchmail

2007-07-09 Thread James Turnbull

JC Júnior wrote:

Hi Don Russel, thank you for you answer...

but , i do not want to use sendmail or postfix, this must be a a very 
small system, and users information is on sqlite base, that postfix or 
sendmail does not support, i want to deliver from fetchmail direct to 
deliver ( if its is possible ).


thanks...  JC júnior

I use fetchmail's --mda option with deliver and sieve to push mail 
around with no issues.


Regards

James Turnbull

--
James Turnbull <[EMAIL PROTECTED]>
---
Author of Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)

Hardening Linux
(http://www.amazon.com/gp/product/159059/)
---
PGP Key (http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x0C42DF40)