Let lmtp create target directories
Hello, we're using vmm¹ to manage our postfix+dovecot virtual mail setup, which allows us to give every virtual user a separate EUID and every domain a separate EGID for additional security (vs. handling all virtual mail with a single "vmail" user). As a consequence, however, vmm must itself create the user directories with the appropriate owners, and to do so, it requires root rights. I am trying to investigate getting rid of this need³. Since Dovecot quite happily creates ~/Maildir when necessary, couldn't it also create parents? The home directory should be trivial (same EUID/EGID), but grandparents etc. might need a different policy (e.g. 0/EGID for the grandparent, 0/0 for great-grandparents, etc.). Is this something that could fall within the realm of Dovecot's lmtp? Or is the lmtp invoked as the user and doesn't actually drop root? If so, might there be another way? ¹) http://vmm.localdomain.org/² ²) Hallo Pascal ³) http://bugs.debian.org/804382 Thanks, -- @martinkrafft | http://madduck.net/ | http://two.sentenc.es/ "perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- antoine de saint-exupéry spamtraps: madduck.bo...@madduck.net digital_signature_gpg.asc Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
Re: sieve is working/forwarding mail - but not for all users - SOLVED
Thanks all, found a config file with the adjusted sieve_max_redirects which was saved during an update. Regards . Götz Am 25.11.15 um 15:32 schrieb Urban Loesch: > Hi, > > to how many addresses do you redirect the incoming mails? > Could it be that you hit the "sieve_max_redirects = n" configuration > parameter? > > Regards > Urban > > Am 25.11.2015 um 15:05 schrieb Götz Reinicke - IT Koordinator: >> Hi, >> >> we have dovecot-ee-2.2.18.2 and pigeonhole/managesieve 0.4.8 running for >> some time. >> >> Today some users informed us that they did not get mails from one >> project account forwarded to there personal accounts any more. >> >> This worked till one week ago and I cant think of any changes we made... >> >> The project account keeps a copy of received mails. >> >> I tried two different accounts to configure forwarding to internal and >> external mail addresses which is working. >> >> Question: Any hint or idea? How may I debug sieve forwarding? >> >> Thanks and regards . Götz >> smime.p7s Description: S/MIME Cryptographic Signature
LZ4 mailbox corruption
Hello, When I look at email files on my server (mdbox format), they contain random LZ4 stuff. I have now changed the compression to gzip and new mails look cleaner. But older ones have problems. A mail file looks like this: 2 M1e C5655b6a8 ^A^BN 06F4 Dovecot-LZ4^M*<9B>^@^A^@^@^@^@^F<83>Return-path:Envelope-to: nikade...@llorien.org Delivery-date: Mon, 22 Nov 2004 09:50:58 +0100 Received: from }^@^G [66.135.39.84] by mail.}^@< with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) id=1CW9uQ-0002gj-El for^@^C^_;^@8(localhost. ^@^Ddomain [127.0.0.1])^@^O^S^A^H<82>(8.12.8/^G^@^R)^@^HESMTP id iAM9gl4l021209^@^_<^@^B^_>^@^A3:42:47 -06^Ac(from -^B^A^@Ohost^@^\<86>/Submit)^@!cd^@N7; 4^B <8C>^@^_DZ^B^D &^@^KMessage-Id: <200411220942.^Y^A^Dq^@^O^B ^BTo: Renaud AllardB^A^E Then, I randomly see errors like this in maillog: truncated lz4 chunk at 555395 Given I am still able to read the mails using imap, I think there might be a way to recover them to a proper format. However, using dsync to make a mirror throws a lot of errors like below. # dsync -v -u recover -o "mail_plugins=zlib" mirror dbox:~/ndbox dsync(recover): Error: lz4.read(//home/vmail/recover/mdbox/storage/m.2): corrupted lz4 chunk at 43551 dsync(recover): Error: write(/home/vmail/recover/ndbox/mailboxes/INBOX/dbox-Mails/.temp.1448464321.P24341Q6M965521.isildur.arnor.org) failed: Invalid argument dsync(recover): Error: copy: i_stream_read(zlib(//home/vmail/recover/mdbox/storage/m.2)) failed: read(//home/vmail/recover/mdbox/storage/m.2) failed: lz4.read(//home/vmail/recover/mdbox/storage/m.2): corrupted lz4 chunk at 43551 dsync(recover): Error: read(zlib(//home/vmail/recover/mdbox/storage/m.2)) failed: read(//home/vmail/recover/mdbox/storage/m.2) failed: lz4.read(//home/vmail/recover/mdbox/storage/m.2): corrupted lz4 chunk at 43551 (uid=42028, box=INBOX) dsync(recover): Error: Mailbox INBOX: read(msg input) failed: read(//home/vmail/recover/mdbox/storage/m.2) failed: lz4.read(//home/vmail/recover/mdbox/storage/m.2): corrupted lz4 chunk at 43551 dsync(recover): Error: read(zlib(//home/vmail/recover/mdbox/storage/m.2)) failed: read(//home/vmail/recover/mdbox/storage/m.2) failed: lz4.read(//home/vmail/recover/mdbox/storage/m.2): corrupted lz4 chunk at 43551 (uid=42028, box=INBOX) dsync(recover): Error: unlink() failed: No such file or directory dsync(recover): Error: unlink(//home/vmail/recover/mdbox/mailboxes/Drafts/dbox-Mails/dovecot.index.log.2) failed: No such file or directory dsync(recover): Error: unlink(Internal error occurred. Refer to server log for more information. [2015-11-25 16:12:01]) failed: No such file or directory dsync(recover): Error: unlink() failed: No such file or directory dsync(recover): Error: unlink() failed: File name too long dsync(recover): Error: unlink(Internal error occurred. Refer to server log for more information. [2015-11-25 16:12:01]) failed: No such file or directory Any help welcome smime.p7s Description: S/MIME Cryptographic Signature
Re: [SPAM: high] imap logging ?
Hi, perhaps this is what you need. http://wiki2.dovecot.org/Plugins/MailLog No "mail_debug enabled" neccessary. Regards Urban Am 26.11.2015 um 07:51 schrieb mancyb...@gmail.com: > Hi I'm trying to log my users imap actions, like when creating a folder, > moving an email or deleting an email. > So I've enabled 'mail_debug' and I'm checking /var/log/dovecot/debug.log > this is what happens when I delete an email: > > Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): query: SELECT > password FROM mailbox WHERE username = 'XXX' and active = 1 and > restrictedAccess = 0 > Nov 26 07:46:38 auth: Debug: client out: OK 1 user=XXX > Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): SELECT > '/var/vmail/XXX/XXX' as home, 5000 AS uid, 5000 AS gid, concat('*:storage=', > quota) AS quota_rule FROM mailbox WHERE username = 'XXX' > Nov 26 07:46:38 auth: Debug: master out: USER 374472705 XXX > home=/var/vmail/XXX/XXX uid=5000gid=5000 > quota_rule=*:storage=524288 > Nov 26 07:46:38 imap(XXX): Debug: Effective uid=5000, gid=5000, > home=/var/vmail/XXX/XXX > Nov 26 07:46:38 imap(XXX): Debug: Quota root: name=User quota backend=maildir > args= > Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=* > bytes=536870912 messages=0 > Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=Trash > bytes=+104857600 messages=0 > Nov 26 07:46:38 imap(XXX): Debug: maildir++: root=/var/vmail/XXX/XXX/Maildir, > index=/var/vmail/XXX/XXX/Maildir/indexes, control=, > inbox=/var/vmail/XXX/XXX/Maildir, alt= > > and when creating a folder, access an email or moving an email, the output is > basically the same: > I'm unable to find the actual IMAP command. > > So, question: is there a way to log IMAP commands to a file ? > > Thank you, > Mike >
imap logging ?
Hi I'm trying to log my users imap actions, like when creating a folder, moving an email or deleting an email. So I've enabled 'mail_debug' and I'm checking /var/log/dovecot/debug.log this is what happens when I delete an email: Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): query: SELECT password FROM mailbox WHERE username = 'XXX' and active = 1 and restrictedAccess = 0 Nov 26 07:46:38 auth: Debug: client out: OK 1 user=XXX Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): SELECT '/var/vmail/XXX/XXX' as home, 5000 AS uid, 5000 AS gid, concat('*:storage=', quota) AS quota_rule FROM mailbox WHERE username = 'XXX' Nov 26 07:46:38 auth: Debug: master out: USER 374472705 XXX home=/var/vmail/XXX/XXX uid=5000gid=5000 quota_rule=*:storage=524288 Nov 26 07:46:38 imap(XXX): Debug: Effective uid=5000, gid=5000, home=/var/vmail/XXX/XXX Nov 26 07:46:38 imap(XXX): Debug: Quota root: name=User quota backend=maildir args= Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=* bytes=536870912 messages=0 Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=Trash bytes=+104857600 messages=0 Nov 26 07:46:38 imap(XXX): Debug: maildir++: root=/var/vmail/XXX/XXX/Maildir, index=/var/vmail/XXX/XXX/Maildir/indexes, control=, inbox=/var/vmail/XXX/XXX/Maildir, alt= and when creating a folder, access an email or moving an email, the output is basically the same: I'm unable to find the actual IMAP command. So, question: is there a way to log IMAP commands to a file ? Thank you, Mike
CentOS rpm dovecot 2.2.10 auth/db-ldap.c TLS bug/patch
Hello, CentOS rpm dovecot 2.2.10 сontains bug auth/db-ldap.c TLS (not connect LDAP+TLS server ldaps://), exist bug/patch https://bugs.centos.org/view.php?id=8267 As far as the correct patch in upstream dovecot quite a lot of changes at this point if there is a correct patch?
sieve is working/forwarding mail - but not for all users
Hi, we have dovecot-ee-2.2.18.2 and pigeonhole/managesieve 0.4.8 running for some time. Today some users informed us that they did not get mails from one project account forwarded to there personal accounts any more. This worked till one week ago and I cant think of any changes we made... The project account keeps a copy of received mails. I tried two different accounts to configure forwarding to internal and external mail addresses which is working. Question: Any hint or idea? How may I debug sieve forwarding? Thanks and regards . Götz smime.p7s Description: S/MIME Cryptographic Signature
Re: sieve is working/forwarding mail - but not for all users
Am 25.11.2015 um 15:05 schrieb Götz Reinicke - IT Koordinator: > Hi, > > we have dovecot-ee-2.2.18.2 and pigeonhole/managesieve 0.4.8 running for > some time. > > Today some users informed us that they did not get mails from one > project account forwarded to there personal accounts any more. > > This worked till one week ago and I cant think of any changes we made... > > The project account keeps a copy of received mails. > > I tried two different accounts to configure forwarding to internal and > external mail addresses which is working. > > Question: Any hint or idea? How may I debug sieve forwarding? > > Thanks and regards . Götz > look at the related rules and logs ( search for sieve ) i.e http://wiki.dovecot.org/LDA/Sieve/Dovecot ... Compile and Runtime Logging Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
Re: sieve is working/forwarding mail - but not for all users
Hi, to how many addresses do you redirect the incoming mails? Could it be that you hit the "sieve_max_redirects = n" configuration parameter? Regards Urban Am 25.11.2015 um 15:05 schrieb Götz Reinicke - IT Koordinator: > Hi, > > we have dovecot-ee-2.2.18.2 and pigeonhole/managesieve 0.4.8 running for > some time. > > Today some users informed us that they did not get mails from one > project account forwarded to there personal accounts any more. > > This worked till one week ago and I cant think of any changes we made... > > The project account keeps a copy of received mails. > > I tried two different accounts to configure forwarding to internal and > external mail addresses which is working. > > Question: Any hint or idea? How may I debug sieve forwarding? > > Thanks and regards . Götz >