v2.3.17 quota-dict related sql errors

2021-12-04 Thread Pascal Volk
Hi there,

I've updated Dovecot from v2.3.14 (cee3cbc0d) to v2.3.17 (e2aa53df5b).
Right after the update, dovecot begun flooding the mail.log and
PostgreSQL's log.

My dict sql configuration:
,--[ .../dovecot/dovecot-dict-sql.conf.ext ]--
| map {
|   pattern = priv/quota/storage
|   table = userquota
|   username_field = uid
|   value_field = bytes
| }
| map {
|   pattern = priv/quota/messages
|   table = userquota
|   username_field = uid
|   value_field = messages
| }
`--

This worked for decades. Since the update dovecot is passing the user's
email address, instead the user's UID to the query. And therefor I have
lots of errors in the log files: see attached `mail.log' and
`postgresql-14-main.log' excerpts.

The `userquota' table looks like this:

  Table "public.userquota"
  Column  |  Type   | Collation | Nullable | Default
--+-+---+--+-
 uid  | bigint  |   | not null |
 bytes| bigint  |   | not null | 0
 messages | integer |   | not null | 0
...
Foreign-key constraints:
"fkey_userquota_uid_users" FOREIGN KEY (uid) REFERENCES users(uid)
ON DELETE CASCADE

(full database structure:
https://bitbucket.org/pvo/vmm/src/vmm-0.7.0/pgsql/create_tables.pgsql)


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknownDec  2 00:44:22 host dovecot: lmtp(u...@localhost.localdomain.org)<289601>: Error: lmtp-server: conn [2001:db8::143]:38119 [1]: rcpt user+dove...@localhost.localdomain.org: quota-dict: Quota update failed: dict-server returned failure: sql dict: commit failed: ERROR:  invalid input syntax for type bigint: "u...@localhost.localdomain.org"
Dec  2 00:44:22 host dovecot: lmtp: Error: LINE 1: ...bytes=bytes+12758,messages=messages+1 WHERE uid = 'user@loca...
Dec  2 00:44:22 host dovecot: lmtp: Error:  ^ (reply took 0.074 secs (0.074 in dict wait, 0.000 in other ioloops, 0.000 in locks, async-id reply 0.018 secs ago, started on dict-server 0.051 secs ago, took 0.051 secs)) - Quota is now desynced
2021-12-01 23:44:22 GMT ERROR:  invalid input syntax for type bigint: "u...@localhost.localdomain.org" at character 72
2021-12-01 23:44:22 GMT STATEMENT:  UPDATE userquota SET bytes=bytes+12758,messages=messages+1 WHERE uid = 'u...@localhost.localdomain.org'


Re: v2.3.17 quota-dict related sql errors

2021-12-18 Thread Pascal Volk
On 2021-12-04 22.18, I wrote:
> Hi there,
> 
> I've updated Dovecot from v2.3.14 (cee3cbc0d) to v2.3.17 (e2aa53df5b).
> Right after the update, dovecot begun flooding the mail.log and
> PostgreSQL's log.
> ...
just in case someone has missed `doveconf -n` output and SQL related
configuration files, they are attached now.

Let me know if you have any questions.


Regards,
Pascal
-- 
The trapper recommends today: face1e55.2135...@localdomain.org# 2.3.17 (e2aa53df5b): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.17 (054dddfa)
# OS: Linux 5.15.0-2-amd64 x86_64 Debian bookworm/sid 
# Hostname: host.example.org
auth_mechanisms = plain login cram-md5
auth_verbose = yes
auth_verbose_passwords = plain
base_dir = /var/run/dovecot
debug_log_path = /var/log/dovecot_dbg.log
dict {
  quota = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_gid = 7
first_valid_uid = 7
hostname = mail.example.org
import_environment = TZ CORE_OUTOFMEM=yeah CORE_ERROR=1
listen = 203.0.113.143, 127.0.0.1, ::1, 2001:db8::143
lmtp_save_to_detail_mailbox = yes
login_access_sockets = tcpwrap
mail_access_groups = dovemail
mail_location = mdbox:~/mdbox
mail_plugins = quota old_stats zlib
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date index ihave duplicate 
mime foreverypart extracttext
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  mailbox name {
special_use = \Drafts \Junk \Sent \Trash
  }
  prefix = 
  separator = /
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  old_stats_refresh = 1min
  quota = dict:user:%{uid}:noenforcing:proxy::quota
  quota_rule = *:storage=2G:messages=0
  quota_rule2 = Trash:storage=+100M
  recipient_delimiter = +
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  zlib_save = bz2
  zlib_save_level = 6
}
postmaster_address = postmas...@example.org
protocols = lmtp pop3 imap sieve
service auth-worker {
  unix_listener auth-worker {
group = $default_internal_user
mode = 0660
user = doveauth
  }
  user = doveauth
}
service auth {
  client_limit = 1425
  unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0600
user = postfix
  }
  user = doveauth
}
service dict {
  idle_kill = 150 secs
  unix_listener dict {
group = dovemail
mode = 0660
  }
}
service imap-login {
  process_limit = 256
}
service imap {
  process_limit = 256
}
service lmtp {
  executable = lmtp -D
  inet_listener lmtp {
address = ::1 127.0.0.1
port = 24
  }
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service old-stats {
  executable = old-stats
  fifo_listener old-stats-mail {
mode = 0666
  }
  fifo_listener old-stats-user {
mode = 0666
  }
  unix_listener old-stats {
mode = 0666
  }
}
service tcpwrap {
  unix_listener login/tcpwrap {
group = $default_login_user
mode = 0600
user = $default_login_user
  }
}
ssl = required
ssl_cert = 

dovecot-dict-sql.conf.ext
Description: application/vnd.novadigm.ext


dovecot-sql.conf.ext
Description: application/vnd.novadigm.ext


Re: v2.3.17 quota-dict related sql errors

2022-02-05 Thread Pascal Volk
On 18/12/2021 20.56, Pascal Volk wrote:
> On 2021-12-04 22.18, I wrote:
>> Hi there,
>>
>> I've updated Dovecot from v2.3.14 (cee3cbc0d) to v2.3.17 (e2aa53df5b).
>> Right after the update, dovecot begun flooding the mail.log and
>> PostgreSQL's log.
>> ...

Hi there,

I've upgraded Dovecot to v2.3.18 (9dd8408c18). The problem still exists:

ERROR:  invalid input syntax for type bigint:
"u...@localhost.localdomain.org"

An excerpt from the journal is attached.


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.2203...@localdomain.orghost conf.d # journalctl -f -u  dovecot.service 
Feb 05 19:38:48 host systemd[1]: Started Dovecot IMAP/POP3 email server.
Feb 05 19:38:54 host dovecot[635]: master: Dovecot v2.3.18 (9dd8408c18) 
starting up for lmtp, pop3, imap, sieve
Feb 05 19:42:00 host systemd[1]: Reloading Dovecot IMAP/POP3 email server...
Feb 05 19:42:00 host dovecot[635]: master: Warning: SIGHUP received - reloading 
configuration
Feb 05 19:42:00 host systemd[1]: Reloaded Dovecot IMAP/POP3 email server.
Feb 05 19:42:28 host dovecot[1137]: imap-login: Login: 
user=, method=PLAIN, 
rip=2001:db8:815:1337:1234:5678:9abc, lip=2001:db8::143, mpid=1150, TLS, 
session=
Feb 05 19:42:28 host dovecot[1137]: 
imap(u...@localhost.localdomain.org)<1150>: ID sent: name=Thunderbird, 
version=91.5.1
Feb 05 19:42:29 host dovecot[1137]: dict(1152): Warning: quota: dict(pgsql): 
sqlpool(pgsql): Query failed, retrying: ERROR:  invalid input syntax for type 
bigint: "u...@localhost.localdomain.org"
Feb 05 19:42:29 host dovecot[1137]: dict: Error: LINE 1: SELECT bytes FROM 
userquota WHERE uid = 'u...@localhost.loca...
Feb 05 19:42:29 host dovecot[1137]: dict: Error:
 ^
Feb 05 19:42:29 host dovecot[1137]: dict(1152): Error: quota: dict(pgsql): 
sqlpool(pgsql): Query failed, aborting: SELECT bytes FROM userquota WHERE uid = 
'u...@localhost.localdomain.org'
Feb 05 19:42:29 host dovecot[1137]: dict(1152): Error: quota: Lookup failed: 
ERROR:  invalid input syntax for type bigint: "u...@localhost.localdomain.org"
Feb 05 19:42:29 host dovecot[1137]: dict: Error: LINE 1: SELECT bytes FROM 
userquota WHERE uid = 'u...@localhost.loca...
Feb 05 19:42:29 host dovecot[1137]: dict: Error:
 ^
Feb 05 19:42:29 host dovecot[1137]: 
imap(u...@localhost.localdomain.org)<1150>: Error: Failed to get quota 
resource STORAGE: quota-dict: dict_lookup(priv/quota/storage) failed: 
dict-server returned failure: ERROR:  invalid input syntax for type bigint: 
"u...@localhost.localdomain.org"
Feb 05 19:42:29 host dovecot[1137]: imap: Error: LINE 1: SELECT bytes FROM 
userquota WHERE uid = 'u...@localhost.loca...
Feb 05 19:42:29 host dovecot[1137]: imap: Error:
 ^ (reply took 0.099 secs (0.100 in dict wait, 0.000 in other 
ioloops, 0.000 in locks, async-id reply 0.010 secs ago, started on dict-server 
0.029 secs ago, took 0.029 secs))


Re: v2.3.17 quota-dict related sql errors

2022-02-06 Thread Pascal Volk
On 05/02/2022 20.20, Aki Tuomi wrote:
> 
>> On 05/02/2022 21:01 Pascal Volk  
>> wrote:
>>
>> Hi there,
>>
>> I've upgraded Dovecot to v2.3.18 (9dd8408c18). The problem still exists:
>>
>>  ERROR:  invalid input syntax for type bigint:
>> "u...@localhost.localdomain.org"
>>
>> An excerpt from the journal is attached.
>>
> 
> Can you provide your quota-dict config file (dovecot-dict-sql.conf.ext), 
> please?
> 
> Aki


Hi Aki,

the content of the `dovecot-dict-sql.conf.ext` file:

connect = host=host dbname=mailsys user=dovecot password=TRUE
map {
  pattern = priv/quota/storage
  table = userquota
  username_field = uid
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = userquota
  username_field = uid
  value_field = messages
}


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.2203...@localdomain.org


Re: doveconf -a Segmentation Fault

2015-03-12 Thread Pascal Volk
On 03/12/2015 02:07 PM, Dan LaSota wrote:
> Getting "Segmentation Fault" When I run doveconf -a

Have a look at http://dovecot.org/bugreport.html and try again.


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1507...@localdomain.org


Re: core not dumped

2015-03-19 Thread Pascal Volk
On 03/19/2015 02:53 PM, James wrote:
>>> ...
>>> service imap-login {
>>> chroot =
>>> drop_priv_before_exec = yes
>>> user = dovecot
>>> }
>>>
>>> How can I make imap-login to produce a core file?
> ...
> I can create core dumps but not from imap-login, so it's not a general 
> system restriction.  Adding abort() to the master gives a core - but but 
> not a relevant one.  Adding an arbitrary abort() to imap-login gives a 
> "core not dumped" message.

Try this configuration:

service imap-login {
  executable = imap-login -D
}

Your configuration (doveconf -n output) may be also helpfull


Regards,
Pascal
-- 
The trapper recommends today: defaced.1507...@localdomain.org


Quota configuration issue [was: doveadm problem]

2015-04-23 Thread Pascal Volk
On 04/23/2015 10:16 PM, T.Tributh wrote:
> Hi,
> since several versions i have the following problem:
> Actually i am using:
> 
>  dovecot --version
> 2.2.16 (de2023e630cb)
> 
> When i try to use doveadm i see the following error:
> 
> doveadm pw -t
> {SSHA512}cywDi7p60qc1K0mK4zAC2NrnK86hntGgbQcAh3H9U3WEpZMFk1hj/MYQ81hJouP1FOsF/Jasc1BjzdaPeUU5fYLitEzV
> -p 1234
> Fatal: Couldn't load required plugin
> /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: dlopen() failed:
> /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol:
> command_unregister
> 
> I recognized that these lines in my main dovecot.conf are responsible:
> 
> mail_plugins = quota imap_quota

That's wrong for the global mail_plugins setting

> 
> When i change it to
> 
> mail_plugins = quota
> ...
> but than my thunderbird-client is not longer able to recognize to
> mailbox-size.

See http://wiki2.dovecot.org/Quota#Enabling_quota_plugins


Regards,
Pascal
-- 
The trapper recommends today: decade.1511...@localdomain.org


Re: Auth-worker, Unknown User

2015-04-24 Thread Pascal Volk
On 04/24/2015 03:55 PM, Stephen R Guglielmo wrote:
> Hi list,
> 
> I'm running Debian Jessie (8). I have Postfix and Dovecot working
> successfully. I attempted to setup LMTP in order to enable sieve
> support, but it seems I was not successful. Dovecot version 2.2.13.
> 
> Postfix accepts an incoming test mail I sent, then tries to deliver it
> to Dovecot via LMTP:
> 
> dovecot: lmtp(13493): Connect from local
> dovecot: auth-worker(13495): pam(s...@example.com): unknown user
> dovecot: lmtp(13493): Disconnect from local: Successful quit
> 
> Postfix then bounces my mail with a "550 User doesn't exist." It seems
> that Dovecot is trying to lookup my whole address (s...@example.com) in
> PAM instead of just the username ("srg"), which does exist. What can I
> do to avoid this?
> 
> I have searched the internet about this and found a few references to
> "args = %s" and "args = username_format=%n" for passdb and/or userdb,
> but I have tried both (restarting Dovecot) to no avail.
> 
> Thank you!
> 
> `doveconf -n` below:
> 
> # 2.2.13: /etc/dovecot/dovecot.conf
> # OS: Linux 2.6.32-042stab103.6 x86_64 Debian 8.0 
> auth_verbose = yes
> ...
> passdb {
>   driver = pam
> }
> ...
> userdb {
>   driver = passwd
> }
> ...

Since you only have local (system) users, you should be able to solve
the problem by setting:

auth_username_format = %Ln

in your /etc/dovecot/conf.d/10-auth.conf


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.1511...@localdomain.org


Re: FYI: dovecot (008632bdfd2c) compilation woes, and minor glitch regarding update-version.sh

2015-05-04 Thread Pascal Volk
On 04/24/2015 07:00 PM, Michael Grimm wrote:
> ...
> 2) I don't have a python binary installed, only a python2 link to the 
> python27 binary (FBSD, and python27 from ports). 
>Thus, update-version.sh will fail to evaluate hg's changeset. As a quick 
> fix I needed to create a link: python -> python2
> 

This is a less or more 'common' system configuration error. ;-)
See
https://forums.freebsd.org/threads/solved-python-command-not-found.46449/


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1512...@localdomain.org


Re: Prebuilt Binaries xi.rename-it.nl down ?

2015-05-07 Thread Pascal Volk
On 05/07/2015 07:04 PM, Nathan Schultheiss wrote:
> Hello,
> 
> Since several days the repo (xi.rename-it.nl (217.119.238.14)) is no longer 
> accessible.
> I'd found here for Debian/Ubuntu => http://wiki2.dovecot.org/PrebuiltBinaries
> 
> Is it off, or temporarily down ?

"Xi is broken at the moment."
http://dovecot.org/list/dovecot/2015-April/100682.html


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


Re: Xi broken

2015-05-10 Thread Pascal Volk
On 05/10/2015 04:01 PM, Thomas Leuxner wrote:
> ... Not sure how it is supposed to interact with the file 
> /etc/default/dovecot and its ALLOW_COREDUMPS=1 variable, but one needs to 
> explicitly add LimitCORE=infinity in the 'Service' section (until someone 
> with more systemd foo fixes it):
> 

