pass a block of parameters to doveadm

2020-05-21 Thread dovecot-user

Hello everyone.
Please tell me how to override the configuration file options when using 
the doveadm utility with the -o switch in case I need to pass a block of 
parameters, for example, like this:

passdb {
   args = scheme=PLAIN username_format=%u /path/to/file
   driver = passwd-file
}

Thanks.


doveadm backup, question

2020-05-19 Thread dovecot-user

Hello everyone.
I am an inexperienced user of dovecot and I faced probably a simple 
problem, but I still do not understand how to solve it.
The issue is related to using doveadm backup - I want to backup 
mailboxes; make this copy on the same machine (hereinafter, files with 
backup copies will be taken from this machine into the storage by a 
separate mechanism, this is not related to the issue).

I am using dovecot 2.2.27 (c0f36b0) on Debian GNU/Linux 9 (stretch).
The options related to storing mail and attachments are as follows:
mail_location = mdbox:/var/mail/%d/%n
mail_attachment_dir = /var/mail/%d/%n/attach
Thus, the mail of u...@domain.tld is stored in 
/var/mail/domain.tld/user/, and mail attachments inside this directory, 
for example: /var/mail/domain.tld/user/attach.

When I start copying (as root while in test mode):
#doveadm backup -u "u...@domain.tld" sdbox:/backup/domain.tld/user, 
copying passes, but, as I understand it, the attachments are not copied 
(I am judging so far by the volume of the initial storage and the 
received one, it should not differ VERY much, but it differs by 10 
times, it seems that it’s just the total amount of attachments).
Tell me, plz, how to run doveadm backup correctly so that everything is 
copied so that you can subsequently deploy it from the backup?

Thanks.


sieve, pigeonhole; reject message

2018-06-08 Thread dovecot-user

Hello everybody.
I use the version of dovecot 2.3.0.1 and postfix 3.3.0 on my test 
computer. Postfix pass incoming messages to Dovecot via the LMTP protocol.

