Re: dovecot.sieve shows up as a mailbox

2019-03-21 Thread Drexl Spivey via dovecot
Thanks for the help.

This did solve my problem, and created a little hiccup.

Namely, all the users that had email account LOST their mail. I am just
starting migrating to this new mail server setup, so mostly just
insignificant testing emails.

I am sure there is a way to recover the old mails? Doesn't matter, not
really much there.




--
Sent from: http://dovecot.2317879.n4.nabble.com/


Re: Dovecot quota and Postfix smtpd_recipient_restrictions?

2019-03-21 Thread Davide Marchi via dovecot

Well,

so the right syntax (in my case) would be:

-o smtpd_recipient_restrictions = 
reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject,check_policy_service

inet:mailstore.example.com:12340

right??
I configured it before the "permit_sasl_authenticated" and the "reject" 
statement.




I've a doubt (again): Is it correct the the space between "[..]service" 
and "inet[..]"? As suggested here: 
https://blog.sys4.de/postfix-dovecot-mailbox-quota-en.html


I've run:

postconf smtpd_recipient_restrictions=check_policy_service 
inet:mailstore.example.com:12340


but obtain the error:

postconf: fatal: missing '=' after attribute name: 
"inet:mailstore.example.com:12340"


Please, which is the correct syntax? :-)


Thanks again!

Davide



Re: imap ---- LIST "" * The returned mailbox does not display quotes

2019-03-21 Thread @lbutlr via dovecot
On 21 Mar 2019, at 10:51, Ralph Seichter via dovecot  
wrote:
> * lty via dovecot:
> 
>> foxmail will not have next step after sending {LIST "" *} command
>> action.
> 
> Can you please stop this now? If Foxmail is broken, Foxmail needs to be
> fixed, not some kludges added to well-behaving Dovecot.

When looking at mail clients last year I knew formal was broken before I even 
downloaded it.

I mean, there is zero possibility I am going to trust my mail to tencent. I'd 
sooner giver Facebook access to my mail than a company beholden to the PRC.



-- 
ARE YOU FAMILIAR WITH THE WORDS 'DEATH WAS HIS CONSTANT COMPANION'? 'But
I don't usually see you!'




Re: Maildirs on AWS EFS

2019-03-21 Thread Ralph Seichter via dovecot
* Rodolfo Gonzalez via dovecot:

> I just have a doubt in the technical side: is it safe to have the
> email in EFS?

"Safe" as in "storing and retreiving will work"? Probably.

I would not do it for privacy reasons, unless all data was encrypted on
a machine before storing it in any service operated by Amazon, Google,
Microsoft, etc.

-Ralph


Re: imap ---- LIST "" * The returned mailbox does not display quotes

2019-03-21 Thread Ralph Seichter via dovecot
* lty via dovecot:

> foxmail will not have next step after sending {LIST "" *} command
> action.

Can you please stop this now? If Foxmail is broken, Foxmail needs to be
fixed, not some kludges added to well-behaving Dovecot.

-Ralph


Re: dovecot.sieve shows up as a mailbox

2019-03-21 Thread Yassine Chaouche via dovecot

On 3/21/19 4:13 PM, Aki Tuomi via dovecot wrote:

On 21 March 2019 17:05 Yassine Chaouche via dovecot  wrote:

[...]
While not very intuitive, I have :

mail_home = /var/mail/vmail/%d/%n/dovecot
mail_location = maildir:~/..

Which works for me ^^'

Yassine.

Except it would have the same problem, but with 'dovecot' as folder under some 
configurations.

Aki


Well, none of my users have reported they can see that folder. I myself 
use webmail, thunderbird on my PC and k9 mail on my phone and don't see 
that folder in any of these clients.


Yassine.



Re: dovecot.sieve shows up as a mailbox

2019-03-21 Thread Aki Tuomi via dovecot


> On 21 March 2019 17:05 Yassine Chaouche via dovecot  
> wrote:
> 
>  
> On 3/21/19 3:57 PM, Aki Tuomi via dovecot wrote:
> > This because you have a very common misconfiguration, which is that your 
> > mail_home and mail_location are pointing to same directory, and that lead 
> > into this problem.
> >
> > Solution is of course to use:
> >
> > mail_home = /var/mail/vmail/%d/%n
> > mail_location = maildir:~/Mail
> >
> > Aki
> 
> While not very intuitive, I have :
> 
> mail_home = /var/mail/vmail/%d/%n/dovecot
> mail_location = maildir:~/..
> 
> Which works for me ^^'
> 
> Yassine.