The attached patch could solve the problem.


Regards,
Pascal
-- 
The trapper recommends today: cafebabe.1513...@localdomain.org
diff -urN dovecot-core.org/etc/default/dovecot dovecot-core/etc/default/dovecot
--- dovecot-core.org/etc/default/dovecot	2015-04-10 22:23:00.0 +
+++ dovecot-core/etc/default/dovecot	2015-05-10 17:17:57.980476636 +
@@ -3,5 +3,11 @@
 # Set to '0' to explicitly disable starting Dovecot
 #ENABLED=0
 
+# SysV configuration
 # Set to '1' to allow Dovecot daemons to produce core dumps
 #ALLOW_COREDUMPS=1
+
+# systemd configuration
+# Set to 'infinity' to allow Dovecot daemons to produce core dumps.
+# See also setrlimit(2)
+LimitCORE=
diff -urN dovecot-core.org/lib/systemd/system/dovecot.service dovecot-core/lib/systemd/system/dovecot.service
--- dovecot-core.org/lib/systemd/system/dovecot.service	2015-05-10 14:36:00.0 +
+++ dovecot-core/lib/systemd/system/dovecot.service	2015-05-10 17:23:28.985272494 +
@@ -3,6 +3,8 @@
 After=local-fs.target network.target
 
 [Service]
+EnvironmentFile=-/etc/default/dovecot
+LimitCORE=$LimitCORE
 Type=simple
 ExecStart=/usr/sbin/dovecot -F
 NonBlocking=yes


Re: Typo in systemd commit HG 8dc79a437858

2015-05-25 Thread Pascal Volk
On 05/25/2015 06:14 AM, Thomas Leuxner wrote:
> The apostrophes need to be removed from the LimitCORE example, otherwise the 
> parameter will not be recognized:
> 
> $ cat /etc/systemd/system/dovecot.service.d/service.conf 
> [Service]
> #Environment='OPTIONS=-p'
> #LimitCORE=8192
> LimitCORE=infinity

Oops, my bad.
On my system i have (w/o drop-in files):

,--[ systemctl show --property=LimitCORE dovecot ]--
| LimitCORE=18446744073709551615
`--

But your message showed me just another typo. The setting name, for
configuring the file descriptor limit, is LimitNOFILE - instead of
LimitCORE.
Stephan's next auto-build should contain the corrected version.


Regards,
Pascal
-- 
The trapper recommends today: defaced.1514...@localdomain.org


Re: Typo in systemd commit HG 8dc79a437858

2015-05-25 Thread Pascal Volk
On 05/25/2015 03:44 PM, Steve Litt wrote:
> Hey guys, please tell me that Dovecot does not depend on systemd!
> 

Nope, Dovecot doesn't depend on systemd. Why should it depend on systemd?

But: Dovecot supports systemd. If you want to enable systemd, use:

./configure --with-systemdsystemunitdir


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1514...@localdomain.org


Re: OT: Central sieve management

2015-05-29 Thread Pascal Volk
On 05/28/2015 08:24 PM, l...@airstreamcomm.net wrote:
> A bit off topic, but I was wondering if anyone here has a solution for 
> centrally managing sieve for multiple users from a custom web application?  
> We would like to implement pigeonhole sieve on our dovecot cluster, however 
> we need to be able to access user’s sieve configurations from a central 
> location for troubleshooting and support purposes.  
> 

You may store the scripts on a LDAP server or in a sql database using
dict. See
http://hg.rename-it.nl/dovecot-2.2-pigeonhole/file/0.4.8/doc/locations


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1514...@localdomain.org


Re: Migration from courier-imap to dovecot

2015-06-23 Thread Pascal Volk
On 06/23/2015 02:57 PM, alex wrote:
> hello,
> 
> I search a solution to migrate a courier-impa mail accounts in maildir 
> format to a dovecot mail accounts in sandbox format.
> The first server is an ubuntu 10.4 with courier-imap in maildir format, 
> the accounts are managed by postfix 2.7.0 with MySQL
> The second server is an debian 7.8 (wheezy) with dovecot 2.2.13 in sdbox 
> format, the accounts are managed by postfix 2.9.6 with MySQL
> 
> My request is, how to import and convert the mail accounts ??


Did you read ?


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.1517...@localdomain.org


Re: dovecot-lmtp

2015-07-01 Thread Pascal Volk
On 07/01/2015 02:28 PM, Steven Hopps wrote:
> Hi, I'm trying to use dovecot-lmtp so that I can filter messages with 
> sieve, however it doesn't appear to be working.
> 
> I followed the instructions on wiki2.dovecot.org. I'm running Debian 
> Wheezy. I've got runit configured to execute postfix and dovecot, which 
> may be the source of the problem (runit executes /usr/sbin/dovecot -F). 
> I've got mail_debug turned on and there is nothing in the mail log about 
> lmtp.
> 
> Any help would be appreciated.
> 

`postconf virtual_transport mailbox_transport`?
`doveconf -n`?


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1518...@localdomain.org


Re: Dovecot - Config file details

2015-07-06 Thread Pascal Volk
On 07/06/2015 02:37 PM, Sachin Kulkarni1 wrote:
> Hello All,
> 
> We want to install / configure and test Dovecot.
> 
> We are doing it for the first time.
> 
> After installation we are now looking for configuration file and need to know 
> significance  of below params and what values we should provide ?
> 
> protocols =
> listen =
> base_dir =
> login_greeting =
> 
> Please help.

Did you read the comments in
http://hg.dovecot.org/dovecot-2.2/file/tip/doc/example-config/dovecot.conf

Any question left?

> 
> Disclaimer:  This message and the information contained herein is proprietary 
> and confidential and subject to the Tech Mahindra policy statement, you may 
> review the policy at http://www.techmahindra.com/Disclaimer.html externally 
> http://tim.techmahindra.com/tim/disclaimer.html internally within 
> TechMahindra.
> 

O rly?


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1518...@localdomain.org


Re: Delivering email to Maildir PreINBOX

2015-08-19 Thread Pascal Volk
On 08/19/2015 10:45 PM, Paulo Matos wrote:
> 
> Hi all,
> 
> I have a running dovecot with:
> $ dovecot -n
> # 2.2.18: /etc/dovecot/dovecot.conf
> [...]
> I started to filter my email with imapfilter running on the same host as
> dovecot. I would therefore like to deliver email to a folder called
> PreINBOX so that imapfilter then sorts the email and ends up delivering
> only the useful email to INBOX.
> 
> How can I change the name of the inbox dovecot delivers to?
> 
> Best,
> 

You can't change the name of the INBOX - the INBOX is always the INBOX.
But you can choose the name of the target mailbox.

I don't know "imapfilter".
I'd use  for mail filtering.


Regards,
Pascal


Re: v2.2.19 release candidate 2 released

2015-09-29 Thread Pascal Volk
On 2015-09-29 20:22, Jacques Distler wrote:
> Darwin doesn't have an EDEADLOCK error code, so compilation fails on MacOSX:
> 
>   file-lock.c:214:16: error: use of undeclared identifier 'EDEADLOCK'
> if (errno == EDEADLOCK)
>  ^
>   file-lock.c:262:16: error: use of undeclared identifier 'EDEADLOCK'
> if (errno == EDEADLOCK)
>  ^

Does http://hg.dovecot.org/dovecot-2.2/rev/7633bca91551 fix the problem
for you?


Regards,
Pascal
-- 
The trapper recommends today: deadbeef.1527...@localdomain.org


Re: Howto get information about quota used

2015-12-29 Thread Pascal Volk
On 2015-12-29 02:06, Макаров Денис wrote:
> Hello guys!
> 
> I have Dovecot server (version: 2.2.9) with quota and imap_quota plugins.
> 
> I wanna know how to get information about quota used of current email.
> 
> I can do this with IMAP client like Thunderbird, but how I can do it on 
> server?
> ...

doveadm-quota(1) will be your friend in this situation:

,--[ doveadm quota get -u u...@localhost.localdomain.org ]--
| Quota name Type Value Limit%
| user   STORAGE 959908 -0
| user   MESSAGE 166680 -0
`--


Regards,
Pascal
-- 
The trapper recommends today: deadbeef.1536...@localdomain.org


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


Re: [Dovecot] Why can NOT login as root

2011-09-19 Thread Pascal Volk
On 09/20/2011 01:22 AM Linda Walsh wrote:
> I guess the source needs a patch.
> 
> Why would dovecot choose to play nursemaid to people who want to read
> root email remotely via IMAPS?
> …

So, why do you not simply create and apply the patch? Dovecot is OSS.
You are free to modify it in order to satisfy your special requirements.

EOD
Pascal
-- 
The trapper recommends today: f007ba11.1126...@localdomain.org


Re: [Dovecot] Missing man page for doveadm move

2011-09-27 Thread Pascal Volk
On 09/22/2011 05:26 PM Jeetu wrote:
> Hi,
> 
> i cant see man pages for doveadm-move, though the command "doveadm move 
> ..." works on new version of dovecot.

There is the manual page:
http://hg.dovecot.org/dovecot-2.0/rev/c194c76b98ff also available in the
wiki: http://wiki2.dovecot.org/Tools/Doveadm/Move


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1127...@localdomain.org


Re: [Dovecot] deliver LDA issue with setuid-root

2011-09-28 Thread Pascal Volk
On 09/28/2011 08:37 AM Daminto Lie wrote:
> Hi,
> 
> I am getting the following error message when trying to implement LDA Dovecot 
> 1.2.9 with virtual users:
> 
> 
> Sep 28 15:59:33 server1 postfix/pipe[3041]: 28BEC2400A1: 
> to=, relay=dovecot, delay=2361, delays=2361/0.01/0/0.03, 
> dsn=4.3.0, status=deferred (temporary failure. Command output: 
> /usr/lib/dovecot/deliver must not be both world-executable and setuid-root. 
> This allows root exploits. See http://wiki.dovecot.org/LDA#multipleuids )
> 
> I do not know if I need to change the group to secmail. Currently, I have as 
> follows
> 
> -rwsr-xr-x   1 root root 933796 2011-06-10 05:36 deliver
> 
> 
> Can I change it to any other group apart from secmail? and what does it mean 
> by world-executable? Sorry if I ask a silly question here but keen to learn 
> more about linux.

RTFM chmod(1)

> …
> Here is my master.cf
> # delivery through dovecot
> dovecot   unix  -   n   n   -   -   pipe
>   flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d 
> ${recipient}
> 
> Any help would be greatly appreciated.
> 
> Thank you

chgrp vmail /usr/lib/dovecot/deliver
chmod o-rx !$


Regards,
Pascal

-- 
The trapper recommends today: cafefeed.1127...@localdomain.org


Re: [Dovecot] doveadm mailbox subscribe wildcard

2011-10-06 Thread Pascal Volk
On 10/06/2011 11:23 PM Micah Anderson wrote:
> 
> Hi,
> 
> I noticed that wildcards work like the following, as described in the
> man page:
> 
> # doveadm mailbox list -s -u bob dovecot*
> dovecot
> dovecot/pigeonhole
> dovecot/pigeonhole/2.0
> 
> however, wildcard subscriptions don't work:

Why should it work? Where is 'wildcard subscribing' documented?

> # doveadm mailbox subscribe -u bob dovecot*
> 
> # doveadm mailbox list -s -u bob dovecot*
> dovecot
> dovecot*
> dovecot/pigeonhole
> dovecot/pigeonhole/2.0
> 
> It seems I subscribed the non-existant mailbox called 'dovecot*' -- is
> there a better way to handle this?

for box in `doveadm mailbox list dovecot\*`
do
   doveadm mailbox subscribe $box
done


Regards,
Pascal
-- 
The trapper recommends today: defaced.1127...@localdomain.org


Re: [Dovecot] doveadm segfaults on TCP connect - version 2.0.15

2011-10-19 Thread Pascal Volk
On 10/19/2011 10:33 PM ghandidrivesahum...@rocketfish.com wrote:
> Segmentation fault (core dumped)

Please use gdb to generate a backtrace from the dumped core file.
(http://dovecot.org/bugreport.html)


Regards,
Pascal
-- 
The trapper recommends today: defaced.1129...@localdomain.org


Re: [Dovecot] POP3/IMAPv4 CRAM-MD5 Authentication failed.(Re-post)

2011-11-07 Thread Pascal Volk
On 11/07/2011 04:12 PM Yuuichi Ikeda (SKLC) wrote:
> Hi, I'm Yuuichi Ikeda from Japan User.
> 
> 
> Dovecot Configuration
>> …
>> ssl_ca = > ssl_cert = > ssl_key = > ssl_verify_client_cert = yes
> …
> If it attests by connecting by POP3 or IMAPv4, the following messages will
> be displayed and attestation will go wrong. 
> 
>> Nov 07 23:12:40 auth: Info: CRAM-MD5(?,192.168.1.110): Client didn't present 
>> valid SSL certificate
>> Nov 07 23:12:40 auth: Debug: client out: FAIL   1   reason=Client didn't 
>> present valid SSL certificate
>> Nov 07 23:12:40 pop3-login: Info: Aborted login (cert required, client 
>> didn't start TLS): method=CRAM-MD5, rip=192.168.1.110, lip=192.168.1.1, 
>> secured
> 
>> Nov 07 23:16:32 auth: Info: CRAM-MD5(?,192.168.1.1): Client didn't present 
>> valid SSL certificate
>> Nov 07 23:16:32 auth: Debug: client out: FAIL   1   reason=Client didn't 
>> present valid SSL certificate
>> Nov 07 23:16:32 imap-login: Info: Aborted login (cert required, client 
>> didn't start TLS): method=CRAM-MD5, rip=192.168.1.1, lip=192.168.1.1, secured
> 
> What will you do and will become like this? If some people know ways of
> coping, please let me know.

Are you sure you want to verify the client's certificate
(ssl_verify_client_cert = yes)? If not, just remove this line and try again.


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


Re: [Dovecot] Bus factor of dovecot / GIT

2011-11-09 Thread Pascal Volk
On 11/09/2011 10:29 AM Thomas Koch wrote:
> Hi,
> 
> somebody from the kolab groupware project recently explained me that the Bus-
> Factor[1] of around 1 would be one of their primary reasons not to use 
> Dovecot 
> and stick with Cyrus.

And what is their primary reason for the lame excuse?
Too many cooks spoil the broth.

just my 2¢


Regards,
Pascal
-- 
The trapper recommends today: fabaceae.1131...@localdomain.org


Re: [Dovecot] IMAP SPECIAL-USE extension

2011-12-07 Thread Pascal Volk
On 12/07/2011 02:28 PM Arne K. Haaje wrote:
> Thunderbird also use a Templates folder.

Yes, I also noticed that. But
http://tools.ietf.org/html/rfc6154#section-2 doesn't mention a mailbox
for templates.


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


[Dovecot] 2.1.rc1 (1e118913348b): Panic: file mail-user.c: line 128 (mail_user_ref): assertion failed: (user->refcount > 0)

2011-12-07 Thread Pascal Volk
Hi Timo,

right after delivering the message to the INBOX the lmtp crashes.
I wonder about the "Sent" in the attached backtrace.


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.1134...@localdomain.org
# 2.1.rc1 (1e118913348b): /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.1.0-1-amd64 x86_64 Debian wheezy/sid 
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot_dbg.log
dict {
  quota = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_gid = 7
first_valid_uid = 7
hostname = orange.example.com
listen = 203.0.113.168, 2001:db8:436d:eaff:587:995:0:
lmtp_save_to_detail_mailbox = yes
login_access_sockets = tcpwrap
mail_attachment_dir = /srv/mail/.SiS
mail_attachment_hash = %{sha256}
mail_location = mdbox:~/mdbox
mail_plugins = quota zlib
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
  separator = /
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = dict:user:%{uid}:noenforcing:proxy::quota
  quota_rule = *:storage=2G:messages=0
  quota_rule2 = Trash:storage=+100M
  recipient_delimiter = +
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  zlib_save = bz2
  zlib_save_level = 6
}
postmaster_address = postmas...@example.com
protocols = imap lmtp sieve
service auth-worker {
  unix_listener auth-worker {
group = $default_internal_user
mode = 0660
user = doveauth
  }
  user = doveauth
}
service auth {
  client_limit = 1425
  unix_listener /var/spool/postfix-orange/private/dovecot-auth {
group = postfix
mode = 0600
user = postfix
  }
  user = doveauth
}
service dict {
  unix_listener dict {
mode = 0666
  }
}
service lmtp {
  executable = lmtp -D
  unix_listener /var/spool/postfix-blau/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
  unix_listener /var/spool/postfix-orange/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service tcpwrap {
  unix_listener login/tcpwrap {
group = $default_login_user
mode = 0600
user = $default_login_user
  }
}
ssl = required
ssl_cert = #0  0x7f4a53e03405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7f4a53e06680 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x7f4a541a4aa8 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) 
at failures.c:187
backtrace = 0x1d9f5f8 "/usr/local/lib/dovecot/libdovecot.so.0(+0x4fa81) 
[0x7f4a541a4a81] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x50d67) 
[0x7f4a541a5d67] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7f4a541a4"...
#3  0x7f4a541a5d67 in i_internal_fatal_handler (ctx=0x7fff2e5cfc50, 
format=0x7f4a5470a310 "file %s: line %d (%s): assertion failed: (%s)", 
args=0x7fff2e5cfc38) at failures.c:645
status = 0
#4  0x7f4a541a4d91 in i_panic (format=0x7f4a5470a310 "file %s: line %d 
(%s): assertion failed: (%s)") at failures.c:259
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 
0x7fff2e5cfd20, reg_save_area = 0x7fff2e5cfc60}}
#5  0x7f4a5464de71 in mail_user_ref (user=0x1de7130) at mail-user.c:128
__FUNCTION__ = "mail_user_ref"
#6  0x7f4a54648720 in mail_storage_obj_ref (storage=0x1dec780) at 
mail-storage.c:439
__FUNCTION__ = "mail_storage_obj_ref"
#7  0x7f4a54649074 in mailbox_alloc (list=0x1deb140, vname=0x1df5b50 
"Sent", flags=MAILBOX_FLAG_READONLY) at mail-storage.c:664
new_list = 0x1deb140
storage = 0x1dec780
box = 0x1deeae0
__FUNCTION__ = "mailbox_alloc"
#8  0x7f4a52d6ef16 in quota_count_mailbox (root=0x1ddfe10, ns=0x1ddfed0, 
vname=0x1df5b50 "Sent", bytes_r=0x7fff2e5cff20, count_r=0x7fff2e5cff18) at 
quota-count.c:30
rule = 0x0
box = 0x7fff2e5cfe40
trans = 0x0
ctx = 0x1dfca00
mail = 0x1dfa500
search_args = 0x1dfa3b0
error = 32586
size = 1421264208
ret = 0
#9  0x7f4a52d6f0ce in quota_count_namespace (root=0x1ddfe10, ns=0x1ddfed0, 
bytes=0x7fff2e5cff20, count=0x7fff2e5cff18) at quota-count.c:78
ctx = 0x1dfa330
info = 0x1dfa508
ret = 0
#10 0x7f4a52d6f1df in quota_count (root=0x1ddfe10, bytes_r=0x7fff2e5cff20, 
count_r=0x7fff2e5cff18) at quota-count.c:106
namespaces = 0x1de0e80
i = 0
count = 1
ret = 0
#11 0x7f4a52d70e76 in dict_quota_count (root=0x1ddfe10, want_bytes=true

