Re: Dovecot (LDAP) get the quota limitation from windows Active directory

2016-05-01 Thread Dogz
Hi,

Finally I found the root cause due to some specific fields are not in
windows GC. I was use port:3268 to access windows active directory.

For example, while I choose maxStorage to limit users' quota, it can't find
the value from GC, but I changed to port:389, it works.

Sorry to bother all of you.
-- 
Best Regards,
Dogz


autoexpunge wildcard mailbox from userdb

2016-05-01 Thread Leon Kyneur
Was excited to see that wildcards are now possible on autoexpunge in the 
2.2.24 release.


However I'm trying to configure these from the userdb lookup and it 
doesn't appear to be working.


if I set in 15-mailboxes.conf
mailbox Trash/* {
...
   autoexpunge = 10m
}

everything works..

however if I return

=namespace/inbox/mailbox/Trash/*/autoexpunge=10m

via userdb - it does not.


Logs say:


Debug: Unknown userdb setting: 
plugin/namespace/inbox/mailbox/Trash/*/autoexpunge=10m



Is what I am trying to do even possible?

Thanks

Leon


Re: deb repo with dovecot-antispam ?

2016-05-01 Thread Stephan Bosch
Op 5/2/2016 om 12:38 AM schreef Håkon Alstadheim:
> There are .debs available for version 2.2 both from backports and
> ix.dovecot.fi, but neither seem to have the antispam plugin built for
> version 2.2. Anybody know why, and (if there is no particular reason)
> how to get dovecot-antispam in a proper .deb package for dovecot-2.2.* ?

Including it in the current Xi build process isn't trivial. I haven't
needed it so far, so it never got included.

I played with this a bit. The attached crude shell script will create a
./build directory in which a fresh debian package is built. It needs at
least git and devscripts packages installed. Adjust the script as needed.

Clear the build directory manually if you need to start over.

You can also use this shell script as a step-by-step guide on how to
make a fresh Debian package for it:

- It clones git repositories for dovecot-antispam and its debian package.
- From dovecot-antispam it creates the required orig.tar.gz file and
unpacks it.
- The debian directory is copied from the official Debian package. This
will only work if the latest dovecot-antispam is still compatible.
Currently, it is.
- Its changelog is updated for the new version.
- The package is built.

At my end it builds successfully, but I haven't actually tried the
resulting package.

Regards,

Stephan.


#!/bin/sh

# Used in Debian changelog
export DEBEMAIL="step...@rename-it.nl"
export DEBFULLNAME="Stephan Bosch"

# Date-based versioning scheme; identical to official packages
BASE_VERSION="2.0"
DATE=`date +%Y%m%d`
VERSION="$BASE_VERSION+$DATE"
REVISION="1" # Increment if multiple versions on one day

mkdir build
cd build

git clone git://git.sipsolutions.net/dovecot-antispam.git
git clone git://anonscm.debian.org/users/ron/dovecot-antispam.git 
dovecot-antispam-debian

cd dovecot-antispam
git archive \
  --format=tar \
  --prefix="dovecot-antispam-$VERSION/" \
  master > "../dovecot-antispam_$VERSION.orig.tar"
cd ..

gzip "dovecot-antispam_$VERSION.orig.tar"
tar -xzf "dovecot-antispam_$VERSION.orig.tar.gz"

cp -ar dovecot-antispam-debian/debian "dovecot-antispam-$VERSION"

# Requires devscripts
cd "dovecot-antispam-$VERSION"
dch -v "$VERSION-$REVISION" "Updated to the latest dovecot-antispam Git 
revision"

# Requires devscripts
debuild -us -uc


deb repo with dovecot-antispam ?

2016-05-01 Thread Håkon Alstadheim
There are .debs available for version 2.2 both from backports and
ix.dovecot.fi, but neither seem to have the antispam plugin built for
version 2.2. Anybody know why, and (if there is no particular reason)
how to get dovecot-antispam in a proper .deb package for dovecot-2.2.* ?


Re: Sieve + Vacation

2016-05-01 Thread Stephan Bosch
Op 5/1/2016 om 3:59 PM schreef Jerry:
> I am not sure if this is possible. When I use "vacation" in a sieve
> script, it always sends the response using "<>". I need it to send the
> response using a specific address. Is this possible?
>
> Thanks :)

This is currently the only option:

http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Vacation#Configuration

sieve_vacation_send_from_recipient=yes

I can add some more flexibility to the next version. This will be a
setting similar to "sieve_redirect_envelope_from".

Regards,

Stephan.


Re: Changing Password Schemes

2016-05-01 Thread Gedalya
You do need to complete the query. Don't just replace your query with the one I 
wrote. You have to have a WHERE clause, and you might need to return other 
fields.
Keep the password query you had before, just replace the 'password' column with 
"IF( ... ) as password"
The query as you have it now simply returns all the passwords for all the 
users, because you don't have a WHERE clause.

On 05/01/2016 11:27 AM, Carl Jeptha wrote:
> Hi,
> Was testing your solution and was receiving:
>
> May  1 11:10:03 mail2 dovecot: message repeated 5 times: [
> auth-worker(24202): Error: sql(u...@domain.com,xxx.xxx.xxx.xxx):
> Password query returned multiple matches]
>
> Here is my dovecot-sql.conf.ext file:
>
> driver = mysql
> connect = host=127.0.0.1 dbname=vmail user=* password=*
> default_pass_scheme = SHA512-CRYPT
> password_query = SELECT IF(cryptpwd IS NULL OR
> cryptpwd='',CONCAT('{PLAIN}',clearpwd),cryptpwd)as password FROM mailbox
>  user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n'
> as mail, 150 AS uid, 8 AS gid, concat('dirsize:storage=', quota) AS quota
> FROM mailbox WHERE username = '%u' AND active = '1'
>
> 
> You have a good day now, en mag jou môre ook so wees,
>
> Carl A Jeptha
>
>
> On Sun, May 1, 2016 at 3:02 AM, Gedalya  wrote:
>
>> First of all, you can probably go online before you convert all passwords.
>> You can modify your query in dovecot-sql.conf.ext to something like the
>> following:
>>
>> SELECT IF(crypt_pass IS NULL OR crypt_pass='',
>> CONCAT('{PLAIN}',plain_pass), crypt_pass) as password FROM mailuser ..
>>
>> This is assuming that:
>>
>> * for incoming users, you have a plain_pass column containing just the
>> plaintext password, without a {PLAIN} prefix, which we are adding in the
>> query, letting dovecot process it correctly
>> * for these users, your other password column, "crypt_pass" in this
>> example, is either NULL or an empty string.
>> * once crypt_pass is populated, it will contain a usable value, and this
>> value will be returned by the query.
>>
>>
>> Now, as for converting your database, try this, after adjusting the
>> queries to fit your schema:
>>
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>> use DBI;
>> use MIME::Base64 'encode_base64';
>>
>> my $dbtype = 'mysql';
>> my $dbhost = 'localhost';
>> my $dbname = 'maildb';
>> my $dbuser = 'dbuser';
>> my $dbpass = 'password';
>>
>> my $dbh = DBI->connect("DBI:$dbtype:host=$dbhost;database=$dbname",
>> $dbuser, $dbpass)
>> or die "Could not connect to database: " . $DBI::errstr . "\n";
>> my $selectsth = $dbh->prepare('SELECT localpart, domain, plain_pass FROM
>> mailuser where crypt_pass IS NULL OR crypt_pass=""');
>> my $updatesth = $dbh->prepare('UPDATE mailuser SET crypt_pass=? where
>> localpart=? and domain=?');
>> $selectsth->execute;
>> while (my $row = $selectsth->fetchrow_hashref) {
>> open my $urand, '<', '/dev/urandom';
>> read $urand, my $salt, 12;
>> close $urand;
>> $salt = encode_base64($salt);
>> $salt =~ s/\+/\./g;
>> $salt =~ s/[^0-9a-z\.\/]//ig; #this shouldn't be needed
>> my $cryptpw = '{SHA512-CRYPT}' . crypt $row->{plain_pass}, '$6$'.$salt;
>> print "$row->{localpart}\@$row->{domain}: $cryptpw\n";
>> # uncomment this when you feel comfortable
>> #$updatesth->execute($cryptpw, $row->{localpart}, $row->{domain});
>> }
>>
>>
>> You can run this safely with the last line commended out, and review the
>> output. Perhaps try to test by manually updating one user with the
>> displayed output. If everything seems sane, uncomment the line and run
>> again.
>>
>>
>> On 04/30/2016 02:52 PM, Carl A Jeptha wrote:
>>> Sorry not truncated:
>>>
>> {SHA512-CRYPT}$6$wEn1UFuiMzl9OSjd$Vh/PZ95WDID1GwI02QWAQNNfY5.Rk9zcSetYTgRfo4SPKf8qzMXsruvvS8uaSUidlvwDTLLSr3cVsQx2e6cu2/
>>> 
>>> You have a good day now, en mag jou môre ook so wees,
>>>
>>> Carl A Jeptha
>>>
>>> On 2016-04-30 14:58, Patrick Domack wrote:
 This looks good, except it is truncated, it should be something like
>> 95chars long, Is your hash column set to 128 or up around there or larger?

 Quoting Carl A Jeptha :

> Sorry for double reply, but this what a password looks like in the
>> "hashed" password column:
> {SHA512-CRYPT}$6$wEn1UFuiMzl9OSjd$Vh/PZ95WDID1GwI2
>
> 
> You have a good day now, en mag jou môre ook so wees,
>
> On 2016-04-30 01:14, Gedalya wrote:
>> That's not SHA512-CRYPT. That's just a simple sha512 of the password,
>> without salt.
>> A SHA512-CRYPT password will be generated with:
>>
>> printf "1234\n1234" | doveadm pw -s SHA512-CRYPT
>>
>> or:
>>
>> doveadm pw -s SHA512-CRYPT -p 1234
>>
>> or:
>>
>> mkpasswd -m sha-512 1234
>>
>> (without the "{SHA512-CRYPT}" prefix)
>>
>> What exactly is the difficulty you are having with converting the
>> passwords?

Sieve + Vacation

2016-05-01 Thread Jerry
I am not sure if this is possible. When I use "vacation" in a sieve
script, it always sends the response using "<>". I need it to send the
response using a specific address. Is this possible?

Thanks :)

-- 
Jerry


Re: IX Out of Order?

2016-05-01 Thread Markus Schönhaber
Stephan Bosch, Sun, 1 May 2016 11:04:45 +0200:

> No new oldstable packages will be available for the time being, until I
> have time to look at this more.

OK, thanks for the info (and for providing Debian packages in the first
place!).

-- 
Regards
  mks


Re: Long delays when deleting a message in inbox

2016-05-01 Thread Yves Goergen
Which log would you suggest? There's nothing for these times in 
mail.log, messages and syslog.


Yves Goergen
http://unclassified.software


Von: Aki Tuomi
Gesendet: Fr, 2016-04-29 08:05 +0200


On 28.04.2016 20:54, Yves Goergen wrote:

Hi,

Since recently, there's a long delay when deleting any message from my
inbox folder. This affects deleting and moving messages, but only the
inbox of a single mailbox. The delay is a few seconds. Other
operations work instantly.

The server is Ubuntu 14.04 running Dovecot version "1:2.2.9-1ubuntu2".
The filesystem is local ext4. My MUA is Thunderbird on Windows, latest
version, connecting with IMAP.

What could be the cause for this extreme delay?

Yves Goergen
http://unclassified.software


Have you looked at your logs?

Aki


Re: IX Out of Order?

2016-05-01 Thread Stephan Bosch
Op 4/27/2016 om 4:46 PM schreef Markus Schönhaber:
> Stephan Bosch, Mon, 25 Apr 2016 15:16:55 +0200:
>
>> Oops. Turned off package composer for maintenance, but didn't turn it 
>> back on.
>>
>> It is building now.
> Is there something to turn on to build packages in
> /debian/pool/wheezy-auto/dovecot-2.2
> ? Or don't you provide packages for wheezy anymore?

Looks like my recent merge with the official Debian Dovecot packages
broke oldstable. The package is heavily  restructured, making it very
difficult to retain compatibility with oldstable.

No new oldstable packages will be available for the time being, until I
have time to look at this more.

Regards,

Stephan.