I want to understand how to fine tune the "reject" action in sieve-scripts.
The task: in my installation I use the translation of a set of aliases 
into the (hidden) target email address inside postfix (postfix 
directives: canonical_classes = envelope_recipient; canonical_maps = 
hash://etc/postfix/canonical), so in dovecot the mails fall into one 
mailbox; However, the original headers (for example, the alias of the 
recipient) can be extracted with sieve scripts (the "Received" header). 
In my case, when I use the "reject" action in the sieve script, dovecot 
generates a message to the sender with the text: "Your message to 
 was automatically rejected ..", but this behavior 
opens the address to the sender of what is hidden behind the alias.
Is it possible to redefine the text of the reject message using the 
extracting values ​​from the "Received" header so that the email address 
hidden behind the alias does not appear there?

Or some other way to customize the reject-message?

Thank you.


[Dovecot] Authentication failed (migrate from 2.0.13 to 2.0.17)

2012-07-02 Thread Dovecot user
 

Hi, 

I use OpenBSD 5.1, roundcube 0.7.2 and dovecot 2.0.17
(684381041dc4+), mysql.

I get the following error when i try to connect
to imap : 

roundcube: IMAP Error: Login failed for test...@mydomain.net
from 192.168.0.92. AUTHENTICATE PLAIN: Authentication failed. in
/var/www/webmail/roundcubemail-0.7.2/program/include/rcube_imap.php on
line 205 (POST /webmail/?_task=login_action=login) 

dovecot:
imap-login: Aborted login (auth failed, 1 attempts): user=,
method=CRAM-MD5, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 2 15:19:13 mx
dovecot: auth-worker: mysql(localhost): Connected to database mail
Jul 2
15:19:15 mx dovecot: imap-login: Aborted login (auth failed, 1
attempts): user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured


Can you help me please ? 

Here my config files :


*dovecot-sql.conf
driver = mysql
connect = host=localhost dbname=mail
user=postfix password=postfix
default_pass_scheme = PLAIN
password_query
= SELECT email as user, password FROM users WHERE email =
'%u'
user_query = SELECT id as uid, id as gid, home,
concat('*:storage=', quota, 'M') AS quota_rule FROM users WHERE email =
'%u' 

*dovecot.conf
#i use this on OpenBSD 5.0 and dovecot 2.0.13,
works, but it doesn't seem to work with this version :-(
# 2.0.13:
/etc/dovecot/dovecot.conf
# OS: OpenBSD 5.0 i386 ffs
auth_mechanisms =
plain login digest-md5 cram-md5 apop
auth_debug=yes
base_dir =
/var/dovecot/
first_valid_uid = 1000
mail_location =
maildir:/var/mailserv/mail/%d/%n
mmap_disable = yes
passdb {
 args =
/etc/dovecot-sql.conf
 driver = sql
}
plugin {
 antispam_mail_notspam =
--ham
 antispam_mail_sendmail = /usr/local/bin/sa-learn

antispam_mail_sendmail_args = --username=%u
 antispam_mail_spam =
--spam
 antispam_mail_tmpdir = /tmp
 antispam_signature = X-Spam-Flag

antispam_signature_missing = move
 antispam_spam =
SPAM;Spam;spam;Junk;junk
 antispam_trash = trash;Trash;Deleted Items;
Deleted Messages
 autocreate = Trash
 autocreate2 = Spam
 autocreate3 =
Sent
 autocreate4 = Drafts
 autosubscribe = Trash
 autosubscribe2 =
Spam
 autosubscribe3 = Sent
 autosubscribe4 = Drafts
 quota = maildir

quota_rule = *:storage=5G
 quota_rule2 = Trash:storage=+100M

quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95

quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
 sieve
= ~/.dovecot.sieve
 sieve_dir = ~/sieve
}
protocols = imap sieve
pop3
service auth {
 unix_listener /var/run/dovecot-auth-master {
 group
= _dovecot
 mode = 0666
 user = _dovecot
 }

 unix_listener
/var/spool/postfix/private/auth {
 group = _postfix
 mode = 0660
 user =
_postfix
 }

}

service imap-login {
 service_count = 0
 #user =
_dovecot
 vsz_limit = 64 M
}
service pop3-login {
 service_count = 0

#user = _dovecot
 vsz_limit = 64 M
}
ssl_cert =ssl_cipher_list =
HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
ssl_key =
userdb {
 args =
/etc/dovecot-sql.conf
 driver = sql
}

#userdb {
# driver =
passwd
#}

protocol imap {
 imap_client_workarounds = delay-newmail

mail_plugins = quota imap_quota autocreate
}
protocol pop3 {

mail_plugins = quota
 pop3_client_workarounds = outlook-no-nuls
oe-ns-eoh
 pop3_uidl_format = %08Xv%08Xu
}
protocol lda {

auth_socket_path = /var/run/dovecot-auth-master
 mail_plugins =
$mail_plugins sieve
 postmaster_address = postmas...@mx.itdebug.net

sendmail_path = /usr/sbin/sendmail
}

default_login_user =
_dovenull
default_internal_user = _dovecot

##
## ManageSieve specific
settings
##

# Service definitions
service managesieve-login {

inet_listener sieve {
 port = 4190
 }

 inet_listener sieve_deprecated
{
 port = 2000
 }
}

service managesieve {
 #Max. number of ManageSieve
processes (connections)
 #process_count = 1024
}

# Service
configuration
protocol sieve {
}

Thank you very much. 

--
Wesley

 

Re: [Dovecot] Authentication failed (migrate from 2.0.13 to 2.0.17)

2012-07-02 Thread Dovecot user
 

There's no way to troubleshoot this error ? 

I use the same config
file for dovecot 2.0.13, all works.
Perhaps in 2.0.17, something is
missing in my config file, or there's new keyword... ?? 

'dovecot -n'
give me :
auth_mechanisms = plain login digest-md5 cram-md5
apop
base_dir = /var/dovecot/
first_valid_uid = 1000
mail_location =
maildir:/var/mailserv/mail/%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 ihave
mmap_disable = yes
passdb {
 args =
/etc/dovecot-sql.conf
 driver = sql
}
plugin {
 antispam_mail_notspam =
--ham
 antispam_mail_sendmail = /usr/local/bin/sa-learn

antispam_mail_sendmail_args = --username=%u
 antispam_mail_spam =
--spam
 antispam_mail_tmpdir = /tmp
 antispam_signature = X-Spam-Flag

antispam_signature_missing = move
 antispam_spam =
SPAM;Spam;spam;Junk;junk
 antispam_trash = trash;Trash;Deleted Items;
Deleted Messages
 autocreate = Trash
 autocreate2 = Spam
 autocreate3 =
Sent
 autocreate4 = Drafts
 autosubscribe = Trash
 autosubscribe2 =
Spam
 autosubscribe3 = Sent
 autosubscribe4 = Drafts
 quota = maildir

quota_rule = *:storage=5G
 quota_rule2 = Trash:storage=+100M

quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95

quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
 sieve
= ~/.dovecot.sieve
 sieve_dir = ~/sieve
}
protocols = imap sieve
pop3
service auth {
 unix_listener /var/run/dovecot-auth-master {
 group
= _dovecot
 mode = 0666
 user = _dovecot
 }
 unix_listener
/var/spool/postfix/private/auth {
 group = _postfix
 mode = 0660
 user =
_postfix
 }
}
service imap-login {
 service_count = 0
 vsz_limit = 64
M
}
service managesieve-login {
 inet_listener sieve {
 port = 4190
 }

inet_listener sieve_deprecated {
 port = 2000
 }
}
service pop3-login {

service_count = 0
 vsz_limit = 64 M
}
ssl_cert =
/etc/ssl/server.crt
ssl_cipher_list =
HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
ssl_key =
/etc/ssl/private/server.key
userdb {
 args = /etc/dovecot-sql.conf

driver = sql
}
protocol imap {
 imap_client_workarounds = delay-newmail

mail_plugins = quota imap_quota autocreate
}
protocol pop3 {

mail_plugins = quota
 pop3_client_workarounds = outlook-no-nuls
oe-ns-eoh
 pop3_uidl_format = %08Xv%08Xu
}
protocol lda {

auth_socket_path = /var/run/dovecot-auth-master
 mail_plugins = 
sieve
 postmaster_address = i...@obrazec.cz
 sendmail_path =
/usr/sbin/sendmail
} 

any idea ?
Thank you very much. 

--

On
03.07.2012 01:55, Timo Sirainen wrote: 

 On 2.7.2012, at 16.51,
Dovecot user wrote:
 
 imap-login: Aborted login (auth failed, 1
attempts): user=, method=CRAM-MD5, rip=127.0.0.1, lip=127.0.0.1, TLS Jul
2 15:19:13 mx dovecot: auth-worker: mysql(localhost): Connected to
database mail Jul 2 15:19:15 mx dovecot: imap-login: Aborted login (auth
failed, 1 attempts): user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1,
secured Can you help me please ?
 
 Isn't there anything more in the
logs? It should at the very least say password mismatch.. CRAM-MD5
authentication is a bit annoying to debug though. But I haven't touched
its code for a long time, so it shouldn't have gotten broken.

 

Re: [Dovecot] Authentication failed (migrate from 2.0.13 to 2.0.17)

2012-07-02 Thread Dovecot user
 

I tried to do the same 'dovecot -n' (dovecot 2.0.13, same config
file) :
# 2.0.13: /etc/dovecot/dovecot.conf
# OS: OpenBSD 5.0 i386
ffs
auth_mechanisms = plain login digest-md5 cram-md5 apop
base_dir =
/var/dovecot/
default_internal_user = _dovecot
default_login_user =
_dovenull
first_valid_uid = 1000
mail_location =
maildir:/var/mailserv/mail/%d/%n 

With dovecot 2.0.17 :

# 2.0.17
(684381041dc4+): /etc/dovecot/dovecot.conf
# OS: OpenBSD 5.1 i386
ffs
auth_mechanisms = plain login digest-md5 cram-md5 apop
base_dir =
/var/dovecot/
first_valid_uid = 1000
mail_location =
maildir:/var/mailserv/mail/%d/%n

Is it normal that there are no lines :
default_internal_user = _dovecot  default_login_user = _dovenull
??

I will try auth_debug_passwords=yes, keep you informed.

Again,
thank you very much.

--
Wesley

On 03.07.2012 08:54, Timo Sirainen
wrote: 

 On 3.7.2012, at 7.37, Dovecot user wrote:
 
 There's no
way to troubleshoot this error ?
 
 Set auth_debug_passwords=yes and
show all of the log entries from a failed login. Preferably use a test
password so it won't be exposed. :)
 
 I use the same config file for
dovecot 2.0.13, all works. Perhaps in 2.0.17, something is missing in my
config file, or there's new keyword... ??
 
 No, the configuration is
identical between those version. The CRAM-MD5 code is also identical
between those versions. I guess there could be some other seemingly
unrelated change that might have broken it for some reason.

 

Re: [Dovecot] Authentication failed (migrate from 2.0.13 to 2.0.17)

2012-07-02 Thread Dovecot user
 

i just get this error :
dovecot: imap-login: Aborted login (auth
failed, 1 attempts): method=DIGEST-MD5, rip=127.0.0.1, lip=127.0.0.1,
secured
root@mx:/var/log # date 

IMAP Error: Login failed for
test...@mydomain.net from 192.168.0.92. Authentication failed. in
/var/www/webmail/roundcubemail-0.7.2/program/include/rcube_imap.php on
line 205 (POST /webmail/?_task=login_action=login)

On 03.07.2012
09:20, Timo Sirainen wrote: 

 On 3.7.2012, at 8.00, Dovecot user
wrote:
 
 I tried to do the same 'dovecot -n' (dovecot 2.0.13, same
config file) :
 
 Oh, are you saying that the difference isn't just
the Dovecot version, but that they are completely different systems with
(somewhat) different settings also? That's much more likely the problem
than the version number.
 
 Is it normal that there are no lines :
default_internal_user = _dovecot  default_login_user = _dovenull


 Normal enough. It's then using the Dovecot's defaults which are
dovecot and dovenull.

 

Re: [Dovecot] Panic when attempting index with Apache Solr : fts_solr plugin

2011-12-12 Thread A Dovecot User
Over the weekend I updated the OS on the machine in question to Fedora
15, which should have updated libcurl in the process, and I'm still
getting the same error message. I also moved Solr to another server
instead of trying to use it on the local box, but that didn't seem to
make a difference.


On 12/07/2011 11:22 PM, Timo Sirainen wrote:
 On Fri, 2011-12-02 at 12:47 -0600, A Dovecot User wrote:
 [root@mymailserver ~]# doveadm -D index -u username mailbox inbox
 The mailbox isn't necessary above.

 doveadm(username): Info: INBOX: Caching mails seq=1..466
 doveadm(username): Panic: file solr-connection.c: line 545
 (solr_connection_post_more): assertion failed: (maxfd = 0)
 This happens every time? It can't index any mails at all? Have you tried
 with Dovecot v2.0?

 I can't reproduce it. Anyway I guess either I'm using libcurl wrong
 somehow, or there's a bug in libcurl..




Re: [Dovecot] Panic when attempting index with Apache Solr : fts_solr plugin

2011-12-08 Thread A Dovecot User
It happens every time. Also, I just recompiled for version 2.0.16 and it
gives me the same error (pasted below). I'll be updating the OS on this
machine soon, which will update libcurl as well.

Panic: file solr-connection.c: line 501 (solr_connection_post_more):
assertion failed: (maxfd = 0)
Error: Raw backtrace: /usr/local/lib/dovecot/libdovecot.so.0(+0x3aa41)
[0xbd5a41] -
/usr/local/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x47)
[0xbd5b57] - /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) [0xbab8de]
-
/usr/local/lib/dovecot/lib21_fts_solr_plugin.so(solr_connection_post_more+0x293)
[0x191d53] - /usr/local/lib/dovecot/lib21_fts_solr_plugin.so(+0x2723)
[0x18f723] -
/usr/local/lib/dovecot/lib20_fts_plugin.so(fts_backend_build_more+0x1f)
[0x45d2ff] - /usr/local/lib/dovecot/lib20_fts_plugin.so(+0x5515)
[0x460515] - /usr/local/lib/dovecot/lib20_fts_plugin.so(+0x5928)
[0x460928] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_deinit+0x3a)
[0xf3d03a] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x55)
[0xf3d0f5] - doveadm() [0x805184d] - doveadm() [0x804ef55] -
doveadm(doveadm_mail_single_user+0x5b) [0x804f3ab] - doveadm() [0x804f813]
- doveadm(doveadm_mail_try_run+0x12e) [0x804fc6e] - doveadm(main+0x3a4)
[0x8055b64] - /lib/libc.so.6(__libc_start_main+0xe6) [0x729e36] -
doveadm() [0x804ed61]


