Re: requiring a full fqdn for authentication

2018-03-06 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 6 Mar 2018, David Mehler wrote:


Thanks. Can you elaborate?


post your sql config of Dovecot.


On 3/6/18, Steffen Kaiser  wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 2 Mar 2018, David Mehler wrote:


dovecot to require a complete email address as a login. Currently I
can log in by either a username or fqdn. I've got the below what is
the issue?



If I need to provide my sql password query let me know.


your SQL query in passdb allows both usernames.


- --
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWp6JisQnQQNheMxiAQKuuggAjNcedq1DVGWbe/3vpKHUHdgBJVzmmEsI
seSm/NFfR6/Fw8c4fCz0BAiIBUkmo7LEowFFo6M9Yf+ZJHP1IDt6N7gWTgral2Vh
pMrNn+mv9okzL2UvJzUlkCA4ntBJVG3BrG9ZUJfk/1f8IKS090nNpu4F79Ag0TG2
MiobX5XtIRvpwSTCteVzQaIanpNhmW/BSvA2smPcdt58AmVI6HUslxcsv9A1XZLP
q47pYucUTyPdsNcK4OrzitRH2+0HNTw70kClP/dfUWEvL4ssw3drCXhO7LjN+Crq
IpdfHp0k7bkfIv/e5Lfg4ZZs4uV5obEyqaa+UP0IUTLrEau1syZd9Q==
=lhft
-END PGP SIGNATURE-





- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWp+YQsQnQQNheMxiAQJTmwf9GMcFCQT0wZmBjJom7Ni3UHTz0eHyYEHS
aCQ0aJ0VFz7WRxuHjlyfCaTkcwtMNQ3chos/wcLpNZ6gsSb4LIMLTXFkO6ibioWS
f1IUVlcQ1EefekyZh/AC8DvH3pw+mejLsG7eUzUwNerbQ7bhh49q2lDZNjaBVlPu
O48t8HV4Jt2X84GTo8vNkNmTc0PCs0ul+Y2Hg9H7WjTl8HMGH+YR/P1cTC6yk8dU
JfQ1jhvBpdvXG8lccSehHrpJ7f76yuB9i7QUDVHy+193ECwkFHOfhFVwsm54Edpb
nPJrygwyciDz57ItMABbDsaek66tZyVmUNEnLyaeKbkCw1XH3B7tuw==
=3UkM
-END PGP SIGNATURE-


Re: Virtual Mailboxes redux

2018-03-06 Thread
(Sorry for posting with the sig first, I thought I’d fixed that)

On 06 Mar 2018, at 13:13, Rob Hoelz  wrote:
> I've had success using "doveadm mailbox list”

…
# doveadm search mailbox "@virtual.day" -u kremels 
#
…



Re: Virtual Mailboxes redux

2018-03-06 Thread @lbutlr



-- 
You only had to look into Teatime's mismatched eyes to know one thing,
which was this: if Teatime wanted to find you he would not look
everywhere. He'd look in only one place, which would be the place where
you were hiding. --Hogfather


> On 06 Mar 2018, at 13:13, Rob Hoelz  wrote:
> 
> I've had success using "doveadm mailbox list”

 # doveadm mailbox list -u kremels
Archive
Drafts
Junk
...
@virtual
@virtual.day
@virtual.month
INBOX

So far so good.

> and using "doveadm search mailbox $VIRTUAL_MAILBOX”

 # doveadm search mailbox "@virtual.day" -u kremels 
 #

Hmm…

 # doveadm search mailbox "INBOX" -u kremels
e0fc6a3557f62158c11121d1a38d 83
e0fc6a3557f62158c11121d1a38d 84
e0fc6a3557f62158c11121d1a38d 85
e0fc6a3557f62158c11121d1a38d 86
e0fc6a3557f62158c11121d1a38d 89
e0fc6a3557f62158c11121d1a38d 90
e0fc6a3557f62158c11121d1a38d 91
e0fc6a3557f62158c11121d1a38d 92
e0fc6a3557f62158c11121d1a38d 93
e0fc6a3557f62158c11121d1a38d 94
e0fc6a3557f62158c11121d1a38d 95
e0fc6a3557f62158c11121d1a38d 96
e0fc6a3557f62158c11121d1a38d 97
e0fc6a3557f62158c11121d1a38d 98
e0fc6a3557f62158c11121d1a38d 99

Do the dovecot-vitual files require certain permissions? They are 644 and owned 
by root:wheel

I don’t see any errors on starting dovecot.





Re: Virtual Mailboxes redux

2018-03-06 Thread Rob Hoelz
Hi there!

I've had success using "doveadm mailbox list" to verify that my virtual 
mailboxes are showing up,
and using "doveadm search mailbox $VIRTUAL_MAILBOX" to print out which mails 
are in a folder.

-Rob

On Tue, 6 Mar 2018 11:40:13 -0700
"@lbutlr"  wrote:

> I’ve created virtual mailboxes in dovecot, and they show up in
> various clients, but the folders contain no messages. (I will get an
> ‘empty” folder icon named “@virtual” and an empty folder icon named
> “month” inside it. Is there a way I can verify what dovecot THINKS
> should be in the virtual folder via doveadm? 
> 
> 
> 
>  # cat /usr/local/etc/dovecot/virtual/month/dovecot-vitual 
> # ~/Maildir/virtual/month/dovecot-virtual
> *
>   all younger 2678400
> 
>  # doveconf -n
> # 2.2.33.2 (d6601f4ec): /usr/local/etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.21 (92477967)
> # OS: FreeBSD 11.1-RELEASE-p4 i386  
> auth_failure_delay = 5 secs
> auth_mechanisms = PLAIN LOGIN
> default_client_limit = 4096
> default_process_limit = 1024
> default_vsz_limit = 768 M
> disable_plaintext_auth = no
> first_valid_uid = 89
> imap_id_log = *
> lda_mailbox_autocreate = yes
> lda_mailbox_autosubscribe = yes
> login_log_format_elements = user=<%u> %r %m %c
> mail_location = maildir:~/Maildir
> mail_max_userip_connections = 90
> mail_plugins = " virtual"
> 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 imapsieve vnd.dovecot.imapsieve namespace { location =
> virtual:/usr/local/etc/dovecot/virtual:INDEX=~/Maildir/virtual:CONTROL=~/Maildir/virtual
> prefix = @virtual. separator = . } namespace inbox {
>   inbox = yes
>   location = 
>   mailbox Archive {
> auto = subscribe
> special_use = \Archive
>   }
>   mailbox Drafts {
> special_use = \Drafts
>   }
>   mailbox Junk {
> auto = subscribe
> special_use = \Junk
>   }
>   mailbox Sent {
> special_use = \Sent
>   }
>   mailbox Trash {
> special_use = \Trash
>   }
>   prefix = 
> }
> passdb {
>   driver = pam
>   username_filter = !*@*
> }
> passdb {
>   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> plugin {
>   imapsieve_mailbox1_before =
> file:/usr/lib/dovecot/sieve/report-spam.sieve
> imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk
>   imapsieve_mailbox2_before =
> file:/usr/lib/dovecot/sieve/report-ham.sieve
> imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk
>   imapsieve_mailbox2_name = *
>   sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
>   sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
>   sieve_plugins = sieve_imapsieve sieve_extprograms
> }
> protocols = imap pop3
> service auth {
>   unix_listener /var/spool/postfix/private/auth {
> mode = 0666
>   }
> }
> service imap-login {
>   inet_listener imaps {
> port = 993
> ssl = yes
>   }
> }
> service pop3-login {
>   inet_listener pop3 {
> port = 0
>   }
>   inet_listener pop3s {
> port = 995
> ssl = yes
>   }
> }
> ssl_cert =  ssl_key =  # hidden, use -P to show it
> ssl_protocols = !SSLv2 !SSLv3
> userdb {
>   driver = passwd
> }
> userdb {
>   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>   default_fields = uid=vpopmail gid=vchkpw
> mail_location=/usr/local/virtual/%u
> mail=maildir:/usr/local/virtual/%u driver = sql }
> protocol imap {
>   mail_plugins = " virtual imap_sieve"
> }
> 
> 



Cannot delete folder

2018-03-06 Thread Yves Goergen

Hi there,

I cannot delete IMAP folders in new mailboxes. When trying to delete a 
folder in Thunderbird I get the error message "renaming not supported 
across conflicting directory permissions". Looking up the error on the 
web led me to checking the mailbox directory's permissions. They're 
inconsistent in new mailboxes. While every single directory in an old 
mailbox has "drwx--S---", some of the directories in a new mailbox have 
"drwxr-sr-x" instead. I'm not sure what that means. The folders with the 
later permissions are "Drafts", "Sent" and "Trash". Folders with the 
first permissions are "Junk", "Archives" and "Archives.2018". All 
folders were created by Thunderbird automatically. Now I wanted to 
delete "Archives.2018".


What's the issue here? Why do folders created by the same MUA in the 
same event on the same mail server have different permissions and why 
can't I delete one of them (which would probably move it into the trash 
folder first)?


Dovecot version is 2.2.22 on Ubuntu 16.04, Thunderbird is 52.6.0 on 
Windows 10.


-Yves


Virtual Mailboxes redux

2018-03-06 Thread @lbutlr
I’ve created virtual mailboxes in dovecot, and they show up in various clients, 
but the folders contain no messages. (I will get an ‘empty” folder icon named 
“@virtual” and an empty folder icon named “month” inside it. Is there a way I 
can verify what dovecot THINKS should be in the virtual folder via doveadm? 



 # cat /usr/local/etc/dovecot/virtual/month/dovecot-vitual 
# ~/Maildir/virtual/month/dovecot-virtual
*
  all younger 2678400

 # doveconf -n
# 2.2.33.2 (d6601f4ec): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: FreeBSD 11.1-RELEASE-p4 i386  
auth_failure_delay = 5 secs
auth_mechanisms = PLAIN LOGIN
default_client_limit = 4096
default_process_limit = 1024
default_vsz_limit = 768 M
disable_plaintext_auth = no
first_valid_uid = 89
imap_id_log = *
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_log_format_elements = user=<%u> %r %m %c
mail_location = maildir:~/Maildir
mail_max_userip_connections = 90
mail_plugins = " virtual"
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 imapsieve vnd.dovecot.imapsieve
namespace {
  location = 
virtual:/usr/local/etc/dovecot/virtual:INDEX=~/Maildir/virtual:CONTROL=~/Maildir/virtual
  prefix = @virtual.
  separator = .
}
namespace inbox {
  inbox = yes
  location = 
  mailbox Archive {
auto = subscribe
special_use = \Archive
  }
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
  username_filter = !*@*
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_name = *
  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
  sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
  sieve_plugins = sieve_imapsieve sieve_extprograms
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
mode = 0666
  }
}
service imap-login {
  inet_listener imaps {
port = 993
ssl = yes
  }
}
service pop3-login {
  inet_listener pop3 {
port = 0
  }
  inet_listener pop3s {
port = 995
ssl = yes
  }
}
ssl_cert = 

Authentification fails in dovecot 2.3.0.1

2018-03-06 Thread post
Hi

I've upgraded dovecot from 2.2.22 to 2.3.0.1. Now I can't authenticate
any
longer. My mail client says that the user name and password are rejected
by
dovecot.

I get this line in /var/log/auth.log:
Mar  6 19:28:02 desktop auth: PAM audit_log_acct_message() failed:
Operation not permitted

And this in /var/log/dovecot.log:
Mar 06 19:28:02 auth: Debug: Loading modules from directory:
/usr/lib/dovecot/modules/auth
Mar 06 19:28:02 auth: Debug: Module loaded:
/usr/lib/dovecot/modules/auth/lib20_auth_var_expand_crypt.so
Mar 06 19:28:02 auth: Debug: Module loaded:
/usr/lib/dovecot/modules/auth/libdriver_sqlite.so
Mar 06 19:28:02 auth: Debug: Read auth token secret from
/var/run/dovecot/auth-token-secret.dat
Mar 06 19:28:02 auth: Debug: auth client connected (pid=5615)
Mar 06 19:28:02 auth: Debug: client in: AUTH1   PLAIN  
service=imapsecured session=ggZPmsJmIoh/AAABlip=127.0.0.1  
rip=127.0.0.1   lport=993   rport=34850 local_
Mar 06 19:28:02 auth-worker(5617): Debug: Loading modules from
directory: /usr/lib/dovecot/modules/auth
Mar 06 19:28:02 auth-worker(5617): Debug: Module loaded:
/usr/lib/dovecot/modules/auth/lib20_auth_var_expand_crypt.so
Mar 06 19:28:02 auth-worker(5617): Debug: Module loaded:
/usr/lib/dovecot/modules/auth/libdriver_sqlite.so
Mar 06 19:28:02 auth-worker(5617): Debug:
pam(v,127.0.0.1,): lookup service=dovecot
Mar 06 19:28:02 auth-worker(5617): Debug:
pam(v,127.0.0.1,): #1/1 style=1 msg=Password:
Mar 06 19:28:02 auth-worker(5617): Info:
pam(v,127.0.0.1,): pam_authenticate() failed: System
error
Mar 06 19:28:04 auth: Debug: client passdb out: FAIL1   user=v
Mar 06 19:28:06 imap-login: Info: Aborted login (auth failed, 1 attempts
in 4 secs): user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS,
session=


Now it seems I can't go back to 2.2.22 as well:
https://wiki2.dovecot.org/Upgrading/2.3 says "Downgrading is possible to
v2.2.27 and later. (v2.2.27 accidentally broke dovecot.index* backwards
compatibility a bit.)"

What should I do now? Remove the dysfunctional dovecot server and try a
fresh
new 2.3.0.1 install? How would I migrate my mail?



Here's my dovecot -n:

# 2.3.0.1 (ffd8a29): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.0.1 (d33dca2)
# OS: Linux 4.4.0-116-generic x86_64 Ubuntu 16.04.4 LTS
auth_debug = yes
auth_username_format = %n
auth_verbose = yes
auth_verbose_passwords = plain
hostname = volker-wysk.de
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = mdbox:~/lib/Dovecot-Mail
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 imapsieve vnd.dovecot.imapsieve
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Entwürfe {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Papierkorb {
special_use = \Trash
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  mailbox "Versendete Nachrichten" {
special_use = \Sent
  }
  prefix =
  separator = .
}
passdb {
  driver = pam
}
plugin {
  imapsieve_mailbox1_before =
file:/usr/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = Spam
  imapsieve_mailbox2_before =
file:/usr/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Spam
  imapsieve_mailbox2_name = *
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/lib/Sieve
  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
  sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
  sieve_plugins = sieve_imapsieve sieve_extprograms
}
postmaster_address = p...@volker-wysk.de
protocols = imap lmtp sieve
ssl = required
ssl_cert = 

Re: requiring a full fqdn for authentication

2018-03-06 Thread Reio Remma
You need to match against both %n (username) and %d (domain) in your SQL 
query.


Good luck!
Reio

On 06.03.18 16:42, David Mehler wrote:

Hi,

Thanks. Can you elaborate?

Thanks.
Dave.


On 3/6/18, Steffen Kaiser  wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 2 Mar 2018, David Mehler wrote:


dovecot to require a complete email address as a login. Currently I
can log in by either a username or fqdn. I've got the below what is
the issue?
If I need to provide my sql password query let me know.

your SQL query in passdb allows both usernames.


- --
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWp6JisQnQQNheMxiAQKuuggAjNcedq1DVGWbe/3vpKHUHdgBJVzmmEsI
seSm/NFfR6/Fw8c4fCz0BAiIBUkmo7LEowFFo6M9Yf+ZJHP1IDt6N7gWTgral2Vh
pMrNn+mv9okzL2UvJzUlkCA4ntBJVG3BrG9ZUJfk/1f8IKS090nNpu4F79Ag0TG2
MiobX5XtIRvpwSTCteVzQaIanpNhmW/BSvA2smPcdt58AmVI6HUslxcsv9A1XZLP
q47pYucUTyPdsNcK4OrzitRH2+0HNTw70kClP/dfUWEvL4ssw3drCXhO7LjN+Crq
IpdfHp0k7bkfIv/e5Lfg4ZZs4uV5obEyqaa+UP0IUTLrEau1syZd9Q==
=lhft
-END PGP SIGNATURE-




--
Tervitades
Reio Remma


MR Stuudio 25 aastat

*MR Stuudio OÜ*
Tondi 17b, 11316, Tallinn
Tel +372 650 4808
Mob +372 56 22 00 33
r...@mrstuudio.ee
www.mrstuudio.ee





Re: requiring a full fqdn for authentication

2018-03-06 Thread David Mehler
Hi,

Thanks. Can you elaborate?

Thanks.
Dave.


On 3/6/18, Steffen Kaiser  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Fri, 2 Mar 2018, David Mehler wrote:
>
>> dovecot to require a complete email address as a login. Currently I
>> can log in by either a username or fqdn. I've got the below what is
>> the issue?
>
>> If I need to provide my sql password query let me know.
>
> your SQL query in passdb allows both usernames.
>
>
> - --
> Steffen Kaiser
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
>
> iQEVAwUBWp6JisQnQQNheMxiAQKuuggAjNcedq1DVGWbe/3vpKHUHdgBJVzmmEsI
> seSm/NFfR6/Fw8c4fCz0BAiIBUkmo7LEowFFo6M9Yf+ZJHP1IDt6N7gWTgral2Vh
> pMrNn+mv9okzL2UvJzUlkCA4ntBJVG3BrG9ZUJfk/1f8IKS090nNpu4F79Ag0TG2
> MiobX5XtIRvpwSTCteVzQaIanpNhmW/BSvA2smPcdt58AmVI6HUslxcsv9A1XZLP
> q47pYucUTyPdsNcK4OrzitRH2+0HNTw70kClP/dfUWEvL4ssw3drCXhO7LjN+Crq
> IpdfHp0k7bkfIv/e5Lfg4ZZs4uV5obEyqaa+UP0IUTLrEau1syZd9Q==
> =lhft
> -END PGP SIGNATURE-
>


Re: sieve vacation alias handling problem

2018-03-06 Thread Marcio Vogel Merlone dos Santos

Thank you for sharing your solution! That made my life easier.

Regards.


Em 04/03/2018 08:08, Karol Augustin escreveu:

On 2018-03-03 21:47, Karol Augustin wrote:

On 2018-03-03 21:28, Stephan Bosch wrote:

Op 3/2/2018 om 3:35 PM schreef Karol Augustin:

Hi,

I am using Dovecot LDA as LMTP renders envelope extension unusable.
(...)
from my master.cf:
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f
${sender} -a ${original_recipient} -d ${user}@${nexthop}


Sorry for causing problems and wasting time. The problem was with
lacking -r parameter in LDA invocation:

"-r : Final envelope recipient address. Defaults to -a address,
but may differ if e.g. aliases are used or when dropping the +ext part.
(v2.0.3+)"
So the final recipient that is used by vacation was always set to the
original recipient value.

With the following Postfix config everything works exactly as expected.
Response is generated if mail is send to +exct address and is not
generated if it is send to an alias unless the alias is configured in
"addresses variable.

Also the sieve_vacation_use_original_recipient parameter works as
expected.

dovecot unix - n n - - pipe
flags=OXDRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f
${sender} -a ${original_recipient} -r ${recipient} -d ${user}@${nexthop}


Thanks,
Karol


--
*Marcio Merlone*


Re: Sieve filter doesn't respect mailbox separator

2018-03-06 Thread Jungersen, Danjel - Jungersen Grafisk ApS



On 2 Mar 2018 at 18:10, Konstantinos Tsakiltzidis wrote:


> namespace separator is '.',
> this sieve script incorrectly tries to put the mail inside a mailbox
> rather that beside it, for example if the mailbox is named 'example',
> the mail will be put in the path 'example/.Spam' instead of
> 'example.Spam'
> 
> require ["fileinto"];
> if header :contains "X-Spam" "yes" {
>    fileinto "Spam";
> }
Could it be related to the fact that in one line you say "Junk" (In dovecot) and in another you 
say "Spam" (In sieve) ??


//Danjel
> 
> 
> 
> # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.21 (92477967)
> # OS: Linux 4.9.0-6-amd64 x86_64 Debian 9.1 ext4
> lda_mailbox_autocreate = yes
> lda_mailbox_autosubscribe = yes
> mail_debug = yes
> mail_location = maildir:/var/vmail/%d/%n
> 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 "Sent Messages" {
>      special_use = \Sent
>    }
>    mailbox Trash {
>      special_use = \Trash
>    }
>    prefix =
>    separator = .
>    subscriptions = yes
>    type = private
> }
> namespace modulus {
>    list = children
>    location = maildir:/var/vmail/%d/Public:INDEXPVT=~/public/indexes
>    mailbox admin {     auto = subscribe   }   mailbox support {
>      auto = subscribe   }   mailbox telecoms {     auto =
>  subscribe   }   prefix = Public.   separator = .   subscriptions
>  = yes   type = public
> }
> passdb {
>    driver = pam
> }
> plugin {
>    acl = vfile
>    mail_log_events = flag_change
>    mail_log_fields = box flags uid
>    sieve = ~/dovecot.sieve
>    sieve_before = /var/vmail/global.sieve
>    sieve_dir = ~/sieve
>    sieve_global_dir = /var/vmail/sieve
> }
> protocols = " imap lmtp sieve lmtp"
> service auth {
>    unix_listener /var/spool/postfix/private/auth {
>      group = mail
>      mode = 0666
>      user = postfix
>    }
>    unix_listener auth-userdb {
>      group = mail
>      mode = 0666
>      user = vmail
>    }
> }
> service imap-login {
>    inet_listener imap {
>      port = 0
>    }
> }
> service lmtp {
>    unix_listener /var/spool/postfix/private/dovecot-lmtp {
>      group = postfix
>      mode = 0600
>      user = postfix
>    }
> }
> service managesieve-login {
>    inet_listener sieve {
>      port = 4190
>    }
>    process_min_avail = 0
>    service_count = 1
>    vsz_limit = 64 M
> }
> service managesieve {
>    process_limit = 1024
> }
> ssl = required
> ssl_cert = 
> ssl_key =  # hidden, use -P to show it
> userdb {
>    driver = passwd
> }
> protocol imap {
>    mail_max_userip_connections = 20
>    mail_plugins = " mail_log notify acl"
>    passdb {
>      args = /etc/dovecot/dovecot-ldap-users.conf.ext
>      driver = ldap
>      name =
>    }
>    userdb {
>      args = uid=vmail gid=mail home=/var/vmail/%d/%n
>      driver = static
>      name =
>    }
> }
> protocol lda {
>    mail_plugins = " sieve acl"
>    userdb {
>      args = /etc/dovecot/dovecot-ldap-users.conf.ext
>      driver = ldap
>      name =
>      override_fields = uid=vmail gid=mail home=/var/vmail/%d/%n  
>  }   userdb {     args = /etc/dovecot/dovecot-ldap-groups.conf.ext
>      driver = ldap     name =     override_fields = uid=vmail
>  gid=mail home=/var/vmail/%d/Public/.%n 
> mail=maildir:/var/vmail/%d/Public/.%n
>    }
> }
> protocol lmtp {
>    mail_plugins = " sieve acl"
>    postmaster_address = postmas...@modulus.gr
>    userdb {
>      args = /etc/dovecot/dovecot-ldap-users.conf.ext
>      driver = ldap
>      name =
>      override_fields = uid=vmail gid=mail home=/var/vmail/%d/%n  
>  }   userdb {     args = /etc/dovecot/dovecot-ldap-groups.conf.ext
>      driver = ldap     name =     override_fields = uid=vmail
>  gid=mail home=/var/vmail/%d/Public/.%n 
> mail=maildir:/var/vmail/%d/Public/.%n
>    }
> }
> protocol doveadm {
>    userdb {
>      args = /etc/dovecot/dovecot-ldap-users.conf.ext
>      driver = ldap
>      name =
>      override_fields = uid=vmail gid=mail home=/var/vmail/%d/%n  
>  }   userdb {     args = /etc/dovecot/dovecot-ldap-groups.conf.ext
>      driver = ldap     name =     override_fields = uid=vmail
>  gid=mail home=/var/vmail/%d/Public/.%n 
> mail=maildir:/var/vmail/%d/Public/.%n
>    }
> }
> protocol sieve {
>    mail_max_userip_connections = 10
>    managesieve_implementation_string = Dovecot Pigeonhole
>    managesieve_logout_format = bytes=%i/%o
>    managesieve_max_line_length = 65536
>    passdb {
>      args = /etc/dovecot/dovecot-ldap-users.conf.ext
>      driver = ldap
>      name =
>  

Re: Mail addresses with quotes + Postfix

2018-03-06 Thread Stephan Bosch



Op 6-3-2018 om 14:34 schreef Philipp Berger:

I upgraded to Dovecot 2.3.0.1 as advised, but it still seems broken. In
the Postfix log I now see:

Mar  6 13:49:03 myhost amavis[7165]: (07165-10) K00VtLRHdrYw FWD from
 -> <"@"@mydomain.tld>, BODY=7BIT 250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as B8CA22DA1B37
Mar  6 13:49:03 myhost amavis[7165]: (07165-10) Passed CLEAN
{RelayedInbound}, [someIp]:11439 [someIp]  ->
<"@"@mydomain.tld>, Queue-ID: D27792DA167C, Message-ID:
<22b95756-e95e-86cf-219c-3b603f758...@mydomain.tld>, mail_id:
K00VtLRHdrYw, Hits: -3, size: 7472, queued_as: B8CA22DA1B37, 1863 ms
Mar  6 13:49:03 myhost postfix/smtp[2329]: D27792DA167C:
to=<@@mydomain.tld>, relay=127.0.0.1[127.0.0.1]:10024, delay=2,
delays=0.15/0.01/0/1.9, dsn=2.0.0, status=sent (250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as B8CA22DA1B37)
Mar  6 13:49:03 myhost postfix/pipe[2282]: B8CA22DA1B37:
to=<@@mydomain.tld>, relay=dovecot, delay=0.2, delays=0.11/0/0/0.09,
dsn=5.1.1, status=bounced (user unknown)
Mar  6 13:49:03 myhost postfix/cleanup[2280]: EA37E2DA1F80:
message-id=<20180306124903.ea37e2da1...@mydomain.tld>
Mar  6 13:49:04 myhost postfix/bounce[2334]: B8CA22DA1B37: sender
non-delivery notification: EA37E2DA1F80
Mar  6 13:49:04 myhost postfix/qmgr[21911]: EA37E2DA1F80: from=<>,
size=9830, nrcpt=1 (queue active)
Mar  6 13:49:04 myhost postfix/qmgr[21911]: B8CA22DA1B37: removed
Mar  6 13:49:04 myhost postfix/pipe[2282]: EA37E2DA1F80:
to=, relay=dovecot, delay=0.07,
delays=0.05/0/0/0.02, dsn=5.3.0, status=bounced (command line usage
error. Command output: lda: Fatal: Invalid -f parameter: Missing domain )

I can see in my MySQL Log that Dovecot queried at the same time with %n
= "" (empty) and %d = "@mydomain.tld". So now the "@" is dropped entirely.

What does the "Fatal: Invalid -f parameter: Missing domain" tell us? Do
I need to change the way Postfix calls Dovecot? Add more quotes? :D


Can you check what Postfix is feeding to Dovecot exactly (i.e., whether 
it is properly escaped)? Maybe wrap dovecot-lda in some shell script and 
see what is passed.


Regards,

Stephan.



Kind regards,
Philipp

Am 04-Mar-18 um 21:12 schrieb Stephan Bosch:

Op 3/1/2018 om 2:07 PM schreef Philipp Berger:

Dear all,

I have a working setup with Postfix + Dovecot, storing users in a MySQL
table.

I ran into problems setting up and using a mail address like
a"@"b...@mydomain.tld, which by RFC should be valid, but leads to problems
in Dovecot. From my debugging, I can see that on the lookup, Dovecot
replaces %n with "a" (quotes added by me) and %d with "b...@mydomain.tld"
(quotes added by me). So the original quotes are gone, and the
domain/user split is incorrect.

I am not sure of Postfix passes the address without quotes to Dovecot or
whether Dovecot can not handle quotes correctly, but I was hoping that
someone with more insight into Dovecot could help me out here.

System Info: Debian 9, Postifx 3.1.6-0+deb9u1, Dovecot 2.2.27-3+deb9u1
Postfix master.cf for Dovecot:
dovecot unix  -   n   n   -   -   pipe
   flags=DRhu user=virtual:virtual argv=/usr/lib/dovecot/dovecot-lda -f
${sender} -d ${user}@${nexthop}

I am grateful for any hints :)

Thank you in advance, kind regards,

Yeah, Dovecot v2.2 is doing some funky stuff with SMTP address parsing.
Dovecot v2.3 should do a better job. I am still not sure if this can be
fixed well for Dovecot v2.2.

Regards,

Stephan.







Re: Mail addresses with quotes + Postfix

2018-03-06 Thread Philipp Berger
I upgraded to Dovecot 2.3.0.1 as advised, but it still seems broken. In
the Postfix log I now see:

Mar  6 13:49:03 myhost amavis[7165]: (07165-10) K00VtLRHdrYw FWD from
 -> <"@"@mydomain.tld>, BODY=7BIT 250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as B8CA22DA1B37
Mar  6 13:49:03 myhost amavis[7165]: (07165-10) Passed CLEAN
{RelayedInbound}, [someIp]:11439 [someIp]  ->
<"@"@mydomain.tld>, Queue-ID: D27792DA167C, Message-ID:
<22b95756-e95e-86cf-219c-3b603f758...@mydomain.tld>, mail_id:
K00VtLRHdrYw, Hits: -3, size: 7472, queued_as: B8CA22DA1B37, 1863 ms
Mar  6 13:49:03 myhost postfix/smtp[2329]: D27792DA167C:
to=<@@mydomain.tld>, relay=127.0.0.1[127.0.0.1]:10024, delay=2,
delays=0.15/0.01/0/1.9, dsn=2.0.0, status=sent (250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as B8CA22DA1B37)
Mar  6 13:49:03 myhost postfix/pipe[2282]: B8CA22DA1B37:
to=<@@mydomain.tld>, relay=dovecot, delay=0.2, delays=0.11/0/0/0.09,
dsn=5.1.1, status=bounced (user unknown)
Mar  6 13:49:03 myhost postfix/cleanup[2280]: EA37E2DA1F80:
message-id=<20180306124903.ea37e2da1...@mydomain.tld>
Mar  6 13:49:04 myhost postfix/bounce[2334]: B8CA22DA1B37: sender
non-delivery notification: EA37E2DA1F80
Mar  6 13:49:04 myhost postfix/qmgr[21911]: EA37E2DA1F80: from=<>,
size=9830, nrcpt=1 (queue active)
Mar  6 13:49:04 myhost postfix/qmgr[21911]: B8CA22DA1B37: removed
Mar  6 13:49:04 myhost postfix/pipe[2282]: EA37E2DA1F80:
to=, relay=dovecot, delay=0.07,
delays=0.05/0/0/0.02, dsn=5.3.0, status=bounced (command line usage
error. Command output: lda: Fatal: Invalid -f parameter: Missing domain )

I can see in my MySQL Log that Dovecot queried at the same time with %n
= "" (empty) and %d = "@mydomain.tld". So now the "@" is dropped entirely.

What does the "Fatal: Invalid -f parameter: Missing domain" tell us? Do
I need to change the way Postfix calls Dovecot? Add more quotes? :D

Kind regards,
Philipp

Am 04-Mar-18 um 21:12 schrieb Stephan Bosch:
> Op 3/1/2018 om 2:07 PM schreef Philipp Berger:
>> Dear all,
>>
>> I have a working setup with Postfix + Dovecot, storing users in a MySQL
>> table.
>>
>> I ran into problems setting up and using a mail address like
>> a"@"b...@mydomain.tld, which by RFC should be valid, but leads to problems
>> in Dovecot. From my debugging, I can see that on the lookup, Dovecot
>> replaces %n with "a" (quotes added by me) and %d with "b...@mydomain.tld"
>> (quotes added by me). So the original quotes are gone, and the
>> domain/user split is incorrect.
>>
>> I am not sure of Postfix passes the address without quotes to Dovecot or
>> whether Dovecot can not handle quotes correctly, but I was hoping that
>> someone with more insight into Dovecot could help me out here.
>>
>> System Info: Debian 9, Postifx 3.1.6-0+deb9u1, Dovecot 2.2.27-3+deb9u1
>> Postfix master.cf for Dovecot:
>> dovecot unix  -   n   n   -   -   pipe
>>   flags=DRhu user=virtual:virtual argv=/usr/lib/dovecot/dovecot-lda -f
>> ${sender} -d ${user}@${nexthop}
>>
>> I am grateful for any hints :)
>>
>> Thank you in advance, kind regards,
> Yeah, Dovecot v2.2 is doing some funky stuff with SMTP address parsing.
> Dovecot v2.3 should do a better job. I am still not sure if this can be
> fixed well for Dovecot v2.2.
>
> Regards,
>
> Stephan.





smime.p7s
Description: S/MIME Cryptographic Signature


Re: Outlook 2016 & IMAP Trouble with dovecot

2018-03-06 Thread Jakob Curdes



I would see it a bit more general: Outlook is mostly useless as email
client in general (not looking at the groupware functionality). Even
with Exchange or other server types, many simple things do not work
reliably and never get fixed.
And the simplest things are impossible, e.g. displaying the full email
address of a sender instead of the name only (to make it harder to spoof
senders). I suspect 2016 is the 2nd-last version of Outlook to be
released and from then on it will be browser-only.
That said, IMAP support is "strange" and has always been - OL trusts its
own .ps ort .ost file more than the server which circumvents the general
idea of IMAP. If you need Outlook, avoid IMAP and if you need IMAP,
avoid Outlook

JC

What version of Outlook are you using? I have "2016 (16.0.9029.2016) 32-bit
installed and it does not exhibit the problems that you allege it does?

Have you ever tried any of the MS Forums?
Yes, I have and my customer uses Outlook 2016, current version. Without 
deviating too much from the topic of this list, I can/must affirm that 
the current OL is not a very good IMAP client.
Also, if you have a way to get the email address displayed by default, I 
and many others would appreciate to hear how.
I think discussing the other pros and cons of Outlook is a bit off-topic 
for this list, but rest assured that during a larger migration project I 
have found many problems that others also had and that have not been 
addressed.


JC




Re: requiring a full fqdn for authentication

2018-03-06 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 2 Mar 2018, David Mehler wrote:


dovecot to require a complete email address as a login. Currently I
can log in by either a username or fqdn. I've got the below what is
the issue?



If I need to provide my sql password query let me know.


your SQL query in passdb allows both usernames.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWp6JisQnQQNheMxiAQKuuggAjNcedq1DVGWbe/3vpKHUHdgBJVzmmEsI
seSm/NFfR6/Fw8c4fCz0BAiIBUkmo7LEowFFo6M9Yf+ZJHP1IDt6N7gWTgral2Vh
pMrNn+mv9okzL2UvJzUlkCA4ntBJVG3BrG9ZUJfk/1f8IKS090nNpu4F79Ag0TG2
MiobX5XtIRvpwSTCteVzQaIanpNhmW/BSvA2smPcdt58AmVI6HUslxcsv9A1XZLP
q47pYucUTyPdsNcK4OrzitRH2+0HNTw70kClP/dfUWEvL4ssw3drCXhO7LjN+Crq
IpdfHp0k7bkfIv/e5Lfg4ZZs4uV5obEyqaa+UP0IUTLrEau1syZd9Q==
=lhft
-END PGP SIGNATURE-


Re: Outlook 2016 & IMAP Trouble with dovecot

2018-03-06 Thread Jerry
On Tue, 6 Mar 2018 10:22:36 +0100, Jakob Curdes stated:

>> Thanks,
>>
>> that means that outlook is useless as an Imap client then . This is 
>> the whole idea behind
>> imap, to be able to do work while off-line and sync changes when 
>> on-line or I get it wrong ?
>>
>> thanks anyway  
>
>I would see it a bit more general: Outlook is mostly useless as email 
>client in general (not looking at the groupware functionality). Even 
>with Exchange or other server types, many simple things do not work 
>reliably and never get fixed.
>And the simplest things are impossible, e.g. displaying the full email 
>address of a sender instead of the name only (to make it harder to spoof 
>senders). I suspect 2016 is the 2nd-last version of Outlook to be 
>released and from then on it will be browser-only.
>That said, IMAP support is "strange" and has always been - OL trusts its 
>own .ps ort .ost file more than the server which circumvents the general 
>idea of IMAP. If you need Outlook, avoid IMAP and if you need IMAP, 
>avoid Outlook
>
>JC

What version of Outlook are you using? I have "2016 (16.0.9029.2016) 32-bit
installed and it does not exhibit the problems that you allege it does?

Have you ever tried any of the MS Forums?

https://social.technet.microsoft.com/Forums/en-US/home
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_outlook
http://answers.microsoft.com/en-us/office/forum/outlook

There are others of course, and I have had good success in the past getting
answers. In my experience, the source of the problem is usually PEBKAC.

-- 
Jerry


Re: Outlook 2016 & IMAP Trouble with dovecot

2018-03-06 Thread Jakob Curdes




Thanks,

that means that outlook is useless as an Imap client then . This is 
the whole idea behind
imap, to be able to do work while off-line and sync changes when 
on-line or I get it wrong ?


thanks anyway


I would see it a bit more general: Outlook is mostly useless as email 
client in general (not looking at the groupware functionality). Even 
with Exchange or other server types, many simple things do not work 
reliably and never get fixed.
And the simplest things are impossible, e.g. displaying the full email 
address of a sender instead of the name only (to make it harder to spoof 
senders). I suspect 2016 is the 2nd-last version of Outlook to be 
released and from then on it will be browser-only.
That said, IMAP support is "strange" and has always been - OL trusts its 
own .ps ort .ost file more than the server which circumvents the general 
idea of IMAP. If you need Outlook, avoid IMAP and if you need IMAP, 
avoid Outlook


JC



Re: Plugin charset_alias

2018-03-06 Thread Teemu Huovila
Hello

On 05.03.2018 23:46, MRob wrote:
> On 2018-03-02 09:57, Teemu Huovila wrote:
>> On 02.03.2018 09:38, MRob wrote:
>>> On 2018-03-01 22:59, John Woods wrote:
 Hey Everyone,

     We are getting a compile error for Dovecot 2.2.34 on Solaris 11.3
 x86, using Solaris Studio 12.6 compiler, and it doesn't occur with
 Dovecot 2.2.33.

> Making all in charset-alias
>>>
>>> Can someone easily explain what the usage of this plugin is? Maybe example 
>>> when it is helpful?
>> There is a short explanation at 
>> https://wiki2.dovecot.org/Plugins/CharsetAlias
>>
>> It is intended for mapping charactersets to work around some e.g.
>> Windows specific letters being lost when Dovecot converts mail to UTF8
>> using iconv.
> 
> I read that page so I wanted more real life example so I can learn should I 
> install this plugin or is it for special use scenario cuz I'm not charset 
> expert sorry. Your explain adds little bit more info but not enough to know 
> do I need it or not. BTW not your fault-- I didn't ask myquestion good enough
> 
> If Dovecot has trouble to decode some windows charsets and the plugin fixes 
> this problem then why is it a plugin and not built in as a fix?
As mail can in practise contain almost any type of text, either correctly or 
incorrectly encoded, taking every possible error condition into account in 
"built in" core code is not feasible.

This plugin can be used to work around some issues, but it is not useful for 
everybody. For your specific case, it is difficult to judge without knowing 
your userbase languages and mail clients in depth. I would say however, that if 
you do not know of any issues with mail content encoding, you probably should 
not enable this plugin.

br,
Teemu


Re: Outlook 2016 & IMAP Trouble with dovecot

2018-03-06 Thread G A

On 03/05/2018 05:40 PM, John Woods wrote:

George,

    We run Dovecot with Outlook, and have had similar problems when 
Outlook is operating in "Offline Mode". When you're in offline mode, 
doing any folder-level operations, such as Copy, Create, Rename, Move, 
Delete, etc. causes problems with the mailbox. The end result is that 
you could lose e-mails and entire folders that were involved in the 
offline operation.


    How we have fixed this in the past, what we have done is:

 1. Do an Outlook "export" of the entire contents of the IMAP account
into a ".pst" file. (This saves the e-mails that may be at-risk of
being lost.)
 2. Delete the IMAP account in Outlook, which includes the ".ost" file.
 3. Delete the IMAP account on the Dovecot server
 4. Reconfigure the IMAP account in Outlook
 5. Restore the IMAP contents from the ".pst" file in step #1.
 6. Educate the user about not doing folder-level operations while in
offline mode.

    Hope this helps...

Thanks,
John



Thanks,

that means that outlook is useless as an Imap client then . This is the 
whole idea behind
imap, to be able to do work while off-line and sync changes when on-line 
or I get it wrong ?


thanks anyway

George


Re: Outlook 2016 & IMAP Trouble with dovecot

2018-03-06 Thread G A

On 03/05/2018 05:40 PM, John Woods wrote:

George,

    We run Dovecot with Outlook, and have had similar problems when 
Outlook is operating in "Offline Mode". When you're in offline mode, 
doing any folder-level operations, such as Copy, Create, Rename, Move, 
Delete, etc. causes problems with the mailbox. The end result is that 
you could lose e-mails and entire folders that were involved in the 
offline operation.


    How we have fixed this in the past, what we have done is:

 1. Do an Outlook "export" of the entire contents of the IMAP account
into a ".pst" file. (This saves the e-mails that may be at-risk of
being lost.)
 2. Delete the IMAP account in Outlook, which includes the ".ost" file.
 3. Delete the IMAP account on the Dovecot server
 4. Reconfigure the IMAP account in Outlook
 5. Restore the IMAP contents from the ".pst" file in step #1.
 6. Educate the user about not doing folder-level operations while in
offline mode.

    Hope this helps...



Thanks,

that means that outlook is useless as an Imap client then . This is the 
whole idea behind
imap, to be able to do work while off-line and sync changes when on-line 
or I get it wrong ?


thanks anyway

George


Re: dovecot connections to mysql

2018-03-06 Thread Aki Tuomi

> On 06 March 2018 at 04:08 David Mehler  wrote:
> 
> 
> Hello,
> 
> I'm running a virtual mail hosting system with MySQL as a backend for
> dovecot to do it's authentication against. I am getting intermediant
> failures when users attempt mail-related tasks such as checking their
> inbox or setting up an alias. The error is to many connections.
> 
> Any ideas?
> 
> Thanks.
> Dave.

Increase number of allowed connections in your MySQL server, or use auth cache.

Aki