Except it would have the same problem, but with 'dovecot' as folder under some 
configurations.

Aki


Re: dovecot.sieve shows up as a mailbox

2019-03-21 Thread Yassine Chaouche via dovecot

On 3/21/19 3:57 PM, Aki Tuomi via dovecot wrote:

This because you have a very common misconfiguration, which is that your 
mail_home and mail_location are pointing to same directory, and that lead into 
this problem.

Solution is of course to use:

mail_home = /var/mail/vmail/%d/%n
mail_location = maildir:~/Mail

Aki


While not very intuitive, I have :

mail_home = /var/mail/vmail/%d/%n/dovecot
mail_location = maildir:~/..

Which works for me ^^'

Yassine.



Re: dovecot.sieve shows up as a mailbox

2019-03-21 Thread Aki Tuomi via dovecot


This because you have a very common misconfiguration, which is that your 
mail_home and mail_location are pointing to same directory, and that lead into 
this problem.

Solution is of course to use:

mail_home = /var/mail/vmail/%d/%n
mail_location = maildir:~/Mail

Aki

> On 21 March 2019 16:48 Esteban L via dovecot  wrote:
> 
>  
> Hello, 
> 
> Config infos below.
> 
> Short version, I am getting this weird anomaly on my main email
> account. Such that, "dovecot.sieve" is showing up as a mailbox in my
> various email clients (e.g. k-9 (mobile), and Evolution).
> 
> I have tried deleting the "rogue folder" with doveadm, but it just
> returns.
> 
> Anyone have any suggestions where I can track this down.
> 
> dovecot --version
> 2.2.27
> 
> dovecot -n
> 
> # 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.16 (fed8554)
> # OS: Linux 4.9.0-6-amd64 x86_64 Debian 9.8 ext4
> auth_debug = yes
> auth_debug_passwords = yes
> auth_mechanisms = plain login
> auth_verbose = yes
> auth_verbose_passwords = yes
> mail_debug = yes
> mail_location = maildir:/var/mail/vmail/%d/%n
> mail_plugins = " quota"
> mail_privileged_group = vmail
> 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 Archive {
> auto = subscribe
> special_use = \Archive
>   }
>   mailbox Drafts {
> auto = subscribe
> special_use = \Drafts
>   }
>   mailbox Junk {
> auto = subscribe
> special_use = \Junk
>   }
>   mailbox Sent {
> special_use = \Sent
>   }
>   mailbox "Sent Messages" {
> special_use = \Sent
>   }
>   mailbox Trash {
> auto = subscribe
> special_use = \Trash
> 
> 
> }
>   prefix =
> }
> passdb {
>   args = /etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> plugin {
>   quota = maildir:User quota
>   quota_grace = 10%%
>   quota_rule = *:storage=10G
>   quota_rule2 = Trash:storage=+1G
>   quota_status_overquota = 552 5.2.2 Mailbox is full
>   quota_warning = storage=95%% quota-warning 95 %u
>   quota_warning2 = storage=80%% quota-warning 80 %u
>   sieve = ~/.dovecot.sieve
>   sieve_after = /etc/dovecot/sieve/spamfilter.sieve
>   sieve_dir = ~/sieve
> }
> 
> protocols = " imap lmtp sieve"
> service auth {
>   unix_listener /var/spool/postfix/private/auth {
> group = postfix
> mode = 0666
> user = postfix
>   }
> }
> service imap-login {
>   inet_listener imaps {
> port = 993
> ssl = yes
>   }
> }
> service lmtp {
>   unix_listener /var/spool/postfix/private/dovecot-lmtp {
> group = postfix
> mode = 0600
> user = postfix
>   }
> }
> ssl = required
> ssl_cert =  ssl_key =  # hidden, use -P to show it
> userdb {
>   args = /etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> verbose_ssl = yes
> protocol lmtp {
>   mail_plugins = " quota sieve"
>   postmaster_address = este...@little-beak.com
> }
> protocol lda {
>   mail_plugins = " quota sieve"
> }
> protocol imap {
>   mail_plugins = " quota imap_quota"
> }


dovecot.sieve shows up as a mailbox

2019-03-21 Thread Esteban L via dovecot
Hello, 

Config infos below.

Short version, I am getting this weird anomaly on my main email
account. Such that, "dovecot.sieve" is showing up as a mailbox in my
various email clients (e.g. k-9 (mobile), and Evolution).

I have tried deleting the "rogue folder" with doveadm, but it just
returns.

Anyone have any suggestions where I can track this down.

dovecot --version
2.2.27

dovecot -n

# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.9.0-6-amd64 x86_64 Debian 9.8 ext4
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = yes
mail_debug = yes
mail_location = maildir:/var/mail/vmail/%d/%n
mail_plugins = " quota"
mail_privileged_group = vmail
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 Archive {
auto = subscribe
special_use = \Archive
  }
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash


}
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = maildir:User quota
  quota_grace = 10%%
  quota_rule = *:storage=10G
  quota_rule2 = Trash:storage=+1G
  quota_status_overquota = 552 5.2.2 Mailbox is full
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = ~/.dovecot.sieve
  sieve_after = /etc/dovecot/sieve/spamfilter.sieve
  sieve_dir = ~/sieve
}

