Re: [Dovecot] namespace delivery question

2013-07-03 Thread Laszlo Kiraly
> > If I rewrite i...@domain.com to vmail+public/i...@domain.com, then it saved 
> > to
> > /home/vmail/public/mailboxes/info however if I get mail to
> > vmail+public/i...@anotherdomain.com then it's saved to the same mailbox.
> >
> > How can I set dovecot to save to different mailboxes?
> 
> if both users vm...@domain.com and vm...@anotherdomain.com have 
> "append" permission to public/info,
>  vmail+public/i...@anotherdomain.com will save the message there,
>  because that's the idea of lmtp_save_to_detail_mailbox . 
> vmail+public/i...@anotherdomain.com means: do not save to INBOX of 
> vm...@anotherdomain.com, but to public/info with the permission of 
> user vm...@anotherdomain.com. That applies to all other users as well.
> 
> If you want to store i...@anotherdomain.com somewhere else, create 
> another SMTP alias to another mailbox, e.g.:
> 
> i...@anotherdomain.com -> 
> vmail+public/info-anotherdom...@anotherdomain.com

Thanks, that is the trick.

 
> I think you should reject incoming mails from outside to vmail and 
> handle all deliveries to public through local SMTP aliases. Because 
> "vmail" is no valid recipient anyway, isn't it?

Do you think reject in SMTP time in exim? I think, I do exactly the same.
I have a list with public mails and rewrite rules for them. I use this list in
an acl to check it's a public mailbox or not.
Of course vmail isn't a valid recipient.

I have now a fully working system. :)


Thank you all for the very useful answers.

Regards: Laszlo Kiraly



Re: [Dovecot] namespace delivery question

2013-07-03 Thread Laszlo Kiraly
Thanks Steffen,

It mostly works.

my public namespace config:
--
namespace {
type = public
prefix = public/
separator = /
location = sdbox:/home/vmail/public/
list = no
subscriptions = no
}
--

If I rewrite i...@domain.com to vmail+public/i...@domain.com, then it saved to
/home/vmail/public/mailboxes/info however if I get mail to
vmail+public/i...@anotherdomain.com then it's saved to the same mailbox.

How can I set dovecot to save to different mailboxes?


Regards: Király László


-- Original Message ---
From: Steffen Kaiser 
To: k...@madalbal.hu
Cc: dovecot@dovecot.org
Sent: Tue, 2 Jul 2013 14:28:41 +0200 (CEST)
Subject: Re: [Dovecot] namespace delivery question

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Thu, 27 Jun 2013, Laszlo Kiraly wrote:
> 
> > i...@domain.com <- public, readable by user2
> > us...@domain.com <- private
> > us...@domain.com <- private
> >
> > The mailboxes are virtual, authentication through pam (kerberos).
> > The public mailbox doesn't have valid kerberos account.
> >
> > I couldn't find solution in the documentation, how can I manage the email
> > delivery to the public namespace?
> >
> > There is a -m option in the lda delivery where you can give namespace 
> > prefix.
> > Maybe it's good for this, but I couldn't find any information how can I do
> > this with lmtp?
> 
> If you set:
> 
> lmtp_save_to_detail_mailbox = yes
> recipient_delimiter = #
> 
> you could alias i...@domain.com to 
> #public.mailbox.fol...@domain.com . 1st option tells LMTP to 
> use the detail (subaddress) as default mailbox, which is essentially 
> the same as the -m option of the LDA. 2nd options sets the delimiter 
> of user and detail.  must habe write permission to the folder.
> 
> Regards,
> 
> - -- 
> Steffen Kaiser



Re: [Dovecot] namespace delivery question

2013-07-02 Thread Laszlo Kiraly
> > There is a -m option in the lda delivery where you can give namespace 
prefix.
> > Maybe it's good for this, but I couldn't find any information how can I do
> > this with lmtp?
> 
> If you set:
> 
> lmtp_save_to_detail_mailbox = yes
> recipient_delimiter = #
> 
> you could alias i...@domain.com to 

What kind of alias do you think? At smtp time, like in the /etc/aliases?
Eventually, i can configure exim to accept the "#" and "/" chars in the email 
address.

> #public.mailbox.fol...@domain.com . 1st option tells LMTP to 
> use the detail (subaddress) as default mailbox, which is essentially 
> the same as the -m option of the LDA. 2nd options sets the delimiter 
> of user and detail.  must habe write permission to the folder.
> 
> Regards,
> 
> - -- 
> Steffen Kaiser

Best regards: Király László


Re: [Dovecot] namespace delivery question

2013-07-01 Thread Laszlo Kiraly
Otherwise asking: can I set sieve filter per namespace?

I mean, one which is only for the public namespace.

Thanks again,
László Király

> Thank you everyone for your help, it works.
> 
> I have now one more question:
> 
> If I send mail to: i...@domain.com , cc: l.kir...@domain.com, I get 
> two emails to i...@domain.com, because of sieve_before executes this 
> script for all the mailboxes.
> 
>  How can I persuade dovecot to deliver the mail all the
> adresses (to, cc, bcc)?
> 
> Thanks again,
> László Király
> 
> -- Original Message ---
> From: Daniel Parthey 
> To: k...@madalbal.hu,dovecot@dovecot.org
> Sent: Sun, 30 Jun 2013 16:38:21 +0200
> Subject: Re: [Dovecot] namespace delivery question
> 
> > Add the :create flag to your SIEVE rule in order to automatically 
> > create mailboxes if nonexistent.
> > 
> > require "fileinto";
> > 
> > if address :is ["To","CC"] "i...@domain.com"
> > {
> > fileinto :create "public/info";
> > }
> > 
> > Regards
> > Daniel
> --- End of Original Message ---
--- End of Original Message ---



