Re: user password in mail-filter plugin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 4 Feb 2016, Thomas Möhle wrote: not sure, if %{userdb:pass} isn't read correctly, or if "override_fields = userdb_pass=%w" doesn't set it right. did you tried some alternate spelling? %{userdb_pass} %{userdb:userdb_pass} %{userdb_userdb_pass} something like this. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBVrRIOnz1H7kL/d9rAQKAvQf/dwBF4XdgnBzouPAv3xArENgYo8SZefBO Hmn00/eL8ZAJn4ZvLmZUgCgqidNfDQFbnTBSj3PIsQQNFweLUhmlRDwsWca9WKpc uHzuOAnbmGs3EXT+oQK1A3y+gUGkkwtBeCgIjw2IABg8j1GRdz2oXE+sI9xlkjPA AFqMwBNX2k5aeJ91kdTWHihsIlB8YCbsxPTUjl9/GlpzIPkA4DSkg/o0Husnql4+ U4KOBiB3oEooK3YwDuXxnr9Uo7rDC+2Vj1UgHu5UzHq2ZtHeDOsL9kpj8tqPBHmi 9rk92hLwzDr7F/dWTibL5FvPXvC3+yX6UzQShpKYUBPtfLzsjfT8PA== =4F04 -END PGP SIGNATURE-
Re: user password in mail-filter plugin
Am 04.02.2016 um 20:54 schrieb Timo Sirainen: > On 04 Feb 2016, at 19:41, Thomas Möhle wrote: >> >> Am 04.02.2016 um 17:43 schrieb Timo Sirainen: >>> On 04 Feb 2016, at 03:44, Thomas Möhle wrote: Hello, I would like to use the users password within a mail-filter script. Dovecots %w variable is only available within dovecot-auth, is there any way to access the password for a mail-filter? >>> >>> Something like this should work in recent versions: >>> >>> passdb { >>> .. >>> override_fields = userdb_pass=%w >>> } >>> >>> plugin { >>> mail_filter = mail-filter %{userdb:pass} >>> } >>> >> >> Thanks for that idea, unfortunately %{ seems to be misinterpreted and >> the mail-filter script recieves the rest of the string "userdb:pass}" as >> a parameter, instead of the password. > > Do you have v2.2.19 or newer? That's required for %{userdb:*} to work. > Without that you'd need to override the whole mail_filter in your > passdb/userdb. I had v2.2.18 (Ubuntu 15.10) installed, so I updated to v2.2.21 now. >> So, do I get this right? During login the content of dovecots %w >> variable is supposed to be stored in a userdb field, called userdb_pass, >> and the %{x} is supposed to get the content of that field? > > Mostly, yes. You need the "pass" field to be in userdb to access it in mail > processes. The password is only available in passdb though, so you need to > store it with userdb_ prefix to get it saved into userdb extra fields instead > of passdb extra fields. > Unfortunately it still doesn't work. The filter-script does not recieve any data from that variable. I tried replacing the %w with %u, to see, if the filter-script would at least recieve the username then, but that doesn't work, either. So I'm not sure, if %{userdb:pass} isn't read correctly, or if "override_fields = userdb_pass=%w" doesn't set it right.
Re: user password in mail-filter plugin
On 04 Feb 2016, at 19:41, Thomas Möhle wrote: > > Am 04.02.2016 um 17:43 schrieb Timo Sirainen: >> On 04 Feb 2016, at 03:44, Thomas Möhle wrote: >>> >>> Hello, >>> >>> I would like to use the users password within a mail-filter script. >>> Dovecots %w variable is only available within dovecot-auth, is there any >>> way to access the password for a mail-filter? >> >> Something like this should work in recent versions: >> >> passdb { >> .. >> override_fields = userdb_pass=%w >> } >> >> plugin { >> mail_filter = mail-filter %{userdb:pass} >> } >> > > Thanks for that idea, unfortunately %{ seems to be misinterpreted and > the mail-filter script recieves the rest of the string "userdb:pass}" as > a parameter, instead of the password. Do you have v2.2.19 or newer? That's required for %{userdb:*} to work. Without that you'd need to override the whole mail_filter in your passdb/userdb. > So, do I get this right? During login the content of dovecots %w > variable is supposed to be stored in a userdb field, called userdb_pass, > and the %{x} is supposed to get the content of that field? Mostly, yes. You need the "pass" field to be in userdb to access it in mail processes. The password is only available in passdb though, so you need to store it with userdb_ prefix to get it saved into userdb extra fields instead of passdb extra fields.
Re: doveadm backup -- private flags in shared mailbox
> On 04 Feb 2016, at 11:26, almut bertha wrote: > > dear list, > i try to backup our dovecot server via > > doveadm -Dv backup -A -n inbox -n shared remote:vmail@192.168.122.51 > > So far, it's working fine except for one thing: the "seen"flags for the > shared mailboxes don't get copied to the backup-server. I tried a few > things > (like calling the doveadm command with different options for the > namespaces or defining the mailboxes -m; i also changed the path for > INDEXPVT), > but none of these worked and i don't know how to tell doveadm to sync > these flags. > Maybe the config for the namespaces is wrong? > > Or is it just not possible (yet)? Try adding -f parameter? It's probably skipping those folders because it thinks they're already synced. You anyway need to sync each shared folder as each user, but I think that command would be doing it.
Re: user password in mail-filter plugin
Am 04.02.2016 um 17:43 schrieb Timo Sirainen: > On 04 Feb 2016, at 03:44, Thomas Möhle wrote: >> >> Hello, >> >> I would like to use the users password within a mail-filter script. >> Dovecots %w variable is only available within dovecot-auth, is there any >> way to access the password for a mail-filter? > > Something like this should work in recent versions: > > passdb { > .. > override_fields = userdb_pass=%w > } > > plugin { > mail_filter = mail-filter %{userdb:pass} > } > Thanks for that idea, unfortunately %{ seems to be misinterpreted and the mail-filter script recieves the rest of the string "userdb:pass}" as a parameter, instead of the password. So, do I get this right? During login the content of dovecots %w variable is supposed to be stored in a userdb field, called userdb_pass, and the %{x} is supposed to get the content of that field?
"mail_shared_explicit_inbox = no", but shared INBOX has a "\Noselect" tag?
Regarding the given information, it seems to me that the option "mail_shared_explicit_inbox=no" does not work as expected. Quote from NEWS-2.2: mail_shared_explicit_inbox setting to specify if a shared INBOX should be accessible as "shared/$user" or "shared/$user/INBOX" Using Dovecot 2.2.13 and Maildir++ Working on the commandline: # doveconf mail_shared_explicit_inbox mail_shared_explicit_inbox = no # service dovecot restart # ls -lda /mail/reader/Shared/ow...@example.com/.* Shows no (hidden) folders. # telnet 127.0.0.1 143 a0 login rea...@example.com *** a1 list "" "Shared/ow...@example.com" * LIST (\Noselect \HasChildren) "/" Shared/ow...@example.com a1 OK List completed. Is the retrieved "\Noselect" tag correct with the option "mail_shared_explicit_inbox = no"? I would expect the folder "Shared/ow...@example.com" to be "selectable", because I thought the option "mail_shared_explicit_inbox = no" would make e-mails of a shared INBOX visible directly at the folder "Shared/ow...@example.com" (which does not work in my case). Note: Shared *sub*folders of an INBOX work as expected. Just to show that the shared INBOX is accessible (note that it is not shown by a list "" "*" here, which is expected with that option): a2 list "" "Shared/ow...@example.com/INBOX" a2 OK List completed. a3 select Shared/ow...@example.com/INBOX * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. * 27 EXISTS Using "mail_shared_explicit_inbox = yes" does show the INBOX as a subfolder of "Shared/ow...@example.com" and allows accessing the e-mails of the shared INBOX. However, it would be nice (and keep users happy at using their known shared folder layout) to see the e-mails of the shared INBOX at the Shared/ow...@example.com folder. Best Regards, R.Koerner output of (removed irrelevant things like auth,pop,passdb,userdb,ssl,debug) # dovecot -n # 2.2.13: /etc/dovecot/dovecot.conf mail_location = maildir:~/Maildir mail_log_prefix = "%Us(%u): " mail_plugins = acl listescape namespace { hidden = no ignore_on_failure = no inbox = no list = children location = maildir:%%h/Maildir:INDEX=%h/Shared/%%u:CONTROL=%h/Shared/%%u:INDEXPVT=%h/Shared/%%u prefix = Shared/%%u/ separator = / subscriptions = yes type = shared } 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 = INBOX/ separator = / subscriptions = yes type = private } plugin { acl = vfile acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes.db mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename } protocols = imap lmtp protocol imap { mail_plugins = acl listescape imap_acl }
Re: user password in mail-filter plugin
On 04 Feb 2016, at 03:44, Thomas Möhle wrote: > > Hello, > > I would like to use the users password within a mail-filter script. > Dovecots %w variable is only available within dovecot-auth, is there any > way to access the password for a mail-filter? Something like this should work in recent versions: passdb { .. override_fields = userdb_pass=%w } plugin { mail_filter = mail-filter %{userdb:pass} }
Re: R: Re: Mail User Agent?
absolutely_free: the info but, in my logs, there's no single ID info. Do i need to enable logging of it or something? imap_id_log = * I guess you simply have clients which don't care about the offered ID extension. A recent Thunderbird should make you happy :-) Andreas
R: Re: Mail User Agent?
>Messaggio originale >Da: Timo Sirainen >Data: 02/02/2016 23.27 >A: >Cc: >Ogg: Re: Mail User Agent? > >On 02 Feb 2016, at 22:00, azu...@pobox.sk wrote: >> >> Thank you for info. Well, i understand that clients are not forced to send the info but, in my logs, there's no single ID info. Do i need to enable logging of it or something? > >imap_id_log = * > Thank you very much!
doveadm backup -- private flags in shared mailbox
dear list, i try to backup our dovecot server via doveadm -Dv backup -A -n inbox -n shared remote:vmail@192.168.122.51 So far, it's working fine except for one thing: the "seen"flags for the shared mailboxes don't get copied to the backup-server. I tried a few things (like calling the doveadm command with different options for the namespaces or defining the mailboxes -m; i also changed the path for INDEXPVT), but none of these worked and i don't know how to tell doveadm to sync these flags. Maybe the config for the namespaces is wrong? Or is it just not possible (yet)? thanks in advance The configs for the source and the backup server are the same: (except for hostname, ip,...) # 2.2.18: /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.8 (0c4ae064f307+) # OS: Linux 4.3.0-1-amd64 x86_64 Debian stretch/sid ext4 auth_verbose = yes default_client_limit = 2500 default_process_limit = 500 disable_plaintext_auth = no doveadm_port = 1 lmtp_rcpt_check_quota = yes lmtp_save_to_detail_mailbox = yes mail_location = maildir:/srv/vmail/%n/Maildir mail_plugins = " acl quota" 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 imapflags notify namespace { hidden = no inbox = no list = children location = maildir:/srv/vmail/%%n/Maildir:INDEXPVT=/srv/vmail/%n/shared/%%n prefix = shared.%%n. separator = . subscriptions = no type = shared } namespace inbox { hidden = no ignore_on_failure = no inbox = yes list = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = INBOX. separator = . subscriptions = yes type = private } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { acl = vfile:/etc/dovecot/global-acls:cache_secs=300 acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes.db mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename quota = maildir:User quota:noenforcing quota_grace = 2%% quota_rule = *:storage=3G sieve = /srv/vmail/%Ln/default.sieve sieve_default = /srv/vmail/default.sieve sieve_dir = /srv/vmail/%Ln/sieve sieve_extensions = +notify +imapflags sieve_global_dir = /srv/vmail/global.sieve/ } postmaster_address = postmas...@mur.at protocols = " imap lmtp sieve pop3" quota_full_tempfail = yes service auth { unix_listener auth-userdb { group = vmail mode = 0777 user = vmail } } service lmtp { inet_listener lmtp { address = 192.168.122.52 port = 24 } user = vmail } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } process_min_avail = 1 service_count = 1 vsz_limit = 64 M } service managesieve { process_limit = 256 } userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } userdb { args = /etc/dovecot/dovecot-ldap-group-userdb.conf.ext driver = ldap } protocol lmtp { mail_plugins = " acl quota sieve" } protocol imap { mail_max_userip_connections = 16 mail_plugins = " acl quota imap_acl imap_quota" } protocol sieve { managesieve_implementation_string = Dovecot Pigeonhole } protocol pop3 { mail_plugins = " acl quota" }