Re: [Dovecot] 2.1.rc1 (1e118913348b): Panic: file mail-user.c: line 128 (mail_user_ref): assertion failed: (user->refcount > 0)

2011-12-08 Thread Pascal Volk
On 12/08/2011 05:11 AM Timo Sirainen wrote:
> On Wed, 2011-12-07 at 17:17 +0100, Pascal Volk wrote:
>> right after delivering the message to the INBOX the lmtp crashes.
> http://hg.dovecot.org/dovecot-2.1/rev/3b70254e0596 should fix it.

Thanks, that fixed the problem for me.
Also thanks for http://hg.dovecot.org/dovecot-2.1/rev/8c803201651e


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1134...@localdomain.org


[Dovecot] Wish list item: %g/%{gid} variable

2011-12-08 Thread Pascal Volk
I think it would be very useful to have a user's GID in a variable.

So i could use for example: mail_attachment_dir = /srv/mail/.SiS/%{gid}

I use one GID per domain and the aliases fqhns of the domain. When for
example example.com would be an alias for exmaple.net (gid: 12345), the
attachments would be stored inside /srv/mail/.SiS/12345/, no matter if a
message was sent to john@example.com or to john@example.net.

"quota = dict:domain:%{gid}:proxy::quota" would then also work.


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.1134...@localdomain.org


[Dovecot] 2.1.rc1 (8a63f621bd2e): SiS permission issue + crash

2011-12-09 Thread Pascal Volk
Since changeset 8a63f621bd2e I'm one step closer to the perfect working
setup. I'm sharing one GID per domain, all it's alias names and accounts.
So I can use: mail_attachment_dir = /srv/mail/.SiS/%{gid}

In order to avoid permission trouble I've set fs ACL on the .SiS dir:

,--[ getfacl srv/mail/.SiS ]--
| # file: srv/mail/.SiS
| # owner: root
| # group: root
| user::rwx
| group::--x
| mask::--x
| other::-wx
| default:user::rwx
| default:group::rwx
| default:mask::rwx
| default:other::---
`--

OK, lets test the setup:

dsync -u tes...@example.com mirror maildir:/tmp/Maildir
rm -rf Maildir && cp -a Maildir_org Maildir && chown -R 70010:70002 Maildir
dsync -vu tes...@example.com mirror maildir:/tmp/Maildir
dsync(tes...@example.com): Info: Drafts: only in dest 
(guid=b6a53627f3cbe24e3303850d2fad)
dsync(tes...@example.com): Info: Sent: only in dest 
(guid=b7a53627f3cbe24e3303850d2fad)
dsync(tes...@example.com): Info: Junk-E-Mail: only in dest 
(guid=b8a53627f3cbe24e3303850d2fad)
dsync(tes...@example.com): Info: Trash: only in dest 
(guid=b9a53627f3cbe24e3303850d2fad)
dsync(tes...@example.com): Info: INBOX: only in dest 
(guid=baa53627f3cbe24e3303850d2fad)
dsync(tes...@example.com): Error: 
stat(/srv/mail/.SiS/70002/a2/7b/.temp.blau.819.4f06409857c627e0) failed: 
Permission denied
dsync(tes...@example.com): Error: 
safe_mkstemp(/srv/mail/.SiS/70002/a2/7b/.temp.blau.819.) failed: Permission 
denied
dsync(tes...@example.com): Panic: file dsync-worker-local.c: line 1644 
(local_worker_save_msg_continue): assertion failed: (ret == -1)
dsync(tes...@example.com): Error: Raw backtrace: 
/usr/local/lib/dovecot/libdovecot.so.0(+0x4faf1) [0x7f4db31f4af1] -> 
/usr/local/lib/dovecot/libdovecot.so.0(default_error_handler+0) 
[0x7f4db31f4b7d] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7f4db31f4e01] -> dsync() [0x416af8] -> dsync() [0x416e46] -> 
dsync(dsync_worker_msg_save+0x82) [0x412cb2] -> dsync() [0x40b7e0] -> dsync() 
[0x417286] -> dsync() [0x417324] -> dsync(dsync_worker_msg_get+0xa8) [0x412dd4] 
-> dsync() [0x40bbf3] -> dsync() [0x40bd62] -> dsync() [0x40c106] -> dsync() 
[0x40c318] -> dsync(dsync_brain_msg_sync_new_msgs+0x1c) [0x40c336] -> 
dsync(dsync_brain_msg_sync_more+0x1ae) [0x40b15e] -> dsync() [0x409b88] -> 
dsync(dsync_brain_sync+0x231) [0x40a074] -> dsync() [0x4084fb] -> dsync() 
[0x408729] -> dsync(dsync_brain_sync+0x1a7) [0x409fea] -> dsync() [0x408238] -> 
dsync() [0x408388] -> dsync(dsync_brain_sync+0x10b) [0x409f4e] -> 
dsync(dsync_brain_sync_all+0x24) [0x40a16b] -> dsync(main+0x680) [0x407b2b
] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f4db2e3fead] 
-> dsync() [0x406e09]
Aborted (core dumped)

Looks like Dovecot ignores the ACL. I think a mail_attachment_dir_mode
setting could help to work around this problem. Dunno what would be a
good default value. But I would set mail_attachment_dir_mode = 0770
The attachment files have mode 0660, that's perfect in my setup.

Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1134...@localdomain.org
# 2.1.rc1 (8a63f621bd2e): /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.1.0-1-amd64 x86_64 Debian wheezy/sid 
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot_dbg.log
dict {
  quota = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_gid = 7
first_valid_uid = 7
hostname = orange.example.com
listen = 203.0.113.168, 2001:db8:436d:eaff:587:995:0:
lmtp_save_to_detail_mailbox = yes
login_access_sockets = tcpwrap
mail_attachment_dir = /srv/mail/.SiS/%{gid}
mail_attachment_hash = %{sha256}
mail_location = mdbox:~/mdbox
mail_plugins = quota zlib
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
  separator = /
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = dict:user:%{uid}:noenforcing:proxy::quota
  quota_rule = *:storage=2G:messages=0
  quota_rule2 = Trash:storage=+100M
  recipient_delimiter = +
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  zlib_save = bz2
  zlib_save_level = 6
}
postmaster_address = postmas...@example.com
protocols = imap lmtp sieve
service auth-worker {
  unix_listener auth-worker {
group = $default_internal_user
mode = 0660
user = doveauth
  }
  user = doveauth
}
service auth {
  client_limit = 1425
  unix_listener /var/spool/postfix-orange/private/dovecot-auth {
group = postfix
mode = 0600
user = postfix
  }
  user = doveauth
}
service dict {
  unix_listener dict {
mode = 0666
  }
}
service lmtp {
  executable = lmtp 

[Dovecot] 2.1.rc1 (51d87deb5c26): %{gid} modification problem

2011-12-10 Thread Pascal Volk
I tried to apply the X modifier to the %{gid} variable:
'mail_attachment_dir = /srv/mail/.SiS/%X{gid}'.
But the name of the created directory is '0', instead of '11172'.


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.1134...@localdomain.org


Re: [Dovecot] 2.1.rc1 (51d87deb5c26): %{gid} modification problem

2011-12-10 Thread Pascal Volk
On 12/10/2011 04:39 PM Pascal Volk wrote:
> But the name of the created directory is '0', instead of '11172'.

0 was the hex version of a empty string. For now I've reverted changeset
499e4916bed5. This brings the content of %{gid} back and %X{gid} works
now as expected.


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1134...@localdomain.org


Re: [Dovecot] 2.1.rc1 (51d87deb5c26): %{gid} modification problem

2011-12-10 Thread Pascal Volk
On 12/10/2011 05:09 PM Pascal Volk wrote:
> … For now I've reverted changeset 499e4916bed5.

OK, I found the problem. You forgot to append the GID to the
var_expand_table before returning it. The attached patch works fine for me.

It also adds the short variable %g. I hope that's OK.


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1134...@localdomain.org
# HG changeset patch
# User Pascal Volk 
# Date 1323535335 0
# Node ID 89f107e0121a9a53a5fdeb59c7536d1db12cab09
# Parent  51d87deb5c26b386287ced6dc76cb2260659e029
lib-storage: Added %g expansion to mail_user.
Also append the GID to the var_expand_table before returning it.

diff -r 51d87deb5c26 -r 89f107e0121a src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c	Sat Dec 10 10:59:30 2011 +0200
+++ b/src/lib-storage/mail-storage-service.c	Sat Dec 10 16:42:15 2011 +
@@ -541,6 +541,7 @@
 		{ 'r', NULL, "rip" },
 		{ 'p', NULL, "pid" },
 		{ 'i', NULL, "uid" },
+		{ 'g', NULL, "gid" },
 		{ '\0', NULL, NULL }
 	};
 	struct var_expand_table *tab;
@@ -557,6 +558,7 @@
 	tab[5].value = net_ip2addr(&input->remote_ip);
 	tab[6].value = my_pid;
 	tab[7].value = dec2str(geteuid());
+	tab[8].value = dec2str(getegid());
 	return tab;
 }
 
diff -r 51d87deb5c26 -r 89f107e0121a src/lib-storage/mail-user.c
--- a/src/lib-storage/mail-user.c	Sat Dec 10 10:59:30 2011 +0200
+++ b/src/lib-storage/mail-user.c	Sat Dec 10 16:42:15 2011 +
@@ -189,7 +189,7 @@
 		{ 'r', NULL, "rip" },
 		{ 'p', NULL, "pid" },
 		{ 'i', NULL, "uid" },
-		{ '\0', NULL, "gid" },
+		{ 'g', NULL, "gid" },
 		{ '\0', NULL, NULL }
 	};
 	struct var_expand_table *tab;
@@ -212,6 +212,7 @@
 		p_strdup(user->pool, net_ip2addr(user->remote_ip));
 	tab[7].value = my_pid;
 	tab[8].value = p_strdup(user->pool, dec2str(user->uid));
+	tab[9].value = p_strdup(user->pool, dec2str(user->gid));
 
 	user->var_expand_table = tab;
 	return user->var_expand_table;


[Dovecot] OT: PHP imap_open [was: One important question!]

2011-12-18 Thread Pascal Volk
On 12/18/2011 08:05 PM I M wrote:
> Hello!Please, give me a feedback as soon as you can!
> I need some advice regarding  "dovecot self signed certificate" 
> configuration!If you have any experience in working with php IMAP-module that 
> would be useful for me to know what would you say about below:  
> Problem: I can connect to my INBOX through telnet, but I cannot do it through 
> imap-functions (Certificate failure for ...)?
> My best,Edward.

http://php.net/manual/en/function.imap-open.php#refsect1-function.imap-open-parameters
…
/novalidate-cert
do not validate certificates from TLS/SSL server, needed if
server uses self-signed certificates
…

Regards,
Pascal
-- 
The trapper recommends today: 5e1f1e55.1135...@localdomain.org


Re: [Dovecot] file_dotlock_create(~/.dovecot.lda-dupes) failed: No such file or directory ...

2011-12-22 Thread Pascal Volk
On 12/22/2011 11:31 AM LE NORCY Arnaud wrote:
> 
> Dec 22 10:18:16 mailserver dovecot: deliver(user324): 
> file_dotlock_create(~/.dovecot.lda-dupes) failed: No such file or directory
  ^
http://wiki.dovecot.org/VirtualUsers/Home


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1135...@localdomain.org


Re: [Dovecot] doveadm + dsync merging

2011-12-29 Thread Pascal Volk
On 12/29/2011 01:53 PM Patrick Ben Koetter wrote:
> * Timo Sirainen :
>> …
>> a) Use "doveadm dsync" prefix, and otherwise keep the names same:
>>
>> dsync mirror -> doveadm dsync mirror
>> dsync backup -> doveadm dsync backup
>> dsync server -> doveadm dsync server (for running dsync remotely via 
>> ssh/etc.)
>>
>> b) Don't have the dsync prefix:
>>
>> dsync mirror -> doveadm mirror
>> dsync backup -> doveadm backup
>> dsync server -> doveadm dsync-server (could be hidden from the doveadm 
>> commands list)
> 
> Calling the old "dsync" command (symlink) directly should keep the already
> established command structure.
> 
> Calling dsync features over doveadm should keep command structure as simple
> (not complex) as possible. I favour b) for that and rename 'mirror' to 'sync'.
> 
> 'sync' keeps in line with products such as rsync. People will immediately know
> what it does.

I'd prefer doveadm commands with the dsync prefix. (a)) Because:

  * doveadm already has other 'command groups' like mailbox, director …
  * that's the way to avoid command clashes (w/o hiding anything)

Renaming 'mirror' to 'sync' could be helpful …


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


Re: [Dovecot] OT Re: crashes on 2.0.16

2011-12-31 Thread Pascal Volk
On 12/31/2011 02:20 PM Ed W wrote:
> 
> Wait... Back up... You mean there are *other* distributions of linux?  I 
> thought they were all just gentoo derivatives..?!!
> 
> :-)

Huh, I thought everything would be based on LFS
[http://www.linuxfromscratch.org/lfs/].

Happy new year to the all Dovecot admins and Timo San.


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


Re: [Dovecot] Storing passwords encrypted... bcrypt?

2012-01-04 Thread Pascal Volk
On 01/03/2012 09:40 PM Charles Marcus wrote:
> Hi everyone,
> 
> Was just perusing this article about how trivial it is to decrypt 
> passwords that are stored using most (standard) encryption methods (like 
> MD5), and was wondering - is it possible to use bcrypt with 
> dovecot+postfix+mysql (or posgres)?

Yes it is possible to use bcrypt with dovecot. Currently you have only
to write your password scheme plugin. The bcrypt algorithm is described
at http://en.wikipedia.org/wiki/Bcrypt.

If you are using Dovecot >= 2.0 'doveadm pw' supports the schemes:
*BSD: Blowfish-Crypt
*Linux (since glibc 2.7): SHA-256-Crypt and SHA-512-Crypt
Some distributions have also added support for Blowfish-Crypt
See also: doveadm-pw(1)

If you are using Dovecot < 2.0 you can also use any of the algorithms
supported by your system's libc. But then you have to prefix the hashes
with {CRYPT} - not {{BLF,SHA256,SHA512}-CRYPT}.


Regards,
Pascal
-- 
The trapper recommends today: deadbeef.1200...@localdomain.org


Re: [Dovecot] Storing passwords encrypted... bcrypt?

2012-01-04 Thread Pascal Volk
On 01/05/2012 02:59 AM Noel Butler wrote:
> We use  Crypt::PasswdMD5 -
> unix_md5_crypt()  for all general password storage including mail/ftp
> etc, except for web, where we need to use apache_md5_crypt().

Huh, why do you need to store passwords in Apaches md5 crypt() format?

,--[ Apache config ]--
| AuthType Basic
| AuthName "bla …"
| AuthBasicProvider dbm
| AuthDBMUserFile /path/2/.htpasswd
| Require valid-user
| Order allow,deny
| Allow from 203.0.113.0/24 2001:db8::/32
| Satisfy any
`--