protocols = " imap lmtp sieve"
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
service imap-login {
  inet_listener imaps {
port = 993
ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
ssl = required
ssl_cert = 

Re: Maildirs on AWS EFS

2019-03-21 Thread @lbutlr via dovecot
On 20 Mar 2019, at 23:33, Rodolfo Gonzalez via dovecot  
wrote:
> AWS released one month ago a EFS system with administered life cycle, which 
> means that files not accessed in the last 30 days are moved to a lower cost 
> storage tier. Currently I hold my e-mail, delivered to Maildir++ folders by 
> postfix and retrieved with Dovecot, in standard EBS volumes. This has the 
> disadvantage that I need to allocate more than enough space to ensure that 
> the volume won't get filled too soon. And this costs. Changing to standard 
> EFS wasn't an option, since it's way more expensive than EBS. But, with the 
> new system, costs are lower.
> 
> I just have a doubt in the technical side: is it safe to have the email in 
> EFS? I've read experiences about storing in S3 and using a driver to mount 
> the bucket, and it seems that it's not a very good option. But EFS works like 
> NFS4. Does anyone have experience mounting an EFS to store maildirs?

Are you storing mail directly into AWS?

I think I would not do that. I would store my Archive mailbox online, but my 
live mail? That seems like a bit too much.


-- 
'I knew the two of you would get along like a house on fire.' Screams,
flames, people running for safety...






Re: quota-service with Director - A workaround

2019-03-21 Thread Sami Ketola via dovecot



> On 20 Mar 2019, at 18.17, Tom Sommer via dovecot  wrote:
> 
> 
> On 2019-03-20 16:40, Sami Ketola via dovecot wrote:
> 
>>> On 20 Mar 2019, at 17.13, Tom Sommer via dovecot  
>>> wrote:
>>> I realize quota-service on Director is not supported, which is a shame.
>>> As a workaround I'm thinking of setting up quota-service on one of my 
>>> backend nodes, and have all my Postfix services ask this one node for the 
>>> quota status.
>>> This sort of defeats the purpose of the Director (having per-user assigned 
>>> hot nodes), since now this one node running the quota-service will access 
>>> all mailboxes to check the status of all inbound mail.
>>> Is this a problem though? In terms of NFS locking etc. etc.?
>> Might be. Wouldn't it be just easier to use the overquota-flag available 
>> since 2.2.16 and set up overquota flag in LDAP or userdb of choice and 
>> configure postfix to check that flag?
> 
> I don't really want to involve LDAP in my setup :)

So use what ever your shared userdb service is as you must have one if you are 
using multiple backends and directors.

Sami



Re: imap ---- LIST "" * The returned mailbox does not display quotes

2019-03-21 Thread Sami Ketola via dovecot


> On 21 Mar 2019, at 10.08, lty via dovecot  wrote:
> 
>  
> Yes,
> Foxmail for mac client, after dovecot upgrade from 2.1.17 to new version, 
> imap can't receive any email, I perform packet capture test, foxmail will not 
> have next step after sending {LIST "" *} command action.
> 
> Foxmail for mac client, dovecot version 2.1.17 can receive imap mail 
> normally, because we need to add quota_max_mail_size configuration, we must 
> upgrade to a higher version (https://wiki2.dovecot.org/Quota/Configuration# 
> Maximum_saved_mail_size)
> 
> 
> After comparison, the new version of dovecot returned without quotes.
> I hope that the quotes can be changed in the configuration, can I?
> 

No.

> Can I change the configuration to add quotes now?
>   Or add this setting in the next version.
> 


No.

It's still Foxmail that is broken here. Please contact the authors of Foxmail 
so that they can make their software RFC compliant.
Or stop using Foxmail.

Sami



Re: Dovecot quota and Postfix smtpd_recipient_restrictions?

2019-03-21 Thread Davide Marchi via dovecot

From: Urban Loesch 
Hi,


Well,

so the right syntax (in my case) would be:

-o smtpd_recipient_restrictions = 
reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject,check_policy_service

inet:mailstore.example.com:12340

right??
I configured it before the "permit_sasl_authenticated" and the "reject" 
statement.




And eventually, should you suggest me how made some functional 
verification test?
According to: http://www.postfix.org/SMTPD_POLICY_README.html try on 
your postfix:


telnet mailstore.example.com 12340

and insert the following lines:

sender=somesen...@somedomain.com
recipient=y...@recipient.com
size=12345
[empty line]


Set a size= in bytes which is greater that your configured quota.
In theory the policy service should respond with your configured error 
message "552 5.2.2 Mailbox is full".


Example on my server:

...
sender=postmas...@somedomain.com
recipient=m...@recipient.com
size=12345000

action=552 5.2.2 Mailbox is full
...


For a livetest reduce the quota of your testaccount to ex. 100KB and 
the send a mail > 100BK from outside to it. You should see the "552" 
error
message in your logs and you should get back a bouncemail from the 
sending server.


Hope I explained it correct.

Best
Urban



WAW! Very very clear your example!

Thanks again Urban, you are a friend ;-)

I will try...


Thanks again to all!


Davide





--
cosmogoniA
n o p r o v a r e n o f a r e o n o n f a r e n o n c e p r o v a r e



Re: imap ---- LIST "" * The returned mailbox does not display quotes

2019-03-21 Thread lty via dovecot
 

Yes,
Foxmail for mac client, after dovecot upgrade from 2.1.17 to new
version, imap can't receive any email, I perform packet capture test,
foxmail will not have next step after sending {LIST "" *} command
action. 

Foxmail for mac client, dovecot version 2.1.17 can receive imap mail
normally, because we need to add quota_max_mail_size configuration, we
must upgrade to a higher version
(https://wiki2.dovecot.org/Quota/Configuration# Maximum_saved_mail_size)


After comparison, the new version of dovecot returned without quotes.
I hope that the quotes can be changed in the configuration, can I?
Can I change the configuration to add quotes now?
 Or add this setting in the next version. 

> On 21 Mar 2019, at 6.22, lty via dovecot  wrote:
> 
>> dovecot version 
>> 
>> v2.2.29 
>> 
>> v2.2.36 
>> 
>> v2.3.5 
>> 
>> LIST "" * The returned mailbox does not display quotes 
>> v2.1.17 
>> 
>> LIST "" * The returned mailbox shows quotation marks 
>> 
>> Why is the quotation mark removed in the new version?
> 
> Because they were unnecessary. The code was changed to use more generic IMAP 
> token writer, which adds quotes only as necessary. 
> 
>> Is there any configuration option in the new version to add quotes?
> 
> No. Does it break some client?
 

Re: imap ---- LIST "" * The returned mailbox does not display quotes

2019-03-21 Thread Timo Sirainen via dovecot
On 21 Mar 2019, at 6.22, lty via dovecot  wrote:
> 
> dovecot  version
> 
> v2.2.29
> 
> v2.2.36
> 
> v2.3.5
> 
> LIST "" * The returned mailbox does not display quotes
> 
> v2.1.17
> LIST "" * The returned mailbox shows quotation marks
> 
> Why is the quotation mark removed in the new version?
> 

Because they were unnecessary. The code was changed to use more generic IMAP 
token writer, which adds quotes only as necessary.

> Is there any configuration option in the new version to add quotes?
> 

No. Does it break some client?