Re: [Dovecot] namespace delivery question

2013-07-01 Thread Laszlo Kiraly
Thank you everyone for your help, it works.

I have now one more question:

If I send mail to: i...@domain.com , cc: l.kir...@domain.com, I get two emails
to i...@domain.com, because of sieve_before executes this script for all the
mailboxes.

 How can I persuade dovecot to deliver the mail all the
adresses (to, cc, bcc)?

Thanks again,
László Király

-- Original Message ---
From: Daniel Parthey 
To: k...@madalbal.hu,dovecot@dovecot.org
Sent: Sun, 30 Jun 2013 16:38:21 +0200
Subject: Re: [Dovecot] namespace delivery question

> Add the :create flag to your SIEVE rule in order to automatically 
> create mailboxes if nonexistent.
> 
> require "fileinto";
> 
> if address :is ["To","CC"] "i...@domain.com"
> {
> fileinto :create "public/info";
> }
> 
> Regards
> Daniel
--- End of Original Message ---



Re: [Dovecot] namespace delivery question

2013-06-29 Thread Laszlo Kiraly
15045): Disconnect from local: Client quit 
(in reset)
---


-- Original Message ---
From: Thomas Leuxner 
To: dovecot@dovecot.org
Sent: Fri, 28 Jun 2013 15:37:34 +0200
Subject: Re: [Dovecot] namespace delivery question

> * Laszlo Kiraly  2013.06.27 14:20:
> 
> > I couldn't find solution in the documentation, how can I manage the email 
> > delivery to the public namespace?
> [...]
> > namespace {
> >   location = sdbox:/home/vmail/public/%u
> >   prefix = public.
> >   separator = .
> >   subscriptions = no
> >   type = public
> > }
> 
> You can use sieve for that with LMTP:
> 
> if address :is ["To","CC"] "some...@domain.tld"
> {
> fileinto "Public.Mailbox.Folder";
> }
> 
> I personally use / separators so not 100% the syntax applies to your 
> scenario.
> 
> Thomas
--- End of Original Message ---


Re: [Dovecot] namespace delivery question

2013-06-28 Thread Laszlo Kiraly
Hi Thomas,

Thank you for your answer.
I'm happy with / separators too so I changed them.

Will it work too if I rewrite "rcpt to" at transport time in exim?

For example: i...@domain.com -> Public/i...@domain.com

I have a file with email addresses for exim to distinguish public mails.
In this way I could avoid double adjustments and checks.

Best regards: Király László

-- Original Message ---
From: Thomas Leuxner 
To: dovecot@dovecot.org
Sent: Fri, 28 Jun 2013 15:37:34 +0200
Subject: Re: [Dovecot] namespace delivery question

> * Laszlo Kiraly  2013.06.27 14:20:
> 
> > I couldn't find solution in the documentation, how can I manage the email 
> > delivery to the public namespace?
> [...]
> > namespace {
> >   location = sdbox:/home/vmail/public/%u
> >   prefix = public.
> >   separator = .
> >   subscriptions = no
> >   type = public
> > }
> 
> You can use sieve for that with LMTP:
> 
> if address :is ["To","CC"] "some...@domain.tld"
> {
> fileinto "Public.Mailbox.Folder";
> }
> 
> I personally use / separators so not 100% the syntax applies to your 
> scenario.
> 
> Thomas
--- End of Original Message ---



[Dovecot] namespace delivery question

2013-06-27 Thread Laszlo Kiraly
Hi list,

I like to have public mailboxes in addition to other private in the same 
domain, and manage the public mailbox permissions through acls.

For example:

i...@domain.com <- public, readable by user2
us...@domain.com <- private
us...@domain.com <- private

The mailboxes are virtual, authentication through pam (kerberos).
The public mailbox doesn't have valid kerberos account.

My smtp server is exim 4.80. I set the mail delivery to lmtp.

I couldn't find solution in the documentation, how can I manage the email 
delivery to the public namespace?

There is a -m option in the lda delivery where you can give namespace prefix. 
Maybe it's good for this, but I couldn't find any information how can I do 
this with lmtp?

my dovecot config:

test:~# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.0.0-1-686-pae i686 Debian squeeze/sid
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 {
  location = sdbox:/home/vmail/public/%u
  prefix = public.
  separator = .
  subscriptions = no
  type = public
}
namespace inbox {
  inbox = yes
  location = sdbox:/home/vmail/private/%n
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = .
}
passdb {
  driver = pam
}
plugin {
  acl = vfile
  sieve = /home/vmail/%n/.dovecot.sieve
  sieve_dir = /home/vmail/%n
  sieve_global_dir = /home/vmail/sieve
}
protocols = " imap lmtp sieve"
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  service_count = 1
}
ssl_cert =