On Thu, 08 Dec 2011 07:22:22 +0200, Timo Sirainen t...@iki.fi wrote:
 On Fri, 2011-12-02 at 12:47 -0600, A Dovecot User wrote:
 [root@mymailserver ~]# doveadm -D index -u username mailbox inbox
 
 The mailbox isn't necessary above.
 
 doveadm(username): Info: INBOX: Caching mails seq=1..466
 doveadm(username): Panic: file solr-connection.c: line 545
 (solr_connection_post_more): assertion failed: (maxfd = 0)
 
 This happens every time? It can't index any mails at all? Have you tried
 with Dovecot v2.0?
 
 I can't reproduce it. Anyway I guess either I'm using libcurl wrong
 somehow, or there's a bug in libcurl..


[Dovecot] Panic when attempting index with Apache Solr : fts_solr plugin

2011-12-03 Thread A Dovecot User
Dovecot version: 2.1.rc1
Expat version: expat-2.0.1-10
Libcurl version: libcurl-7.21.0-10
OS: Fedora 14 i686

Configure command: ./configure --with-solr

Solr version: 1.4.1 (also tried 3.5.0)
Java version: java-1.6.0-openjdk-1.6.0.0-55.1.9.10 (also tried Oracle
Java 6u29)

[root@mymailserver ~]# doveadm -D index -u username mailbox inbox

