Postfix - Dovecot alias

2022-04-05 Thread John Doe
Hello,

I have the problem with aliases. The emails did not delivery to correct
email. I send email to email: to_al...@domain.com that is valid alias and
email should be sent to real email folder: t...@domain.com. Dovecot creating
to_alias folder and deliver the emails there. Here is the email log: / did
not see t...@domain.com below /


Apr  5 18:54:40 www postfix/smtpd[30547]: connect from
mail-40137.protonmail.ch[185.70.40.137]
Apr  5 18:54:40 www postfix/smtpd[30547]: Anonymous TLS connection
established from mail-40137.protonmail.ch[185.70.40.137]: TLSv1.3 with
cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519
server-signature ECDSA (P-384) server-digest SHA384
Apr  5 18:54:52 www postfix/smtpd[30547]: 85A412E19B6: client=
mail-40137.protonmail.ch[185.70.40.137]
Apr  5 18:54:52 www postfix/cleanup[30556]: 85A412E19B6:
message-id=
Apr  5 18:54:53 www dccifd[1856]: stat(log directory "log"): No such file
or directory
Apr  5 18:54:57 www postfix/qmgr[1398]: 85A412E19B6: from=<
f...@protonmail.com>, size=2767, nrcpt=1 (queue active)
Apr  5 18:54:57 www postfix/smtpd[30547]: disconnect from
mail-40137.protonmail.ch[185.70.40.137] ehlo=2 starttls=1 mail=1 rcpt=1
data=1 quit=1 commands=7
Apr  5 18:54:57 www dovecot: lmtp(30559): Connect from local
Apr  5 18:54:57 www dovecot:
lmtp(com...@domain.com)<30559>:
sieve:
msgid=: stored mail into mailbox 'INBOX'
Apr  5 18:54:57 www postfix/lmtp[30558]: 85A412E19B6: to=<
to_al...@domain.com>, relay=mail.domain.com[private/dovecot-lmtp],
delay=17, delays=17/0.01/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 <
to_al...@domain.com> U8KALFFmTGJfdwAA8oMCvw Saved)
Apr  5 18:54:57 www dovecot: lmtp(30559): Disconnect from local: Logged out
(state=READY)
Apr  5 18:54:57 www postfix/qmgr[1398]: 85A412E19B6: removed

I was playing with password_query but not sure did I'm on right direction.

password_query = \
  SELECT username AS user, password, \
'/var/spool/postmail/%d/%n' AS userdb_home, 1002 AS userdb_uid, 1001 AS
userdb_gid \
  FROM mailbox WHERE username = (SELECT goto FROM alias WHERE address =
'%u')

I'm using dovecot --version: 2.3.18 (9dd8408c18) and my configuration is:


# 2.3.18 (9dd8408c18): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.18 (0bc28b32)
# OS: Linux 5.17.0 x86_64 Slackware 15.0+ ext4
# Hostname: www.ixip.net
base_dir = /var/run/dovecot/
default_login_user = nobody
dict {
  driver = sql
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_location = maildir:/var/spool/postmail/%d/%n/Maildir
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
  list = 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 =
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve = /var/spool/postmail/%d/%n/.dovecot.sieve
  sieve_dir = /var/spool/postmail/%d/%n/sieve/
  sieve_global_dir = /var/lib/dovecot/sieve
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
protocols = imap lmtp sieve sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
service imap-login {
  inet_listener imap {
address = 127.0.0.1
port = 143
  }
  inet_listener imaps {
address = 127.0.0.1
port = 993
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
  user = vmail
}
service managesieve-login {
  inet_listener sieve {
address = 127.0.0.1
port = 4190
  }
  service_count = 1
  vsz_limit = 64 M
}
ssl_cert = 

Postfix - Dovecot alias

2022-04-09 Thread John Doe
Hello,

I have the problem with aliases. The emails did not delivery to correct
email. I send email to email: to_al...@domain.com that is valid alias and
email should be sent to real email folder: t...@domain.com. Dovecot creating
to_alias folder and deliver the emails there. Here is the email log: / did
not see t...@domain.com below /


Apr  5 18:54:40 www postfix/smtpd[30547]: connect from
mail-40137.protonmail.ch[185.70.40.137]
Apr  5 18:54:40 www postfix/smtpd[30547]: Anonymous TLS connection
established from mail-40137.protonmail.ch[185.70.40.137]: TLSv1.3 with
cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519
server-signature ECDSA (P-384) server-digest SHA384
Apr  5 18:54:52 www postfix/smtpd[30547]: 85A412E19B6: client=
mail-40137.protonmail.ch[185.70.40.137]
Apr  5 18:54:52 www postfix/cleanup[30556]: 85A412E19B6:
message-id=
Apr  5 18:54:53 www dccifd[1856]: stat(log directory "log"): No such file
or directory
Apr  5 18:54:57 www postfix/qmgr[1398]: 85A412E19B6: from=<
f...@protonmail.com>, size=2767, nrcpt=1 (queue active)
Apr  5 18:54:57 www postfix/smtpd[30547]: disconnect from
mail-40137.protonmail.ch[185.70.40.137] ehlo=2 starttls=1 mail=1 rcpt=1
data=1 quit=1 commands=7
Apr  5 18:54:57 www dovecot: lmtp(30559): Connect from local
Apr  5 18:54:57 www dovecot:
lmtp(com...@domain.com)<30559>:
sieve:
msgid=: stored mail into mailbox 'INBOX'
Apr  5 18:54:57 www postfix/lmtp[30558]: 85A412E19B6: to=<
to_al...@domain.com>, relay=mail.domain.com[private/dovecot-lmtp],
delay=17, delays=17/0.01/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 <
to_al...@domain.com> U8KALFFmTGJfdwAA8oMCvw Saved)
Apr  5 18:54:57 www dovecot: lmtp(30559): Disconnect from local: Logged out
(state=READY)
Apr  5 18:54:57 www postfix/qmgr[1398]: 85A412E19B6: removed

I was playing with password_query but not sure did I'm on right direction.

password_query = \
  SELECT username AS user, password, \
'/var/spool/postmail/%d/%n' AS userdb_home, 1002 AS userdb_uid, 1001 AS
userdb_gid \
  FROM mailbox WHERE username = (SELECT goto FROM alias WHERE address =
'%u')

I'm using dovecot --version: 2.3.18 (9dd8408c18) and my configuration is:


# 2.3.18 (9dd8408c18): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.18 (0bc28b32)
# OS: Linux 5.17.0 x86_64 Slackware 15.0+ ext4
# Hostname: www.ixip.net
base_dir = /var/run/dovecot/
default_login_user = nobody
dict {
  driver = sql
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_location = maildir:/var/spool/postmail/%d/%n/Maildir
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
  list = 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 =
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve = /var/spool/postmail/%d/%n/.dovecot.sieve
  sieve_dir = /var/spool/postmail/%d/%n/sieve/
  sieve_global_dir = /var/lib/dovecot/sieve
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
protocols = imap lmtp sieve sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
service imap-login {
  inet_listener imap {
address = 127.0.0.1
port = 143
  }
  inet_listener imaps {
address = 127.0.0.1
port = 993
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
  user = vmail
}
service managesieve-login {
  inet_listener sieve {
address = 127.0.0.1
port = 4190
  }
  service_count = 1
  vsz_limit = 64 M
}
ssl_cert = 

Re: Postfix - Dovecot alias

2022-04-09 Thread John Doe
:
$ postmap -q to_al...@domain.com mysql:/etc/postfix/
mysql_virtual_alias_maps.cf
t...@domain.com

Have a great weekend,
Chris


На сб, 9.04.2022 г. в 17:42 ч. Benny Pedersen  написа:

> On 2022-04-09 16:20, John Doe wrote:
>
> > I have the problem with aliases. The emails did not delivery to
> > correct email. I send email to email: to_al...@domain.com that is
> > valid alias and email should be sent to real email folder:
> > t...@domain.com. Dovecot creating to_alias folder and deliver the emails
> > there. Here is the email log: / did not see t...@domain.com below /
>
> its not a dovecot problem, problem is solved in postfix to expand alias
> before sending to dovecot
>
> postconf -nf for more help here or on postfix-maillist
>
> #me2too aswell mis that dovecot could expand alias on its own, specially
> usefull for dovecot quotas
>


Re: Postfix - Dovecot alias

2022-04-09 Thread John Doe
Thank you,
I comment this line and problem solved.


На сб, 9.04.2022 г. в 19:41 ч. Alexander Dalloz  написа:

> Am 09.04.2022 um 18:22 schrieb John Doe:
> > receive_override_options = no_address_mappings
>
> That's simply wrong and causing you the issue.
>
> Alexander
>
>


[Dovecot] namespaces...

2008-08-22 Thread John Doe
Hi,

I am new to dovecot and I am a bit confused with how 
namespaces/prefixes/separators are handled by the clients and dovecot...
I tried to understand the desciption from the conf file but without success.

With each conf I create the following path /f1/f2 on the client (thunderbird) 
and get the following on the dovecot server:

  PREFIX= and separator=/  => .INBOX.f1.f2 + .INBOXTrash
  PREFIX=INBOX/ and separator=/  => .f1.f2 and no Trash
 
PREFIX=INBOX. and separator=.  => .f1.f2 and no Trash

Could someone point me to some IMAP for dummy web page...?  ;D
Or, what is the best conf able to handle most clients?

Thx,
JD


  



Re: [Dovecot] namespaces...

2008-08-26 Thread John Doe
> The SEPARATOR should just refer to the storage structure and the PREFIX 
> should refer to the hierarchy. So if you use "/" as your SEPARATOR, then 
> your storage structure will be user-directory/folder/sub-folder and if 
> you use "." as your storage structure (the default), then your storage 
> structure will be user-directory/.folder.sub-folder . A PREFIX of INBOX. 
> should cause all of the folders & sub-folders to appear under the inbox; 
> a PREFIX of "." should cause all of the folders to appear at the top 
> level; and a PREFIX of Mail. will should all of the folders to appear 
> under Mail with the exception of the INBOX.

Thx for your long post!  ^_^
I understood that it was something like 
.folder1folder2
But, from my tests, it seems not to work as expected...  At least not with 
thunderbird.
By default, Tbird has "allow server to override namespaces"
prefix=INBOX. and separator=.  => no prefix and Trash system not working.
prefix= and separator=.  => INBOX. prefix (from tbird) and Trash system working.
'/' in prefix and separator seems to be ignored (converted to '.').
I guess I will leave it to prefix= and separator=. but one user who uses apple 
mail complained about some prefix problems...

Thx,
JD


  



Re: [Dovecot] mkdir no permission

2009-05-20 Thread John Doe

From: Anna Obertacke 

> Am 19.05.2009 um 21:46 schrieb Timo Sirainen:
> > On Tue, 2009-05-19 at 11:07 +0200, Anna Obertacke wrote:
> >> May 19 10:00:38 ubuntu dovecot: POP3(annalein):
> >> mkdir(/home/annalein/Maildir/cur) failed: Permission denied
> >> (euid=1000(annalein) egid=1000(annalein) missing +w perm: /home/
> >> annalein)
> >
> > It says /home/annalein isn't writable by annalein user. I'd
> > guess /home/annalein is no longer owned by annalein?
> >
> that is not the problem
> drwxr-x--x 20 annalein  annalein  12288 2009-05-18 19:05  
> annalein
> /home/annalein is writable by annalein.

Maybe it complains about the group not having  write access...?
Try chmod 771 instead of 751 to test maybe...

JD


  



[Dovecot] per user quota in mysql

2013-06-07 Thread John Doe
Hello everybody,

I have set up dovecot to use ldap authentication and it works great.
I wonder if it is possible to use mysql for user quota and still keep my
ldap authentication.

Thank you!


Re: [Dovecot] per user quota in mysql

2013-06-10 Thread John Doe
Hi,
Thank you for responding but i have read in the dovecot documentation and
in postfixadmin documentation that:

 - The setup gets userdb and passdb info from MySQL as well as quotas (
postfixadmin documentation )
-  Quota backend specifies the method how Dovecot keeps track of the
current quota usage. They don't (usually) specify users' quota limits,
that's done by returning extra fields from userdb (
http://wiki2.dovecot.org/Quota )

My question is that if i can keep per user quota limits in a mysql database
and user ldap database for authentication.
I can't see anywhere in the docs if i can return user and password data
from ldap and per user quota from mysql, if i am mistaken, please give me
the link.

Thank you!


On Sun, Jun 9, 2013 at 7:22 AM, Benny Pedersen  wrote:

> John Doe skrev den 2013-06-07 15:32:
>
>
>  I have set up dovecot to use ldap authentication and it works great.
>> I wonder if it is possible to use mysql for user quota and still keep my
>> ldap authentication.
>>
>
> yes no problem, for more help check postfixadmin on sf.net, even if you
> dont use it, there is good examples on configure it with dovecot quotas
>
> --
> senders that put my email into body content will deliver it to my own
> trashcan, so if you like to get reply, dont do it
>


Force a user to use POP3

2018-07-17 Thread John Doe Vecot

[dovecot-2.3.2.1]

I have dovecotrunning icw postfixandhave IMAP and POP3 available to 
retrieve mail.
Can you tell me how I can configure Dovecot in order to force certain 
users to use POP3 (download messages) only?


Thanks,
Jos




auth: Warning: Event 0x1280fe20 leaked

2019-07-16 Thread John Doe Vecot via dovecot

Lately I get some errors in my logfile, saying:

dovecot[72337]: auth: Warning: Event 0x1280fe20 leaked (parent=0x0): 
auth-client-connection.c:338: 1 Time(s)

Can you tell me what is going wrong here? Thanks.