,--[ stdin/stdout ]--
| user@localhost ~ $  python
| Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
| [GCC 4.3.3] on linux2
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import anydbm
| >>> dbm = anydbm.open('/path/2/.htpasswd')
| >>> dbm['user']
| 
'$6$Rn6L.3hT2x6dnX0t$d0/Tx.Ps3KSRxxm.ggFBYqum54/k8JmDzUcpoCXre88cBEXK8WB.Vdb1YzN.8fOvz3fJU4uLgW0/AlTiB9Ui2.::Real
 Name'
| >>> 
`--

Regards,
Pascal
-- 
The trapper recommends today: deadbeef.1200...@localdomain.org


Re: [Dovecot] Storing passwords encrypted... bcrypt?

2012-01-04 Thread Pascal Volk
On 01/05/2012 03:36 AM Noel Butler wrote:

> 
> Because with multiple servers, we store them all in (replicated)
> mysql :)  (the same with postfix/dovecot).
> and as I'm sure you are aware, Apache does not understand standard
> crypted MD5, hence why there is the second option of apache_md5_crypt()

Oh, let me guess: You are using Windows, Netware, TPF as OS for your
web servers? ;-)

man htpasswd | grep -- '-d  '
   -d Use crypt() encryption for passwords. This is not supported by 
the httpd server on Windows and Netware and TPF.


As you may have seen in my previous mail, the password is generated
using crypt(). HTTP Authentication works with that password hash, even
with the httpd from the ASF.


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1200...@localdomain.org


Re: [Dovecot] Storing passwords encrypted... bcrypt?

2012-01-05 Thread Pascal Volk
On 01/05/2012 12:31 PM Charles Marcus wrote:
> …
> You said above that 'yes, I can use it with dovecot' - but what about 
> postfix and mysql... where/how do they fit into this mix? My thought was 
> that there are two issues here:
> 
> 1. Storing them in bcrypted form, and

For MySQL the bcrypted password is just a varchar.

> 2. The clients must support *decrypting* them...

Sorry, i don't know if clients need to know anything about the used
password scheme. The used password scheme is mostly relevant for
Dovecot. Don't mix password scheme and authentication scheme.

> So, since I use postfixadmin, I'm guessing that for #1, it will have to 
> support encrypting them in bcrypt form, and then I have to worry about 
> dovecot - and since I'm planning on using postfix+dovecot-sasl, once 
> dovecot supports it, postfix will too...
> 
> Is that about right?

I think that's correct. Postfix uses Dovecot for the authentication stuff.
If I'm wrong, please let me know it.


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1200...@localdomain.org


[Dovecot] 2.1.rc3 (1a722c7676bb): doveadm mailbox list withholds child mailboxes

2012-01-12 Thread Pascal Volk
Probably I've overlooked something. But a quick search in `hg log -k
doveadm` didn't show appropriate information.
doveadm mailbox list -u u...@example.com doesn't show child mailboxes.

mailbox = N/A || \*:
Sent
Trash
INBOX
Drafts
Junk-E-Mail
Supplier

mailbox = Supplier*:
Supplier

mailbox = Supplier/*:
Supplier/Dell
Supplier/VMware
Supplier/…

The same problem exists in `doveadm mailbox status`


Regards,
Pascal
-- 
The trapper recommends today: defaced.1201...@localdomain.org


[Dovecot] 2.1.rc3 (1a722c7676bb):dsync umlaut problems

2012-01-12 Thread Pascal Volk
All umlauts in mailbox names are lost after converting mbox/Maildir
mailboxes to mdbox.

[location2 scp-ed from the old server]
 # ls -d /srv/import/Maildir/.Gel\&APY-schte\ Elemente/
/srv/import/Maildir/.Gel&APY-schte Elemente/

# dsync -u j...@example.com -v mirror maildir:/srv/import/Maildir/
…
dsync(j...@example.com): Info: Gelöschte Elemente: only in dest …
…

# doveadm mailbox list -u j...@example.com Gel*
Gel__schte_Elemente

# ls -d mdbox/mailboxes/Gel*
mdbox/mailboxes/Gel__schte_Elemente


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1201...@localdomain.org


Re: [Dovecot] 2.1.rc3 (1a722c7676bb):dsync umlaut problems

2012-01-13 Thread Pascal Volk
On 01/13/2012 04:10 AM Pascal Volk wrote:
> All umlauts in mailbox names are lost after converting mbox/Maildir
> mailboxes to mdbox.
> 
>  # ls -d /srv/import/Maildir/.Gel\&APY-schte\ Elemente/
> /srv/import/Maildir/.Gel&APY-schte Elemente/
> …
> # doveadm mailbox list -u j...@example.com Gel*
> Gel__schte_Elemente

Oh, and child mailboxes with umlauts becomes top level mailboxes:

# ls -d /srv/import/Maildir/.INBOX.Projekte.K\&APY-ln
/srv/import/Maildir/.INBOX.Projekte.K&APY-ln

#ls -d mdbox/mailboxes/INBOX_Projekte_K__ln
mdbox/mailboxes/INBOX_Projekte_K__ln


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1201...@localdomain.org


[Dovecot] 2.1.rc3 (1a722c7676bb): Panic: file ostream.c: line 173 (o_stream_sendv): assertion failed: (stream->stream_errno != 0)

2012-01-13 Thread Pascal Volk
Hi Timo,

today some imap processes are crashed.


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1201...@localdomain.org
#0  0x7ff2b6e16405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7ff2b6e19680 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x7ff2b71b7e08 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) 
at failures.c:187
backtrace = 0x1ffe7f8 "/usr/local/lib/dovecot/libdovecot.so.0(+0x4fde1) 
[0x7ff2b71b7de1] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x510c7) 
[0x7ff2b71b90c7] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7ff2b71b8"...
#3  0x7ff2b71b90c7 in i_internal_fatal_handler (ctx=0x7fff28ca9070, 
format=0x7ff2b71efb38 "file %s: line %d (%s): assertion failed: (%s)", 
args=0x7fff28ca9058) at failures.c:645
status = 0
#4  0x7ff2b71b80f1 in i_panic (format=0x7ff2b71efb38 "file %s: line %d 
(%s): assertion failed: (%s)") at failures.c:259
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 
0x7fff28ca9140, reg_save_area = 0x7fff28ca9080}}
#5  0x7ff2b71d52b7 in o_stream_sendv (stream=0x20350c8, iov=0x7fff28ca91b0, 
iov_count=1) at ostream.c:173
_stream = 0x2035040
i = 1
total_size = 1
ret = -1
__FUNCTION__ = "o_stream_sendv"
#6  0x7ff2b71d51ad in o_stream_send (stream=0x20350c8, data=0x7fff28ca9207, 
size=1) at ostream.c:150
iov = {iov_base = 0x7fff28ca9207, iov_len = 1}
#7  0x00417ff4 in imap_fetch_send (ctx=0x202e598, output=0x20350c8, 
input=0x20bfc90, cr_skipped=false, virtual_size=908982, add_missing_eoh=false, 
last_cr=0x202e640) at imap-fetch-body.c:163
msg = 0x20c6418 "\nofGng…8<[snipped]>8…zfMNW4nyRyK4"...
i = 77
size = 1314
vsize_left = 688658
sent = 220323
ret = 77
add = 13 '\r'
blocks = false
#8  0x0041823c in fetch_stream_send (ctx=0x202e598) at 
imap-fetch-body.c:219
ret = 4291850
#9  0x004185ec in fetch_stream (ctx=0x202e598, size=0x7fff28ca9340) at 
imap-fetch-body.c:299
input = 0x40064
#10 0x004187a3 in fetch_data (ctx=0x202e598, body=0x20a7af0, 
size=0x7fff28ca9340) at imap-fetch-body.c:332
str = 0x1ffe4a0
#11 0x00418952 in fetch_body (ctx=0x202e598, mail=0x20a8d40, 
body=0x20a7af0) at imap-fetch-body.c:375
fetch_size = 0x7fff28ca9340
input = 0x20bfc90
hdr_size = {physical_size = 140733877752720, virtual_size = 4286334, 
lines = 684364688}
body_size = {physical_size = 897166, virtual_size = 908982, lines = 0}
#12 0x00416b34 in imap_fetch_more_int (ctx=0x202e598) at 
imap-fetch.c:461
h = 0x202e938
_data_stack_cur_id = 4
client = 0x202d8c0
handlers = 0x202e8e8
count = 3
ret = 1
__FUNCTION__ = "imap_fetch_more_int"
#13 0x00416d8e in imap_fetch_more (ctx=0x202e598) at imap-fetch.c:513
ret = 0
__FUNCTION__ = "imap_fetch_more"
#14 0x0040b816 in cmd_fetch (cmd=0x202e450) at cmd-fetch.c:224
client = 0x202d8c0
ctx = 0x202e598
args = 0x2030ca8
next_arg = 0x2030cf8
list_arg = 0x7fff28ca9870
search_args = 0x20a9f20
messageset = 0x2030dd8 "21:98,100:104,131:191,201:202,206:332"
ret = 1
#15 0x004144d8 in command_exec (cmd=0x202e450) at imap-commands.c:147
hook = 0x2007ca0
ret = false
#16 0x004117d9 in cmd_uid (cmd=0x202e450) at cmd-uid.c:27
command = 0x2007980
cmd_name = 0x2030dd0 "fetch"
#17 0x004144d8 in command_exec (cmd=0x202e450) at imap-commands.c:147
hook = 0x2007ca0
ret = false
#18 0x004134f0 in client_command_input (cmd=0x202e450) at 
imap-client.c:673
client = 0x202d8c0
command = 0x7fff28ca9560
__FUNCTION__ = "client_command_input"
#19 0x0041374f in client_command_input (cmd=0x202e450) at 
imap-client.c:724
client = 0x202d8c0
command = 0x2007938
__FUNCTION__ = "client_command_input"
#20 0x0041387a in client_handle_next_command (client=0x202d8c0, 
remove_io_r=0x7fff28ca95fd) at imap-client.c:765
size = 82
#21 0x004138fa in client_handle_input (client=0x202d8c0) at 
imap-client.c:777
_data_stack_cur_id = 3
ret = false
remove_io = false
handled_commands = false
__FUNCTION__ = "client_handle_input"
#22 0x00413a70 in client_input (client=0x202d8c0) at imap-client.c:816
cmd = 0x2022dc8
output = 0x20350c8
bytes = 82
__FUNCTION__ = "client_input"
#23 0x7ff2b71ca8ff in io_loop_call_io (io=0x209ce00) at ioloop.c:377
ioloop = 0x2006660
t_id = 2
#24 0x7ff2b71cc430 in io_loop_handler_run (ioloop=0x2006660) at 
ioloop-epoll.c:213
 

Re: [Dovecot] IMAP maillog error: file lib.c: line 37 (nearest_power): assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))

2012-01-14 Thread Pascal Volk
On 01/14/2012 09:17 PM Charles Thompson wrote:
> Dear Mailing List,
> 
>  What does this error mean and how do I fix it? I am on a Centos 4.9
> 
> From /var/log/maillog :
> Jan 14 11:54:51 hostname imap(username): file lib.c: line 37
> (nearest_power): assertion failed: (num <= ((size_t)1 <<
> (BITS_IN_SIZE_T-1)))
> 
> 
> Version information :
> root@hostname[/etc/rc.d/rc3.d]# dovecot --version ; dovecot -n ; cat
> /etc/*release*
> 0.99.11
> Usage: dovecot [-F] [-c ]
> Fatal: Unknown argument: -n
> CentOS release 4.9 (Final)
> root@hostname[/etc/rc.d/rc3.d]#
> 
> Thank you.


To make it sort: Upgrade


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1201...@localdomain.org


[Dovecot] 2.1.rc3 (1a722c7676bb): doveadm mailbox list -> Segmentation fault

2012-01-15 Thread Pascal Volk
Oops, I did it again.
-- 
The trapper recommends today: c01dcofe.1201...@localdomain.org
Reading symbols from /usr/local/bin/doveadm...done.
[New LWP 21046]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Core was generated by `doveadm mailbox list -u jane@example.com /*'.
Program terminated with signal 11, Segmentation fault.
#0  0x7fd15b7b4c72 in imap_match (glob=0x0, data=0x7fd15bd72c11 "INBOX") at 
imap-match.c:367
367 ctx.sep = glob->sep;
#0  0x7fd15b7b4c72 in imap_match (glob=0x0, data=0x7fd15bd72c11 "INBOX") at 
imap-match.c:367
ctx = {inboxcase_end = 0x0, sep = -64 '\300', inboxcase = 86}
i = 0
ret = IMAP_MATCH_NO
match = IMAP_MATCH_NO
#1  0x7fd15bcc07a7 in fs_list_next (ctx=0x25f56c0) at 
mailbox-list-fs-iter.c:622
dir = 0x7fd15b7d8c77
entries = 0x7fd15c1d7520
count = 32767
ret = 0
#2  0x7fd15bcc0821 in fs_list_iter_next (_ctx=0x25f56c0) at 
mailbox-list-fs-iter.c:645
_data_stack_cur_id = 2
ctx = 0x25f56c0
ret = 0
__FUNCTION__ = "fs_list_iter_next"
#3  0x7fd15bcb73ae in mailbox_list_iter_next_call (ctx=0x25f56c0) at 
mailbox-list-iter.c:570
info = 0x7fd15bfc3742
set = 0x7fd15bc6c000
#4  0x7fd15bcb74c8 in autocreate_iter_next (ctx=0x25f56c0) at 
mailbox-list-iter.c:598
actx = 0x25f5848
info = 0x7fff596409b0
autoboxes = 0x40df50
autobox = 0x7fff596405f0
count = 0
__FUNCTION__ = "autocreate_iter_next"
#5  0x7fd15bcb763e in mailbox_list_iter_next (ctx=0x25f56c0) at 
mailbox-list-iter.c:631
info = 0x7fd15c1d4550
#6  0x7fd15bcb67ad in mailbox_list_ns_iter_next (_ctx=0x25f52b0) at 
mailbox-list-iter.c:298
ctx = 0x25f52b0
info = 0x7fff59640640
#7  0x7fd15bcb73ae in mailbox_list_iter_next_call (ctx=0x25f52b0) at 
mailbox-list-iter.c:570
info = 0x25efb00
set = 0x25f52b0
#8  0x7fd15bcb7650 in mailbox_list_iter_next (ctx=0x25f52b0) at 
mailbox-list-iter.c:633
info = 0x7fd15c1d71c8
#9  0x0041441a in doveadm_mail_list_iter_next (iter=0x25f5240) at 
doveadm-mail-list-iter.c:123
info = 0x25f5240
len = 16843009
#10 0x00412556 in cmd_mailbox_list_run (_ctx=0x25db210, user=0x25eee00) 
at doveadm-mail-mailbox.c:114
ctx = 0x25db210
iter_flags = 4097
iter = 0x25f5240
info = 0x7fd15bd71d0c
str = 0x25c9d40
#11 0x0040e6f6 in doveadm_mail_next_user (ctx=0x25db210, 
input=0x7fff59640770, error_r=0x7fff59640730) at doveadm-mail.c:221
error = 0x25dc1a0 ""
ret = 0
#12 0x0040e7e9 in doveadm_mail_single_user (ctx=0x25db210, 
input=0x7fff59640770) at doveadm-mail.c:242
error = 0x0
ret = 32721
__FUNCTION__ = "doveadm_mail_single_user"
#13 0x0040efad in doveadm_mail_cmd (cmd=0x25d8048, argc=4, 
argv=0x25d0398) at doveadm-mail.c:425
input = {module = 0x0, service = 0x43b268 "doveadm", username = 
0x25d03c0 "jane@example.com", local_ip = {family = 0, u = {ip6 = {__in6_u = 
{__u6_addr8 = '\000' , 
  __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 
0, 0}}}, ip4 = {s_addr = 0}}}, remote_ip = {family = 0, u = {ip6 = {__in6_u = 
{__u6_addr8 = '\000' , 
  __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 
0, 0}}}, ip4 = {s_addr = 0}}}, local_port = 0, remote_port = 0, userdb_fields = 
0x0, flags_override_add = 0, 
  flags_override_remove = 0, no_userdb_lookup = 0}
ctx = 0x25db210
getopt_args = 0x25c8358 "AS:u:78s"
wildcard_user = 0x0
c = -1
#14 0x0040f164 in doveadm_mail_try_run_multi_word (cmd=0x25d8048, 
cmdname=0x43bea8 "list", argc=5, argv=0x25d0378) at doveadm-mail.c:468
len = 4
#15 0x0040f29b in doveadm_mail_try_run (cmd_name=0x25d03b0 "mailbox", 
argc=5, argv=0x25d0378) at doveadm-mail.c:491
subcmd = 0x43bea8 "list"
cmd__foreach_end = 0x25d8168
cmd = 0x25d8048
cmd_name_len = 7
__FUNCTION__ = "doveadm_mail_try_run"
#16 0x0041798e in main (argc=5, argv=0x25d0378) at doveadm.c:352
service_flags = 10
cmd_name = 0x25d03b0 "mailbox"
i = 16
quick_init = false
c = -1


Re: [Dovecot] [Dovecot 2.1] ACL plugin makes imap service crash when using some clients

2012-01-17 Thread Pascal Volk
On 01/18/2012 02:03 AM interfaSys sàrl wrote:
> Hello,
> 
> I've just noticed that when Horde is connecting to Dovecot 2.1, it
> crashes the imap service if Dovecot is configured to use the ACL plugin.
> I'm not sure what's so special about the command Horde sends, but it
> shouldn't make Dovecot crash. Everything is fine when using Thunderbird.
> 
> Here is the message in Dovecot's logs
> "Fatal: master: service(imap): child 89974 killed with signal 11 (core
> not dumped)"
> 
> The message says that the core is not dumped, even though I did add
> drop_priv_before_exec=yes to my config file.

dovecot stop
ulimit -c unlimited
dovecot

Now connect with Horde and let it crash.

> I've tried connecting to the pid using gdb, but the process just hangs
> as soon as I'm connected.
> 

continue
[wait for the crash]
bt full
detach
quit


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1201...@localdomain.org


Re: [Dovecot] 2.1.rc3 (1a722c7676bb): doveadm mailbox list withholds child mailboxes

2012-01-20 Thread Pascal Volk
On 01/13/2012 02:25 AM Pascal Volk wrote:
> doveadm mailbox list -u u...@example.com doesn't show child mailboxes.

Looks like http://hg.dovecot.org/dovecot-2.1/rev/54e74090fb42 fixed the
problem. Thanks


Regards,
Pascal
-- 
The trapper recommends today: defaced.1202...@localdomain.org


Re: [Dovecot] FOSDEM

2012-01-25 Thread Pascal Volk
On 01/26/2012 12:15 AM Timo Sirainen wrote:
> I'll be in FOSDEM giving a small lightning talk about Dovecot: 
> http://fosdem.org/2012/schedule/event/dovecot
> 
> I'll also be around in FOSDEM the whole time, so if you're there and want to 
> talk to me about anything, send me an email at some point.

I'll be there too.

> Poll to dovecot-news list people: Do you want to see these kind of news about 
> my upcoming talks sent to the list? Probably happens a few times/year. A 
> simple "yes" or "no" reply to this mail privately to me is enough.

yes


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1202...@localdomain.org


[Dovecot] v2.1.rc5 (85a9b5236b6c) Error: lmtp client: DNS lookup of $FQDN failed: connect(dns-client) failed: No such file or directory

2012-01-28 Thread Pascal Volk
When the Sieve plugin tries to send a vacation message or redirect
a message to another address it fails.

dovecot: lmtp(6412, u...@example.com): Error: lmtp client: DNS lookup of 
orange.example.com failed: connect(dns-client) failed: No such file or directory
dovecot: lmtp(6412, u...@example.com): Error: dAIOClYSJE8MGQAAhQ0vrQ: sieve: 
msgid=<4f241255.2060...@example.com>: failed to redirect message to 
 (refer to server log for more information)

But the dns-client sockets are created when Dovecot starts up:

# find /usr/local/var/run/dovecot -name dns-client -exec ls -l {} +
srw-rw-rw- 1 root staff 0 Jan 28 16:15 /usr/local/var/run/dovecot/dns-client
srw-rw-rw- 1 root root  0 Jan 28 16:15 
/usr/local/var/run/dovecot/login/dns-client

Hum, is it Dovecot or Pigeonhole (dovecot-2.1-pigeonhole 1600:b2a456e15ed5)?


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.1202...@localdomain.org


Re: [Dovecot] 2.1.rc3 (1a722c7676bb): Panic: file ostream.c: line 173 (o_stream_sendv): assertion failed: (stream->stream_errno != 0)

2012-01-29 Thread Pascal Volk
Looks like http://hg.dovecot.org/dovecot-2.1/rev/3c0bd1fd035b has solved
the problem.

-- 
The trapper recommends today: fabaceae.1203...@localdomain.org


Re: [Dovecot] 2.1.rc5 Cannot delete folders from trash

2012-02-12 Thread Pascal Volk
On 02/12/2012 12:18 PM Mike Constabel wrote:
> Hi,
> 
> If I delete a folder "foo" in Thunderbird, it is moved to trash.
> …
> If I delete foo from trash, thunderbird removed it from view, 
> but if I restart thunderbird, the folder is still in trash.
> 
> No error in dovecot log, no error in thunderbird.

http://hg.dovecot.org/dovecot-2.1/file/b9e74767cd39/doc/example-config/conf.d/20-imap.conf#l47


Regards,
Pascal
-- 
The trapper recommends today: deadbeef.1204...@localdomain.org


Re: [Dovecot] Has dovecot 2.1.1 been built and tested on AIX 6.1???

2012-03-09 Thread Pascal Volk
On 03/09/2012 12:23 AM Bennett, Tony wrote:
> I have downloaded and built dovecot 2.1.1 using gcc on AIX 6.1.
> (The output of "dovecot -n" is at the bottom of this email.)
> 
> I'm trying "baby steps" to get it up, before I give it the final 
> configuration.
> (My apologies: I was pointed to  RFC3501 and told to get an IMAP server,
> build it, configure it, and bring it up)
> 
> What is currently occurring when I start dovecot is:
>Error: service(pop3-login): listen(::, 110) failed: Address already in 
> use
>Error: service(pop3-login): listen(::, 995) failed: Address already in 
> use
>Error: service(imap-login): listen(::, 143) failed: Address already in 
> use
>Error: service(imap-login): listen(::, 993) failed: Address already in 
> use
>Fatal: Failed to start listeners

Edit your dovecot.conf around line 26. By default listen is set to '*,
::' If your host doesn't have IPv6 enabled use:

listen = *


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1206...@localdomain.org


Re: [Dovecot] sieve and utf-7 foldernames

2012-03-09 Thread Pascal Volk
On 03/09/2012 10:40 PM Andreas Schulze wrote:
> Hi all,
> 
> since many dovecot/pigeonhole versions I have an error:
> Mails are delivered into wrong folders if the foldername contain a german 
> umlaut. ( ä, ö, ü )
> …

Behaves as documented - since Dovecot 1.2.0:

Wiki > Upgrading > v1.1 to v1.2 > Sieve:
* You should consider migrating from CMU Sieve to Dovecot Sieve
  (see the link for instructions)

http://wiki.dovecot.org/LDA/Sieve/Dovecot#Migration_from_CMUSieve:

* Be sure to use UTF8 for the mailbox argument of the fileinto command.
  Older CMUSieve installations used modified UTF7 (as IMAP does) for
  the mailbox parameter. If not adjusted, the new Sieve plugin will use
  the wrong folder name for storing the message.


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1207...@localdomain.org


Re: [Dovecot] Valid config for lda_mailbox_autosubscribe with dovecot 1.2?

2012-05-17 Thread Pascal Volk
On 05/17/2012 12:11 PM Joan wrote:
> Hi,
> 
> Due to some reasons I've to support both dovecot 1.2 and dovecot 2.x, and I
> just found that the -s parameter I used to autosubscribe to sieve folders
> doesn't exist anymore in dovecot 2.x
> The problem arises because (AFAIK) in postfix's master.cf you can only
> specify one configuration, and I used to have this:
> 
> dovecot   unix  -   n   n   -   -   pipe
>   flags=DRhu user=vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d
> ${recipient} -s
> 
> 
> Is there any way to make the config compatible for both versions, achieving
> the autosubscribe and not crashing dovecot?

Just add a second dovecot entry, with a differently service name, to
your master.cf, e.g.

dovecot20 unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail argv=/usr/lib/dovecot2.0/dovecot-lda
 -f ${sender} -d ${recipient}

Then create a transport(5) map and list your 'Dovecot 2' users there, e.g:
john@example.comdovecot20:

BUT, with Dovecot v2.0 you should better use Dovecots lmpt service.


Regards,
Pascal
-- 
The trapper recommends today: deadbeef.1213...@localdomain.org


Re: [Dovecot] Sieve: Mailbox doesn't exist

2012-06-12 Thread Pascal Volk
On 06/12/2012 01:32 AM Stefan Fricke wrote:
> I have just set up a mail server on Ubuntu, using Postfix and Dovecot 2.0.19. 
> It works well but I can't get Sieve working. I always get the error that the 
> target mailbox doesn't exist. In fact it doesn't but isn'r Dovecot supposed 
> to 
> create it?

Not with your current configuration. See:
http://hg.dovecot.org/dovecot-2.0/file/2.0.19/doc/example-config/conf.d/15-lda.conf#l39

> 
> Here is my doveconf -n:
> 
> # 2.0.19: /etc/dovecot/dovecot.conf
> # OS: Linux 3.2.0-24-generic x86_64 Ubuntu 12.04 LTS 
> mail_debug = yes
> mail_location = maildir:~/Maildir
> managesieve_notify_capability = mailto
> managesieve_sieve_capability = fileinto reject envelope encoded-character 
> vacation subaddress comparator-i;ascii-numeric relational regex imap4flags 
> copy include variables body enotify environment mailbox date ihave
> passdb {
>   driver = pam
> }
> plugin {
>   sieve = ~/.dovecot.sieve
>   sieve_dir = ~/sieve 
>   
> } 
>   
> protocols = imap pop3 sieve
> service auth {
>   unix_listener /var/spool/postfix/private/dovecot-auth {
> group = postfix
> mode = 0660
> user = postfix
>   }
> }
> service managesieve-login {
>   inet_listener sieve {
> port = 4190
>   }
>   service_count = 1
> }
> ssl_cert =  ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:
> +MEDIUM
> ssl_key =  userdb {
>   driver = passwd
> }
> protocol imap {
>   imap_client_workarounds = delay-newmail
>   mail_max_userip_connections = 10
> }
> protocol pop3 {
>   mail_max_userip_connections = 10
>   pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
> }
> protocol lda {
>   deliver_log_format = msgid=%m: %$
>   mail_plugins = sieve
>   postmaster_address = postmaster
>   quota_full_tempfail = yes
>   rejection_reason = Your message to <%t> was automatically rejected:%n%r
> }
> 
> 
> 


Regards,
Pascal

-- 
The trapper recommends today: cafefeed.1216...@localdomain.org


Re: [Dovecot] Please help me resolve why mail isn't being delivered to virtual users

2008-01-09 Thread Pascal Volk
Am 09.01.2008 21:43 schrieb Asheesh Laroia:
> Not in the way I was describing:
> 
> Let's say some person logs on to your Dovecot-based IMAP service and 
> figures out how to take over Dovecot to read and modify arbitrary files on 
> the system.  (Timo, I hope this doesn't happen - but bear with me.)  To be 
> clear, Dovecot's imap handler runs as the UNIX UID associated with the 
> user logging in, not root.
> 
> In the virtual user setup that the thread starter described, the user 
> shares his UNIX UID with the other virtual users on the system.  So he has 
> UNIX permission to read and write other users' mail.

This will be only the case, if you have a poor™ setup.
If the setup is done right, each imap/pop user will have it's on UID.
And therefor each imap/pop process will run with the UID from the user.

,--[ `ps aux | grep imap | head -n 5` ]--
| 70001 5691  0.0  0.0   2676  1416 ?S12:45   0:00 imap
| 70002 5693  0.0  0.0   2600  1212 ?S12:45   0:00 imap
| 70014 5695  0.0  0.0   2676  1256 ?S12:45   0:00 imap
| 70013 5696  0.0  0.0   2420  1164 ?S12:45   0:00 imap
| 7 5698  0.0  0.0   2564  1200 ?S12:45   0:00 imap
`--

> In my setup where you assign separate UIDs to each user, the attacking 
> user can only read/modify the files that he has UNIX filesystem permission 
> to read/modify.  That would limit the attacker to only being able to 
> destroy his own mail, unlike the virtual user setup.
> 
>> Virtual users do not have all of their data jumbled together into one 
>> file, which seems to me anyway what you are referring to.
> 
> No, I meant filesystem-level permissions.  Obviously no one is talking 
> about different users having "all their data jumbled together into one 
> file"; sorry if I wasn't clear.

Filesystem-level permissions are also possible with virtual Users:

,--[ `ls -l /srv/mail/1/70003 | tail -n 5` ]--
| drwx-- 3 70007 70003 4096 2007-12-31 17:48 70007
| drwx-- 3 70008 70003 4096 2007-10-16 23:07 70008
| drwx-- 3 70009 70003 4096 2007-10-16 23:08 70009
| drwx-- 3 70010 70003 4096 2007-10-16 23:08 70010
| drwx-- 3 70011 70003 4096 2007-12-31 18:19 70011
`--


> This has the side-effect of not using UNIX UIDs to isolate the different 
> users' data from each other.

Oh, would you please explain why this should be?

> Because you can gain the benefit of UNIX filesystem permissions.

It's also possible with virtual domains/users.

> I am sure what I'm trying to describe here; it's scenario 1.  It should be 
> "trivial", just like adding new virtual users, and I believe the above is 
> the way to do it, but again I would double-check because I haven't done 
> this in a while and neglected to keep notes when I did it.
> 
> I hope that clears things up.  If this is getting off-topic and boring let 
> me know.


It is very trivial to manage multiple virtual domains with a lot of
virtual users:

,--[ stdout ]--
| hostname ~ # vmm da new.exmple.com
| hostname ~ # vmm useradd [EMAIL PROTECTED]
| Enter new password:
| Retype new password:
| hostname ~ # vmm ua [EMAIL PROTECTED] p4s5W0rd
| hostname ~ # vmm aa [EMAIL PROTECTED] [EMAIL PROTECTED]
| hostname ~ # vmm di new.exmple.com detailed | tail -n 9
| Available accounts
| --
| [EMAIL PROTECTED]
| [EMAIL PROTECTED]
|
| Available aliases
| -
|[EMAIL PROTECTED]
`--

Regards
Pascal


Re: [Dovecot] Please help me resolve why mail isn't being delivered to virtual users

2008-01-09 Thread Pascal Volk
Am 09.01.2008 22:51 schrieb Asheesh Laroia:
> 
> As they say, I have been schooled. (-:
> 
> My apologies - I wasn't aware of these "virtual user with a UID" setups. 
> I was only aware of the "virtual users all share a UID" setup like the 
> thread starter described.

What should I say? The Dovecot wiki  is very
informative. :-)

> Can you provide a link to documentation on the system that you're 
> describing?

Documentation? At the moment there is only a INSTALL file:
http://vmm.svn.sourceforge.net/viewvc/vmm/trunk/INSTALL?view=markup

In order to work with the Virtual Mail Manager (vmm) you have to install:
* self-evident Dovecot
* Postfix
* PostgreSQL
* Python with pyPgSQL 

Regards
Pascal


Re: [Dovecot] setgid fails

2008-01-14 Thread Pascal Volk
Am 14.01.2008 17:58 schrieb Anil:
> I am using LDA/Sendmail. 20080113 version of dovecot.
> 
> Jan 14 08:52:18 vds5 deliver([EMAIL PROTECTED]): [ID 308812 mail.crit]
> setgid(10002) failed with euid=1, egid=1: Not owner

Hi Anil,

Your have done your setup (all steps) as described in
http://wiki.dovecot.org/LDA/Sendmail?

Regards
Pascal


Re: [Dovecot] localhost deliver([EMAIL PROTECTED]): setgid(5001) failed with euid=8, gid=8, egid=8: Operation not permitted

2008-04-12 Thread Pascal Volk
Am 12.04.2008 20:07 schrieb Gert Cuykens:
> […]
> Now the security part, i was thinking that this would work also
> 
> [EMAIL PROTECTED]:~# ls -al /usr/lib/dovecot/deliver
> -rws-- 1 mail mail 563112 2008-03-31 21:05 /usr/lib/dovecot/deliver
> [EMAIL PROTECTED]:~#
> 
> but it doesnt, changing it to user postfix also doesnt work ?

OK, step by step.

 1. chown 0.0 /usr/lib/dovecot/deliver
 2. chmod 755 /usr/lib/dovecot/deliver
 3. find out the user from postfix's master.cf
(... flags=DRhu user=nobody:mail argv=/usr/.../deliver)
 ^^
NOT: root, dovecot or postfix!
 4. mkdir /usr/local/lib/dovecot
 5. chmod 700 /usr/local/lib/dovecot
 6. chown nobody /usr/local/lib/dovecot
 7. cp -p /usr/lib/dovecot/deliver /usr/local/lib/dovecot
 8. chmod u+s /usr/local/lib/dovecot/deliver
 9. apply the path from 8. to argv from service dovecot in postfix's
master.cf
10. restart postfix and enjoy


HTH
Pascal


Re: [Dovecot] sieve doesn't sift yet

2008-04-27 Thread Pascal Volk
Am 27.04.2008 22:23 schrieb cbrace:
> 
> cbrace wrote:
>> Do I need to add an entry to Postfix's main.conf?
>>
> Sorry, I meant master.conf.

Add the entry to Postfix's master.cf
In Postfix's main.cf set virtual_transport = dovecot:


Regards,
Pascal


Re: [Dovecot] Can't connect to IMAP

2008-08-06 Thread Pascal Volk
Hi David,

Am 06.08.2008 10:59 schrieb David Hall:
> …
> My problem since a few days back is that IMAP doesn't seem to be started.
> 
> The logfiles says's everything is in order, but port 143 isn't up and
> Squirrelmail can't connect, i have no clue what's causing this
> everything runned smoothly a couple of days ago.
> 
> Im using postfix/amavis & spamassasin.

Is Dovecot really running on your system? Please show the output from
`ps -ef | grep dovecot` and `netstat -tlpn | egrep ':(143|993)`.
How do you try to connect to the imapd?
http://wiki.dovecot.org/TestInstallation

> Here's some information
> 
> Dovecot v1.1.2
> 
> [output from `dovecot -n` snipped ]
> 
> And once again.
> 
> I don't get any errors in the logfiles.
> 
> Mail.log last 5 lines after a restart
> …
> Aug  6 07:47:58 localhost postfix/virtual[32190]: C4FD1406024:
> to=<[EMAIL PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=virtual,
> delay=0.07, delays=0.03/0.02/0/0.02, dsn=2.0.0, status=sent (delivered
> to maildir)
> …

This Mail was delivered with Postfix's virtual transport, not with
Dovecot's LDA http://wiki.dovecot.org/LDA/Postfix()

> Aug  6 10:55:56 localhost dovecot: Killed with signal 15
> Aug  6 10:55:56 localhost dovecot: Dovecot v1.1.2 starting up
> Aug  6 10:55:57 localhost dovecot: auth-worker(default): mysql:
> Connected to localhost (postfix)

Looks good.


Regards,
Pascal


Re: [Dovecot] dovecot sieve sends vacation messages with null envelope sender

2008-08-12 Thread Pascal Volk
Am 12.08.2008 13:32 schrieb Josef Liška:
> 
> …
> But it sends vacation messages with null envelope sender, which is in my 
> opinion undesirable, because many vacation messages are caught in spam 
> filters.
> 
> I think there could be same sender on envelope.
> In dovecot-sieve/src/sieve-cmu.c around line 380 is a call to 
> smtp_client_open(src->addr, NULL, &f);
> NULL could be replaced with src->fromaddr

Hi Josef,

this is not a bug - it's a _fetaure_ :-)
This morning Stephan Bosch wrote:
http://www.dovecot.org/list/dovecot/2008-August/032799.html


Regards,
Pascal


Re: [Dovecot] restrict webmail access

2008-08-12 Thread Pascal Volk
Am 12.08.2008 16:35 schrieb Jan:
> Hi
> 
> I'm using dovecot imap with ldap accounts. User management interface is 
> phamm. Internal clients connect directly using imap client. External 
> clients must use webmail (squirrelmail). But not everyone is supposed to 
> use webmail. Is there any way to control who is allowed to log in from a 
> specific IP (webmail ip)?

Hi Jan,

yes, it's possible to restrict the access for some/all users to a given
network range. More information:
http://wiki.dovecot.org/PasswordDatabase/ExtraFields/AllowNets


Regards,
Pascal


Re: [Dovecot] Postfix and Dovecot SASL authentication error

2008-08-23 Thread Pascal Volk
Am 23.08.2008 16:00 schrieb sharad kanekar:
> ear All,
> I configured Postfix 2.3.3-2 on CentOS 5.2 using SASL Dovecot
> authentication put I am facing the problem to receive mails . My postconf -n
> result is:
> [EMAIL PROTECTED] ~]# postconf -n
> …
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_path = private/auth
> smtpd_sasl_type = dovecot

Looks good.

> And my /var/log/maillog is:
> Aug 23 19:01:03 mails dovecot: Dovecot v1.0.rc15 starting up
> Aug 23 19:01:55 mails postfix/smtpd[3472]: warning: SASL: Connect to
> private/auth failed: No such file or directory
   ^


> And our server 's  fetchmail -vvv log is:
> …
Not so interesting while your system is not proper setup yet. ;-)

You have forgot to send the output from `dovecot -n`. But before doing
so, please read http://wiki.dovecot.org/HowTo/PostfixAndDovecotSASL.
Compare your dovecot.conf with the example dovecot.conf excerpt.


Regards,
Pascal



Re: [Dovecot] Possible to log IMAP connections to MySQL Table?

2008-12-24 Thread Pascal Volk
Am 23.12.2008 21:50 schrieb Corey Shaw:
> Is it currently possible to log all IMAP connection attempts to a MySQL 
> table?  Thanks. 

If you really want to log _all_ IMAP connections you could create a
MySQL procedure that will log all interesting data you provide and
finally returns the data for Dovecots password query.
If you want to log only successful IMAP logins you should have a look at
http://wiki.dovecot.org/PostLoginScripting


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install debian.”
 -- unknown


Re: [Dovecot] Logging logs moved/deleted

2008-12-25 Thread Pascal Volk
Am 25.12.2008 23:41 schrieb Nicolas Letellier:
> On Thu, 25 Dec 2008 21:08:54 +0200
> Timo Sirainen  wrote:
>> http://wiki.dovecot.org/Plugins/MailLog
>>
> Thanks, it's a good news!
> But... how use this plugin? And how activate it in my dovecot configuration?
> 

Activate this plugin like each other Dovecote plugin. For example the
cmusieve plugin in your "protocol lda {...}" section.
All you have to know about the plugin is described on the page Timo has
linked to.


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install debian.”
 -- unknown


Re: [Dovecot] 1.1.9 release candidate

2009-01-16 Thread Pascal Volk
On 16.01.2009 00:06 Timo Sirainen wrote:
> http://dovecot.org/tmp/dovecot-1.1.9.rc.tar.gz
> 
> There are a couple of a bit larger changes, so would be nice if a few
> people tested this on different setups before I released the final
> v1.1.9.
> 
> Changes since v1.1.8:
> 
>   […]
>   - pgsql: Handle reconnecting to server without failing auth lookups.
>   […]

Hi Timo,

I've compiled v1.1.9.rc on OpenBSD 4.2. After restarting the PostgreSQL
server I'm getting this error:

Jan 16 16:16:53 vh3 dovecot: auth(default): sql(u...@example.org): User query 
failed: FATAL:  terminating connection due to administrator command
Jan 16 16:16:53 vh3 dovecot: auth(default): kevent(EV_DELETE, 10) failed: Bad 
file descriptor
Jan 16 16:16:53 vh3 deliver(u...@example.org): Auth lookup returned failure

Next time when Postfix tries to deliver messages Dovecot reconnects to
the database:

Jan 16 16:20:19 vh3 dovecot: auth(default): pgsql: Connected to mailsys


Regards
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown



[Dovecot] Reject message if user is over quota. 2/3 solution for Postfix w/ PostgreSQL

2009-01-19 Thread Pascal Volk
Hi,

according to the both discussions in the last few days I've tried to
find a solution for Postfix with a PostgreSQL back-end.
Its working nice for regular recipient addresses like u...@example.com
and addresses with an extension like user+...@example.com.
Alias addresses are currently ignored.
* An alias may expand into multiple destinations. If one of this
  destinations is over quota Postfix will expose the destination
  address from the alias
* An alias address may point to an external destination.
* Aliases, with just one internal destination maybe simple to expand
  (homework ;-))

Maybe someone of you would provide ideas for handling alias addresses.

The procedure is designed for global quota settings. If one of you is
using quota settings per user, you have to modify the procedure.

Integrating in main.cf:
smtpd_recipient_restrictions =
  ...
  reject_unlisted_recipient
  check_recipient_access pgsql:/etc/postfix/virtual_global_quota_check.cf
  ...

virtual_global_quota_check.cf:
# The hosts that Postfix will try to connect to
hosts = localhost
# The user name and password to log into the pgsql server.
user = $Your_Postfix_database_user
password = $PASSWORD
# The database name on the servers.
dbname = mailsys
# The query 
query = SELECT postfix_global_quota_check('%u', '%d', 10485760, 1000)
#quota limit in bytes ^ 
#quota limit in messages ---^

SQL:

CREATE OR REPLACE FUNCTION postfix_global_quota_check(
IN localpart varchar, IN the_domain varchar,
IN q_storbigint,  IN q_msgs bigint) RETURNS TEXT
AS $$
DECLARE
result text := 'DUNNO';
-- remove extenstion from localpart (user+foo -> user)
lpart varchar := (SELECT regexp_replace(localpart, E'\\+.*$', ''));

-- XXX how to handle alias addresses?
--  stop here if the destination is an external address
--  how to handle aliases with multiple destinations???

address varchar := lpart||'@'||the_domain;
storage bigint := (SELECT current FROM quota
WHERE username = address
  AND path = 'quota/storage');
messages bigint := (SELECT current FROM quota
WHERE username = address
  AND path = 'quota/messages');
BEGIN
--RAISE NOTICE 'users storage: % bytes', storage;
--RAISE NOTICE 'users message count: %', messages;
IF storage >= q_stor THEN
result := '552 5.2.2 Quota exceeded (mailbox for user is full)';
ELSE
IF messages >= q_msgs THEN
result := '552 5.2.2 Quota exceeded (mailbox for user is full)';
END IF;
END IF;
RETURN result;
END;
$$ LANGUAGE plpgsql STABLE
RETURNS NULL ON NULL INPUT
EXTERNAL SECURITY INVOKER;

GRANT SELECT ON quota TO $Your_Postfix_database_user;


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Migration dbmail -> dovecot.

2009-01-20 Thread Pascal Volk
On 20.01.2009 10:42 Андрей Юртайкин wrote:
> Hi i want to migrate from dbmail to dovecot, the main problem is passwords.
> dbmail uses "md5-hash" wich crypt "111" to 
> "$1$tZNR7pR4$jMuuKWm7ljRyL8iEMfjep.".
> 
> Tried all dovecot pass schemes thru `dovecotpw` and no one matches.
> The main question is how to migrate dbmail -> dovecot.

Hm, it's a simple md5 crypt hash, that stores it salt at the beginning
of the hash. How to reproduce:

,--[ Python ]--
|  In [29]: import crypt
|  In [30]: clear, salt = '111', '$1$tZNR7pR4$'
|  In [31]: crypt.crypt(clear, salt)
|  Out[31]: '$1$tZNR7pR4$jMuuKWm7ljRyL8iEMfjep.'
`--


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Migration dbmail -> dovecot.

2009-01-20 Thread Pascal Volk
On 20.01.2009 12:20 Andrey Urtaykin wrote:
> Nice, but  how i can use it in migration ? i mean how to make dovecot 
> use passwords in this format ?
> And i just surprised by fact that google says "You`re fist one who want 
> to migrate from dbmail to dovecot"
> 
>> On 20.01.2009 10:42 Андрей Юртайкин wrote:
>>   
>>> Hi i want to migrate from dbmail to dovecot, the main problem is passwords.
>>> dbmail uses "md5-hash" wich crypt "111" to 
>>> "$1$tZNR7pR4$jMuuKWm7ljRyL8iEMfjep.".
>>>
>>> Tried all dovecot pass schemes thru `dovecotpw` and no one matches.
>>> The main question is how to migrate dbmail -> dovecot.

Please stop top posting!

You could either prefix the passwords with {MD5-CRYPT}
-> {MD5-CRYPT}$1$YOy6751V$sC.VxIRcuXDDX1nhf2.Tl.
or put "default_pass_scheme = MD5-CRYPT" in your dovecot-sql.conf.

(dbmail sounds like it is using a database)


Regards
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Dovecot and .forward

2009-01-21 Thread Pascal Volk
On 21.01.2009 14:50 Claudio Prono wrote:
> Hello to all,
> 
> There is something to be configured to allow dovecot to use the .forward
> file into the user's maildir? I have done some test, but seems dovecot
> don't look into the .forward file and no result at all.
> 
> I use Postfix with the deliver of dovecot, here is my dovecot configuration:
> 
> # 1.1.7: /etc/dovecot/dovecot.conf
> # OS: Linux 2.6.25.18-0.2-pae i686 openSUSE 11.0 (i586) ext3
> ...
> auth default:
>   passdb:
> driver: sql
> args: /etc/dovecot/dovecot-mysql.conf
>   userdb:
> driver: passwd
>   userdb:
> driver: sql
> args: /etc/dovecot/dovecot-mysql.conf
> ...
> 
> Any suggestion to debug that problem?
> 
> Thank u,

Dovecot doesn't read .forward files from users.
Postfixs local (LDA) reads .forward files - BUT not from virtual users
home directories.

You could use the cmusieve plugin which supports
'redirect "a...@addr.ess"'


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Dovecot and .forward

2009-01-21 Thread Pascal Volk
On 21.01.2009 15:58 Claudio Prono wrote:
> Mmm ok, i am looking to make work vacation of HORDE Project with my mail
> server, and this uses the .forward file into the mailbox for run the
> vacation script every time a mail was recieved. I have looked to
> cmusieve with dovecot 1.1.7 and i don't find it. It can be used for read
> the .forward file and execute the vacation program if present in the
> .forward file? Or... alternatively, what i can use?
> 
> I am googled a lot for any response but the problem is...how to search
> ".forward" :)
> 
> Greets,
> 
> Claudio Prono.
> 
> 
> Pascal Volk ha scritto:
>> On 21.01.2009 14:50 Claudio Prono wrote:
>>> ...
>>> # 1.1.7: /etc/dovecot/dovecot.conf
>>> # OS: Linux 2.6.25.18-0.2-pae i686 openSUSE 11.0 (i586) ext3
>>> ...
>>> 
>> You could use the cmusieve plugin which supports
>> 'redirect "a...@addr.ess"'

Please stop top posting!

Are you using the docevot11 rpm from SuSE? This provides the cmusieve
plugin. If you have compiled Dovecot from source code you have also to
compile the sieve plugin in order to use the plugin.

The cmusieve plugin supports also vacation auto-replies. You will find
more details in the wiki: http://wiki.dovecot.org/LDA/Sieve
Which file the sieve plugin reads depends on your configuration.


Regards
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


[Dovecot] How to interpret quota log entries?

2009-01-21 Thread Pascal Volk
Hi,

I've configured a global quota rule, with low limits for testing
purpose: quota_rule = *:storage=10M:messages=10

Why is the percentage value always 0?
What does 'enforcing' mean in this context? Is it not only relevant if
one uses fs-quota?

Jan 21 17:54:44 vh3 dovecot: IMAP(u...@test.tld): Quota root: name=user 
backend=dict args=:proxy::quotadict
Jan 21 17:54:44 vh3 dovecot: IMAP(u...@test.tld): dict quota: 
user=u...@test.tld, uri=proxy::quotadict, enforcing=0
Jan 21 17:54:44 vh3 dovecot: IMAP(u...@test.tld): Quota rule: root=user 
mailbox=* bytes=10485760 (0%) messages=10 (0%)
Jan 21 17:54:49 vh3 deliver(u...@test.tld): Quota root: name=user backend=dict 
args=:proxy::quotadict
Jan 21 17:54:49 vh3 deliver(u...@test.tld): dict quota: user=u...@test.tld, 
uri=proxy::quotadict, enforcing=0
Jan 21 17:54:49 vh3 deliver(u...@test.tld): Quota rule: root=user mailbox=* 
bytes=10485760 (0%) messages=10 (0%)

The current quota usage for u...@test.tld:

mailsys=# SELECT * FROM quota WHERE username = 'u...@test.tld';
   username|  path  | current 
---++-
 u...@test.tld | quota/storage  | 9977225
 u...@test.tld | quota/messages |   4


# 1.1.9: /usr/local/etc/dovecot.conf
# OS: OpenBSD 4.2 i386  
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
login_user: _dovecot
first_valid_uid: 7
first_valid_gid: 7
mail_location: maildir:~/Maildir
mail_debug: yes
mail_plugins: quota imap_quota
auth default:
  mechanisms: plain login cram-md5
  user: nobody
  passdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  userdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: _postfix
  group: _postfix
master:
  path: /usr/local/var/run/dovecot/auth-master
  mode: 384
plugin:
  quota: dict:user::proxy::quotadict
  quota_rule: *:storage=10M:messages=10
  mail_debug: yes
dict:
  quotadict: pgsql:/usr/local/etc/dovecot-dict-quota.conf
  mail_debug: yes


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown



Re: [Dovecot] cmusieve don't works for me...

2009-01-22 Thread Pascal Volk
On 22.01.2009 16:55 Claudio Prono wrote:
> Ok, sorry to bother again, but i am going crazy to make work cmusieve
> with dovecot. I intend to use it for the vacation system, but...seems
> the system ignores the .dovecot.sieve file into the user dir... I am
> doing something wrong, but i don't know what...
> ...
> 

Put the .dovecot.sieve script in the (virtual) users home directory
(http://wiki.dovecot.org/UserDatabase). If your setup doesn't allow you
to specify a home directory you have to specify the sieve location in
the plugin section
(http://wiki.dovecot.org/LDA/Sieve#head-3940e226e2a575b992a4303c52b9253ae513668e)

If you want to get more details (e.g. what happens on delivery) add
"maild_debug = yes" to your lda {} section in dovecot.conf


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Sieve filters forwarding erratic after upgrade to 1.1.8

2009-01-22 Thread Pascal Volk
On 22.01.2009 20:42 David Anderson wrote:
> Upon upgrading Dovecot from 1.1.7 to 1.1.8, one of my sieve filters 
> (generated with avelsieve) no longer works.

Please show the filter rule.

> The filter is intended to redirect to another address when the header 
> from contains something like @example.com. However, it simply never 
> performs the redirection.

Here it works:

Jan 22 21:49:15 vh3 deliver(u...@test.tld): Sending a forward to 
 with return path <>
Jan 22 21:49:15 vh3 postfix/pickup[13961]: 5C3B165CF: uid=70005 
from=
Jan 22 21:49:15 vh3 deliver(u...@test.tld): 
msgid=<6zd0$2460.john@example.com>: forwarded to 
Jan 22 21:49:15 vh3 deliver(u...@test.tld): 
msgid=<6zd0$2460.john@example.com>: saved mail to INBOX

> Tests show that if the filter also has the "keep copy in mailbox as well 
> as redirecting" open on, then the copy is kept. If that option is off, 
> then no redirection happens and no copy is kept- i.e. the mail is 
> simply lost.

Works also w/o explicit "keep;" 

> Deleting and recreating the filter makes no difference, and neither does 
> moving its order in the list of filters. In the same list of filters a 
> vacation message works.
> On a second mailbox where a filter is redirecting all mail with header 
> precedence not equal to "list", the redirection always takes place, so 
> this isn't a generic problem with all redirections. I also updated 
> avelsieve from 1.9.7 (July 2007) to the latest SVN and this made no 
> difference.
> 
> I am using the dovecot-1.1.8-0_85.el5 and dovecot-sieve-1.1.5-8.el5 RPMs 
> from http://atrpms.net.

I'm using dovecot-sieve-1.1.6, compiled from source.


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] cmusieve don't works for me...

2009-01-22 Thread Pascal Volk
On 22.01.2009 16:55 Claudio Prono wrote:
> ...
> plugin:
>   ...
>   quota_warning: storage=80%% /usr/bin/quota_warning.sh 80
>   quota_warning2: storage=90%% /usr/bin/quota_warning.sh 90
>   quota_warning3: storage=99%% /usr/bin/quota_warning.sh 90
^^ ^^

Please check also the order of your quota warnings. See
http://wiki.dovecot.org/Quota/1.1#head-03d8c4f6fb28e2e2f1cb63ec623810b45bec1734
for more details.


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Sieve filters forwarding erratic after upgrade to 1.1.8

2009-01-23 Thread Pascal Volk
On 23.01.2009 07:59 David Anderson wrote:
> On Thursday 22 January 2009, Pascal Volk wrote:
>> On 22.01.2009 20:42 David Anderson wrote:
>>> Upon upgrading Dovecot from 1.1.7 to 1.1.8, one of my sieve filters
>>> (generated with avelsieve) no longer works.
>> Please show the filter rule.
> 
> Thanks for the reply. Here it is (with vacation message and personal 
> info changed):
> 
> 
> require 
> ["fileinto","envelope","reject","vacation","imapflags","relational","comparator-i;ascii-numeric","notify"];
> if allof (not header :contains "Subject" "Re:",
> not header :contains "From" "supp...@example.com")
> {
> vacation :days 1 :addresses ["supp...@example.com"] text:
> Blah blah blah
> (snipped)
> .
> ;
> stop;
> }
> 
> if header :contains "From" "@example.com"
> {
> keep;
> redirect "sysad...@example.com";
> }
> 

I've tested your sieve script. Here it works:

From: supp...@example.com; Subject: Test; MID: mail_0...@example.com:
deliver(u...@test.tld): msgid=: saved mail to INBOX
deliver(u...@test.tld): Sending a forward to  with return 
path <>

From: supp...@example.com; Subj: Re: Test; MID: mail_0001...@example.com:
deliver(u...@test.tld): msgid=: saved mail to INBOX
deliver(u...@test.tld): Sending a forward to  with return 
path <>

From: supp...@example.com; Subject: What means Re:?;
MID: mail_0001_what_means...@example.com:
deliver(u...@test.tld): msgid=: saved mail 
to INBOX
deliver(u...@test.tld): Sending a forward to  with return 
path <>

From: john@example.com; Subject: Test;
MID: 0003_john@example.com:
deliver(u...@test.tld): msgid=<0003_john@example.com>: sent vacation 
response to <"john.doe"@example.com>
deliver(u...@test.tld): msgid=<0003_john@example.com>: saved mail to INBOX

From: john@example.com; Subject: Re: Test;
MID: 0004_re.john@example.com:
deliver(u...@test.tld): msgid=<0004_re.john@example.com>: saved mail to 
INBOX
deliver(u...@test.tld): Sending a forward to  with return 
path <>

Please add "mail_debug = yes" to your protocol lda {...} section and see
what deliver will log.


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Sieve filters forwarding erratic after upgrade to 1.1.8

2009-01-24 Thread Pascal Volk
On 24.01.2009 09:49 David Anderson wrote:
> 
> Thanks for the reply again. Here it is:
> ...
> Jan 24 08:38:04 levi deliver(supp...@example.com): 
> msgid=<200901241137.59870.da...@example.com>: sent vacation response to 
> 
> Jan 24 08:38:04 levi deliver(supp...@example.com): 
> msgid=<200901241137.59870.da...@example.com>: saved mail to INBOX

OK, let me guess: This was this part:
if allof (not header :contains "Subject" "Re:",
not header :contains "From" "supp...@example.com")
{
vacation :days 1 :addresses ["supp...@example.com"] text:
Blah blah blah
(snipped)
.
;
stop;


After "stop;" the execution of the sieve script is done.
What happens if you send an e-mail with the following headers?
To: 
From: 
Subject: whatever


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] from postfix deliver to dovecot deliver

2009-02-23 Thread Pascal Volk
On 23.02.2009 09:13 Johan Hendriks wrote:
> One more question regarding this.
> All the howto's are using a seperate user for the dovecot LDA, like vmail.
> Now all my mailboxes have the userid and groupid from postfix.
> Can i use the postfix user for the dovecot LDA?
> 

Citing PIPE(8postfix):
   user=username (required)

   user=username:groupname
  Execute  the  external  command with the rights of the
  specified username.  The software refuses  to  execute
  commands  with root privileges, or with the privileges
  of the mail system owner. If groupname  is  specified,
  the  corresponding  group  ID  is  used instead of the
  group ID of username.

You may read http://wiki.dovecot.org/LDA for more details.


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Securing mailboxes and passwords

2009-02-24 Thread Pascal Volk
On 24.02.2009 23:54 Daniel Aleksandersen wrote:
> I have tried different options on my maildirs. Dovecot gives me permission 
> errors
> unless I set it to 775. I have seen that many mention 660 as the best 
> permission
> setting for maildirs when used in setups similar to my own. Can anyone explain
> why my maildir must be executable and accessible to everyone?

No, they must not be accessible for everyone, only for the user, that
owns the maildir. For example:

el-negro 70014 # ll -d Maildir
drwx-- 21 70014 70002 4096 2009-02-24 19:36 Maildir
el-negro 70014 # ll -d Maildir/.INBOX.Lists.Dovecot
drwx-- 5 70014 70002 4096 2009-02-24 23:56 Maildir/.INBOX.Lists.Dovecot
el-negro 70014 # ll 
Maildir/.INBOX.Lists.Dovecot/cur/1235516104.M562448P18642.el-negro\,W\=3966\:2\,Sa
 
-rw--- 1 70014 70002 3886 2009-02-24 23:55 
Maildir/.INBOX.Lists.Dovecot/cur/1235516104.M562448P18642.el-negro,W=3966:2,Sa

But this may require a root-setuid deliver binary, when using
multiple virtual UIDs. See http://wiki.dovecot.org/LDA#multipleuids


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Securing mailboxes and passwords

2009-02-24 Thread Pascal Volk
On 25.02.2009 00:25 Daniel Aleksandersen wrote:
> The recepie assumes I have a group called secmail. I don’t. Am I supposed to 
> create
> a special group for this purpose?

Yes, if the group does not exists, you have to create it. You could call
it whatever you want.


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Securing mailboxes and passwords

2009-02-24 Thread Pascal Volk
On 25.02.2009 00:38 Daniel Aleksandersen wrote:
> 
> I created the group and set the permissions to deliver as described in the 
> recepie. I
> then added just about every user to that group. I still get permission errors 
> when
> dovecot tries to access my maildir. Setting permissions of the maildir to 777 
> ‘fixes’
> the problem.
> 
> Other suggestions? :-)

According to your mail
:
your users login with uid=postmaster gid=postmaster?
In this case the owner of the maildirs should be also postamster.
If you execute deliver with your postmaster-user all should be fine.


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] allow_nets

2009-02-28 Thread Pascal Volk
On 28.02.2009 15:33 CJ Teets wrote:
> Hello,
> 
> Im using Ubuntu 8.10 with Dovecot 1.0.10.
> 
> I am using passwd files, not a MySQL database.
> 
> I have 2 files, a "users" file, and a "passwd" file.
> 
> I have added:
> 
> allow_nets=10.1.10.1 to the end of a specific users entry in the users file.
> 
> When that user tries to login, I get the following in the logs:
> 
> dovecot: 2009-02-28 09:06:59 Error: IMAP(b...@mydomain.com): Ambiguous mail
> location setting, don't know what to do with it: allow_nets=10.1.10.1 (try
> prefixing it with mbox: or maildir:)
> dovecot: 2009-02-28 09:06:59 Error: IMAP(b...@mydomain.com): Mail storage
> creation failed with mail_location: allow_nets=10.1.10.1
> dovecot: 2009-02-28 09:06:59 Error: child 4174 (imap) returned error 89
> 
> here is the line from my users file:
> 
> b...@mydomain.com::5000:5000::/home/vmail/
> mydomain.com/
> 
> here is the corresponding line from the passwd file:
> 
> b...@oldschoolpunk.com:$1$evcHgrbC$BuyQRCspMzTpD8zkphxo0/
> 
> 
> My goal is, that I want to allow this user to check email ONLY from the IP
> specified (i.e. 10.1.10.1)
> 
> I just can't seem to get this working...
> Am I going about something the wrong way?

You didn't read the end of http://wiki.dovecot.org/UserDatabase/ExtraFields
Try ...:/bin/false::userdb_allow_nets=10.1.10.1


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] dovecot-1.1 not using sieve

2009-03-12 Thread Pascal Volk
On 12.03.2009 11:15 Thomas Carstensen wrote:
> no .dovecot.sievec is created anywhere :-(
> 
> i put the sieve-script named .dovecot.sieve in into this folder:
> 
> /usr/local/mail/domain.toplevel/username/Maildir/
> and to as a sym-link into /usr/local/mail/domain.toplevel/username
> 
> maillog says nothing at all about imap/sieve:
> 
> Mar 12 11:10:45 mail spamd[2594]: spamd: connection from localhost
> [127.0.0.1] at port 50034
> Mar 12 11:10:45 mail spamd[2594]: spamd: setuid to vexim succeeded
> Mar 12 11:10:45 mail spamd[2594]: spamd: checking message
> <49b8df71.6090...@exitec.de> for vexim:90
> Mar 12 11:10:45 mail spamd[2594]: spamd: clean message (0.0/5.0) for
> vexim:90 in 0.3 seconds, 1087 bytes.
> Mar 12 11:10:45 mail spamd[2594]: spamd: result: . 0 -
> scantime=0.3,size=1087,user=vexim,uid=90,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=50034,mid=<49b8df71.6090...@exitec.de>,autolearn=ham
> 
> Mar 12 11:10:45 mail spamd[2507]: prefork: child states: II
> 

Add mail_debug = yes to your protocol lda {} section and try again.


Regards,
Pascal
-- 
The trapper recommends today: fabaceae.0907...@localdomain.org


Re: [Dovecot] Problem with sasl auth with postfix...

2009-03-13 Thread Pascal Volk
On 13.03.2009 21:01 Douglas M. Stanley wrote:
> Hello list,
> 
> I'm running into some problems, and I couldn't find any info about this 
> anywhere on the net.
> 
> I recently set up a new debian lenny machine, and used my notes from the last 
> debian etch
> machine I set up, which basically is for postfix + dovecot for sasl auth.
> 
> On my old etch box, in the dovecot.conf, in the auth default section, I have a
>   socket listen {
> client {
>   path = /var/spool/postfix/private/auth
>   mode = 0660
>   user = postfix
>   group = postfix
> }
>   }
> 
> However, if I use the same config on my lenny setup, dovecot fails to start, 
> and I see this
> in my logs:
> 
> Mar 13 19:16:30 mailserver dovecot: Dovecot v1.0.15 starting up
> Mar 13 19:16:30 mailserver dovecot: auth(default): User doesn't exist: postfix
> Mar 13 19:16:30 mailserver dovecot: Auth process died too early - shutting 
> down
> Mar 13 19:16:30 mailserver dovecot: child 4623 (auth) returned error 89
> 
> Now if I comment out the user and group lines, it works fine, but the socket 
> is
> owned by root, and so I have to change the mode line so that it's world 
> readable
> in order for postfix to use it.
> 
> The version of dovecot in etch is: 1.0.rc15-2etch4
> and the version in lenny is: 1.0.15-2.3
> 
> Any ideas why this might be happening? Did the syntax to do this change 
> between those
> versions? Any input? I guess I don't mind leaving it world readable, but I 
> wasted an
> entire morning trying everything to get it to work, so I guess I'm hoping 
> some one
> atleast has an answer as to why it doesn't work.

Is Postfix installed on this system? If so, what shows the command
postconf -h mail_owner


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.0907...@localdomain.org


Re: [Dovecot] Problem with sasl auth with postfix...

2009-03-13 Thread Pascal Volk
On 13.03.2009 21:40 Douglas M. Stanley wrote:
> Yep, postfix is installed:
> 
> mailserver:/etc/postfix# postconf -h mail_owner
> postfix

Please don't top post.

I've got no clue what it may be. Please provide the output from
`dovecot -n`.


Regards,
Pascal
-- 
The trapper recommends today: c01dcofe.0907...@localdomain.org


[Dovecot] Can't compile v1.2.beta2 w/o linux-quota

2009-03-14 Thread Pascal Volk
Hi Timo,

make dies with an error:
quota-fs.c: In function ‘fs_quota_get_linux’:
quota-fs.c:456: error: ‘no’ undeclared (first use in this function)
quota-fs.c:456: error: (Each undeclared identifier is reported only once
quota-fs.c:456: error: for each function it appears in.)
make[4]: *** [quota-fs.lo] Error 1

One of the configure options was: --without-linux-quota


Regards,
Pascal
-- 
The trapper recommends today: deadbeef.0907...@localdomain.org


Re: [Dovecot] Can't compile v1.2.beta2 w/o linux-quota

2009-03-14 Thread Pascal Volk
On 15.03.2009 02:55 Timo Sirainen wrote:
> On Mar 14, 2009, at 9:47 PM, Pascal Volk wrote:
>> […]
>> One of the configure options was: --without-linux-quota
> 
> Well, don't give that.. I suppose I could make configure fail or  
> ignore that option entirely. If you don't want quota, just don't load  
> the quota plugin.

Thank you for the information.
I thought this may be a way to keep the fs-qouta code out of the quota
plugin.


Regards,
Pascal
-- 
The trapper recommends today: 5e1f1e55.0907...@localdomain.org


[Dovecot] v1.2.beta2: Fatal: io_loop_handle_add: epoll_ctl(1, 10): Bad file descriptor

2009-03-15 Thread Pascal Volk
Hi Timo,

I'm playing with Dovecot v1.2.beta2 currently. When the dict process was
started via deliver(?) and Dovecot is killed (kill $PID_OF_DOVECOT)
after delivering only one message, it logs:
Fatal: io_loop_handle_add: epoll_ctl(1, 10): Bad file descriptor

If the dict process was not started or deliver has delivered more than
one message, the error doesn't occur.
I'm not using SELinux or AppArmor or something similar.

# 1.2.beta2: /usr/local/dovecot12/etc/dovecot.conf
# OS: Linux 2.6.26-1-amd64 x86_64 Debian squeeze/sid
log_path: /usr/local/dovecot12/var/log/dovecot.log
protocols: imap
listen: 10.11.12.13:10143
ssl: no
disable_plaintext_auth: no
login_dir: /usr/local/dovecot12/var/run/dovecot/login
login_executable: /usr/local/dovecot12/libexec/dovecot/imap-login
verbose_proctitle: yes
first_valid_uid: 7
first_valid_gid: 7
mail_privileged_group: mail
mail_location: maildir:~/Maildir
mail_plugins: quota imap_quota
auth default:
  mechanisms: digest-md5 cram-md5 login plain
  user: nobody
  verbose: yes
  debug: yes
  passdb:
driver: sql
args: /usr/local/dovecot12/etc/dovecot-sql.conf
  userdb:
driver: sql
args: /usr/local/dovecot12/etc/dovecot-sql.conf
  socket:
type: listen
master:
  path: /usr/local/dovecot12/var/run/dovecot/auth-master
  mode: 384
plugin:
  quota: dict:user::noenforcing:proxy::quotadict
  quota_rule: *:storage=10M:messages=11
  quota_rule2: Trash:storage=50%%
  mail_debug: yes
dict:
  quotadict: pgsql:/usr/local/dovecot12/etc/dovecot-dict-quota.conf


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.0907...@localdomain.org


Re: [Dovecot] v1.2.beta2: Fatal: io_loop_handle_add: epoll_ctl(1, 10): Bad file descriptor

2009-03-15 Thread Pascal Volk
On 16.03.2009 05:28 Pascal Volk wrote:
> Hi Timo,
> […]
> Fatal: io_loop_handle_add: epoll_ctl(1, 10): Bad file descriptor

Wow! I love Dovecot's innate recuperative power. ;-)
I can't reproduce the error no longer. 

There _was_ also a strange thing with the quota settings:
deliver(j@example.com): Mar 16 04:13:14 Info: Quota root: name=user 
backend=dict args=:noenforcing:proxy::quotadict
deliver(j@example.com): Mar 16 04:13:14 Info: Quota rule: root=user 
mailbox=* bytes=10485760 messages=11
deliver(j@example.com): Mar 16 04:13:14 Info: Quota rule: root=user 
mailbox=Trash bytes=5242880 (50%) messages=0
deliver(j@example.com): Mar 16 04:13:14 Info: dict quota: 
user=j@example.com, uri=proxy::quotadict, noenforcing=1
...
deliver(j@example.com): Mar 16 04:13:14 Info: dict quota: 
user=j@example.com, uri=proxy::quotadict, noenforcing=1
...
dovecot: Mar 16 04:13:14 Error: dict: dict client: Unconfigured dictionary name 
'quotadict'

If you are interested I'll send you the logfile.


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.0907...@localdomain.org


Re: [Dovecot] folders are not under INBOX

2009-03-16 Thread Pascal Volk
On 16.03.2009 16:46 Ondrej Svoboda wrote:
> hi guys,
> I hope it's common trouble, but I'm not able to find a solution:
> 
> - i'am using courier imap and trying to migrate to the dovecot
> - on courier I have all folders as subfolder of Inbox - i.e. Inbox.Sent
> 
> but on dovecot the folder Sent is not subfolder of Inbox, but its on the
> same level.
> 
> Please is there some possibility to have the subfolders the same
> behaviour as in courier? we have lot's of customers so after the upgrade
> the folders can't change.

Try to solve this with a namespace:
http://wiki.dovecot.org/Namespaces#Backwards_Compatibility:_Courier_IMAP


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.0907...@localdomain.org


Re: [Dovecot] ampersand in local-part

2009-04-01 Thread Pascal Volk
On 01.04.2009 20:20 Bradley Giesbrecht wrote:
> I have a new email server (postfix/dovecot/mysql) with accounts  
> migrated from another server (different platform) and email addresses  
> with ampersands like "r&d...@domain.com" that worked on my old email  
> server are not working now.
> 
> I'd like some help tracking this issue down.
> 
> Can anyone tell me if this looks like a postfix, dovecot or mysql issue?
> 
> Some log info follows. For brevity I'm just posting this log snip as  
> I'm thinking I will get a simple answer to this but I will be happy to  
> post postfix, dovecot or mysql settings in detail if they are required.
> 
> 
> Thank you, Brad
> 
> dovecot.log file:
> [...]
> dovecot: Mar 27 16:37:23 Info: auth(default): auth(?,216.111.149.248):  
> Invalid username: r&d...@domain.com
> dovecot: Mar 27 16:37:23 Info: auth(default): cram-md5(?, 
> 216.111.149.248): Username contains disallowed character: 0x26
> dovecot: Mar 27 16:37:24 Info: auth(default): new auth connection:  
> pid=68420

Dovecot is complaining about the 'disallowed character'. See
http://wiki.dovecot.org/MainConfig#line-549 for more information.


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.0909...@localdomain.org


Re: [Dovecot] Case sensitive oddity when mail delivered.

2009-04-30 Thread Pascal Volk
On 04/30/2009 10:12 PM dove...@corwyn.net wrote:
> 
> Mail location is determined by
> mail_location = maildir:/var/spool/mail/%d/%n/Maildir
> 
> If I have an account us...@example.com it works just fine. However, 
> when mail is sent to us...@example.com it also delivers, but ends up 
> creating a new file structure so I end up with
> /var/spool/mail/example.com/user1  (with lower case mail in it)
> and
> /var/spool/mail/EXAMPLE.COM/USER1  (with  uppercase mail in it)
> 
> which is decidedly not good.

That's the correct behavior, as configured.

Try: mail_location = maildir:/var/spool/mail/%Ld/%Ln/Maildir
 ^   ^
See also http://wiki.dovecot.org/Variables


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


Re: [Dovecot] Case sensitive oddity when mail delivered.

2009-04-30 Thread Pascal Volk
On 04/30/2009 10:47 PM dove...@corwyn.net wrote:
> At 04:37 PM 4/30/2009, Pascal Volk wrote:
>> Try: mail_location = maildir:/var/spool/mail/%Ld/%Ln/Maildir
>>   ^   ^
>> See also http://wiki.dovecot.org/Variables
> 
> Thanks I'll definitely give that a try. The problem I see is that in 
> my development (preproduction/test environment) is also set to
> mail_location = maildir:/var/spool/mail/%d/%n/Maildir
> 
> and it doesn't exhibit this behavior.  Is there anywhere else case is 
> / could be set for %d and %n ?  I don't like rolling something to 
> production that doesn't match my dev environment (tho clearly 
> something is different between the two right now).

If your user_query also provides a home and/or mail field (see
http://wiki.dovecot.org/UserDatabase), you could configure:
mail_location = maildir:~/Maildir


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


Re: [Dovecot] Testing POP3 with telnet - password always wrong

2009-05-05 Thread Pascal Volk
On 05/06/2009 02:54 AM Timothy Legg wrote:
> …
> l...@debian:~$ telnet 192.168.10.171 110
> Trying 192.168.10.171...
> Connected to 192.168.10.171.
> Escape character is '^]'.
> +OK Dovecot ready.
> USER t...@192.168.10.171
   ^^^
> +OK
> PASS password1
> -ERR Authentication failed.
> 
> But why do I always get the password wrong?  I twice set the password for the 
> test user and also restarted Dovecot, but the password is always wrong.
> 
> I'm sure there must be something stupid I have overlooked.
> 
> Any suggestions?
> …
> Here is some additional data that I am volunteering...
> 
> # dovecot -n
> # 1.0.15: /etc/dovecot/dovecot.conf
> …
> auth default:
>   passdb:
> driver: pam
>   userdb:
> driver: passwd

You are using local system users, right? How do log in on your system?
As u...@an.ip.add.ress? No?
OK, so drop the @192.168.10.171 part from your mail user name and try again.

If it still does not work, start reading here:
http://wiki.dovecot.org/WhyDoesItNotWork


Regards,
Pascal
-- 
The trapper recommends today: fabaceae.0912...@localdomain.org


  1   2   3   4   5   6   >