doveadm(username): Info: INBOX: Caching mails seq=1..466
doveadm(username): Panic: file solr-connection.c: line 545
(solr_connection_post_more): assertion failed: (maxfd = 0)
doveadm(username): Error: Raw backtrace:
/usr/local/lib/dovecot/libdovecot.so.0(+0x3b9b1) [0x14b9b1] -
/usr/local/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x47)
[0x14bac7] - /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x1211ae] -
/usr/local/lib/dovecot/lib21_fts_solr_plugin.so(solr_connection_post_more+0x293)
[0xb1a7d3] - /usr/local/lib/dovecot/lib21_fts_solr_plugin.so(+0x2599)
[0xb16599] -
/usr/local/lib/dovecot/lib20_fts_plugin.so(fts_backend_update_build_more+0x31)
[0x2273f1] -
/usr/local/lib/dovecot/lib20_fts_plugin.so(fts_build_mail+0x3b2)
[0x228272] - /usr/local/lib/dovecot/lib20_fts_plugin.so(+0xa74e)
[0x22d74e] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(mail_precache+0xf)
[0x937a6f] - doveadm() [0x80520b6] - doveadm() [0x804f4b5] -
doveadm(doveadm_mail_single_user+0x5b) [0x804f8db] - doveadm()
[0x804fd3f] - doveadm(doveadm_mail_try_run+0x12e) [0x805019e] -
doveadm(main+0x3a4) [0x8056444] -
/lib/libc.so.6(__libc_start_main+0xe6) [0x729e36] - doveadm() [0x804f2c1]

--
mail_plugins = acl antispam fts fts_solr

plugin {
  fts = solr
  fts_solr = break-imap-search debug url=http://127.0.0.1:8983/solr/
}