Re: Need help deduplicating messages fetched with getmail into dovecot mailbox

2019-01-17 Thread Gabriel Kaufmann
Hello again,

I was able to workaround the getmail issue producing dublettes using
Sieve-Filter to find and discard dublettes. I was using this Rule-Set (I
found somewhere else in Internet). I only have sometimes dublettes now,
but not as worse as before (every mail twice!).

> # Track duplicate Mail-Deliveries
> require ["duplicate", "imap4flags"];
> if duplicate :header "message-id" {
>   discard;
>   stop;
> }
>
> keep;

Best regards

Gabriel Kaufmann



Re: Need help deduplicating messages fetched with getmail into dovecot mailbox

2019-01-11 Thread Gabriel Kaufmann
Hello Joseph,

thanks for your reply.

> doveadm fetch -u my-mail...@domain.net 'guid hdr.message-id' ...
>
> You're on your own for everything else. 

That works and I may be can make it work with that using a shell-script
interacting with getmail as Filter. But indeed it's fetching ALL
message-ids. It would be perfect if I could make search query on 'guid
hdr.message-id' to get only a result (or none) if there is a message
matching the message-id.

I've tried to adopt your suggestion into a doveadm query, but it's not
working.

> doveadm -f table search -u 'my-mail...@domain.net' 'guid
> hdr.Message-ID' '<1546519978.5...@foo.com>'
> Fatal: Unknown argument GUID HDR.MESSAGE-ID
or
> doveadm search -u 'gabriel.kaufm...@gmx.net' 'guid hdr.Message-ID'
> '<1546519978.5...@paypal.com>'
> Fatal: Unknown argument GUID HDR.MESSAGE-ID

Either it's not working at all or I've done something wrong. Do you know
it that is possible?


Usually getmail should already notice which messages have been fetched
and it's creating some kind of simple file-database containing
message-id's already. But for some reason it's not working really good
(there are many complains about that to be find by google). Ending up to
query every 5 minutes over my whole Inbox (using doveadm fetch) will be
a performance killer - I think. Creating my own dedupe-database
additionally to getmail is overhead and I think it would lead into
developing my own 'getmail' or try to extend the existing code myself
(whatever is less time-consuming).

Do you have any idea if it's possible to use doveadm search for single
message-id without having to query over all messages?


Best regards

Gabriel Kaufmann



Need help deduplicating messages fetched with getmail into dovecot mailbox

2019-01-10 Thread Gabriel Kaufmann
Hello everyone,

I'm using getmail to fetch some external mails from POP3 into a dovecot
mailbox (providing IMAP). Getmail seems to have some serious problems
keeping track of mails already fetched. I have every Mail exactly twice
in my Mailbox delivered by Dovecot. Of course they are not in the
original external POP3 Inbox.

I hope I'm in right place here. I think the problem is not dovecot
related, but getmail. As there is a huge number of user complains about
getmail (and obviously no alternative?!) I hope to find some help here
for a workaround.

I noticed getmail can be configured for some kind of filtering to sort
out Mails for local delivery to dovecot.
http://pyropus.ca/software/getmail/configuration.html#filter-examples

Does anyone know how to query the message-id (given by mail-headers)
with doveadm?

My first test was this:

> doveadm fetch -u my-mail...@domain.net "mailbox date.sent" message-id
> "<369408722.286104911.1547114312259.foo.r...@someone.org>"

But then I noticed this is only ment to be used with dovecot internal
GUID - I think... Is it possible to query for the mail message-id also?
Is it posible to reconfigure indexing to include this propery from the
original message-file? I made a small perl-script to extract it using
Perl-Lib Email::Simple.

> To: my-mail...@domain.net
> *Message-ID: <369408722.286104911.1547114312259.foo.r...@someone.org>*
> Subject: Some test

I also already tried the doveadm deduplicate, but this also doesn't work
as it is also basing on the internal GUID of dovecot and every
duplicate-message seems to have a new, unique GUID.

> doveadm deduplicate -u gabriel.kaufm...@gmx.net mailbox-guid

May be anyone know a better solution.

-- 
Best regards

Gabriel Kaufmann



Re: Multiple SSL-Certificates/Domains setup not working | Solved!

2018-02-23 Thread Gabriel Kaufmann

Could you write step by step how you reach the goal?

2018-02-22 15:55 GMT+01:00 Gabriel Kaufmann <maili...@typoworx.com 
<mailto:maili...@typoworx.com>>:


I've tried to create an certbot SAN-Cert with multiple domain-names 
and this worked like a charm using one cert for all! Thanks!



Shure :)

At first you should have a working Certbot of course. Setup for this 
depends on your Server-Setup of course. Certbot requires access due to 
"standalone-http(s)" mode of certbot or access through 
apache/nginx/haproxy (works as well if setup correctly). I'm using each 
of these variants.


Assuming you have a working setup and certbot-services can access your 
certbot service (running as http/s while certbot is running) the SAN 
setup is quit easy:



$> certbot -d domain1.com -d domain2.com -d domain3.com


if running in non-standalone mode (running apache/nginx) you can tell 
Certbot where the auth-tokens are stored to for external domain-approval:



-w /var/www/my-web-root
With the syntax given above the SAN-Cert for all given domains is stored 
in /etc/letsencrypt/live/domain1/


standalone-mode and web-root also can be configured in 
/etc/letsencrypt/cli.ini

(https://community.letsencrypt.org/t/lestencrypt-standalone-cli-ini/43465)

Best regards

Gabriel Kaufmann



Re: Multiple SSL-Certificates/Domains setup not working | Solved!

2018-02-22 Thread Gabriel Kaufmann
I've tried to create an certbot SAN-Cert with multiple domain-names and 
this worked like a charm using one cert for all! Thanks!



Best regards

Gabriel Kaufmann



Multiple SSL-Certificates/Domains setup not working

2018-02-18 Thread Gabriel Kaufmann
I've tried setting up multiple SSL-Certificates (using letsencrypt) for 
dovecot on my ubuntu machine. Used dovecot version is 2.2.18.


Regarding to official docs this should be working.

My test-client (Thunderbird on linux) has been mentioned to be working 
fine with SNI here:

https://wiki.dovecot.org/SSL/SNIClientSupport

https://wiki.dovecot.org/SSL/DovecotConfiguration#line-89


local_name imap.example.org {
   ssl_cert = 

Did anyone have success on this (without using multiple IP per Domain)?

--
Best regards

Gabriel Kaufmann



Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-07 Thread Gabriel Kaufmann
Finally I was able to resolve the issue. I had to do close Thunderbird. 
Delete the misbehaving folders on imap-server Maildir/Trash. Start 
Thunderbird, did "Repair" on Trash folder after that and the files were 
gone!


There's only one waisted "ghost" folder shown for renew subscription 
(grayed out) that does not exist on imap-server. But it's not shown in 
my Trash-Folder anymore! So that's a good success.


I hope deleting folders in future won't make the problem reappear.


Best regards

Gabriel Kaufmann



Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-07 Thread Gabriel Kaufmann



I have the same Problem with thunderbird on Linux.

It looks like thunderbirds imap-implementation is a little bit broken. 
Even if thunderbird tried once to get a mailbox, it persists in the 
profile.


I have FS-Layout in dovecot. Thunderbird somtimes try to get a 
submailbox with INBOX/firstlevel^secondlevel^thirdlevel


Then it doesn't find this mailbox on the server (for sure, it's 
INBOX/firstlevel/secondlevel/thirdlevel) tb tries to get next


INBOX/firstlevel^^secondlevel^^thirdlevel

and then INBOX/firstlevelsecondlevelthirdlevel and so on. And 
on each first login, tb tries to get all of them again and again...



Go to $TB-profilefolder/ImapMail/ and delete all of the *.msf files 
and search for the wrong mailboxes, described above... you will finde 
them.


And they are probably also in some config-files in the profile. 
user.prefs i think, and panacea.dat i could find them.


Delete all of the entries (be careful). Close and restart firefox. 
Good look, the phantom-folders are gone.



jakob


I tried that. In addition to that I did Trash -> Context-Menu -> 
Settings and "Repair". I also deleted Trash.sdb and Trash.msf in 
ImapMail-Dir of given Mailbox (after closing Thunderbird of course and 
restart afterwards). I think the repair-button does more or less the 
same than deleting msf-files.


Trash was rebuilding... but the Folders are still there. I was able to 
get rid of some other "Junk folders" (that not even where shown in my 
Thunderbird-Trash inside Trash.sdb folder). But the folders causing 
current issue are still present after sync! And on server-side (vmail 
Mailbox on imap-server) these folders are also there!


I'm still not able to delete them in Thunderbird. Still getting error 
Folder contains children, delete them first". Obviously this isn't 
possible as those sub-folders are not shown in Thunderbird! On 
server-side of imap (vmail Mailbox) there are in fact sub-folders in 
those folders.



Best regards

Gabriel Kaufmann



Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-07 Thread Gabriel Kaufmann

Hello,

the folders exist physically in vmail-storage on filesystem for the 
given Mailbox\MailDir\Trash. I already tried to refresh subscription 
using IMAP on Thunderbird. Is there any other way using CLI and dovecot 
to (re-)check subscriptions or do some kind of rescan?


Trying to delete the physically (in file-system on server) existing 
folders using IMAP always complains that the folder is not empty. In 
fact some of these folders also had sub-folders in IMAP before being 
deleted into Trash. In Filesystem these sub-folders also exist 
physically! But in trash they are not shown anymore - only their 
parent-folder without those children.


I'm using "layout=fs" option (physical folder/sub-folder and not MBOX 
like "folder.sub-folder.sub-sub-folder". It feels like Trash is ignoring 
this layout. I didn't figure out there is any option that is required to 
configure trash (separately from Mailbox-Namespace in dovecot) to 
recognise this.


Best regards

Gabriel Kaufmann



Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-05 Thread Gabriel Kaufmann

Doesn't anyone have an idea?

It looks like Dovecot and/or Thunderbird simply "ignore" sub-folders of 
IMAP-Folder in Trash/ as they are also not shown in Trash-Folder. 
Sub-Folder for INBOX and other IMAP-Folders work perfect (using 
layout=fs Mailbox).


Why doesn't this work for Trash?

Best regards

Gabriel Kaufmann



Cannot delete IMAP Mail-Folder in Trash

2018-02-01 Thread Gabriel Kaufmann

Hello,

I've noticed an annoying problem. Trying to delete a folder that has 
been deleted on IMAP and is moved to trash has problems being deleted. 
Thunderbird reports:
"Folder contains children" and stops there. Folder at first disappears. 
But after restarting Thunderbird they are still there and on 
Dovecot-Mailbox folder on the server the folders are also still present.


I'm using Dovecot 2.2.18 + Thunderbird + FS-Layout.

I already tried this workaround-mode:


/protocol imap { //imap_client_workarounds = tb-extra-mailbox-sep //}/


   best regards

   Gabriel Kaufmann
   _

   TYPOWORX ΝΞШ.ΜΞDIΑ
   Gabriel Kaufmann
   Siegfriedstraße 38 | 38106 Braunschweig
   USt.Id Nr. DE-268606152

   *T*elefon:0531-2521800*F*ax:0531-2326411

   + Internetseiten | Web-Entwicklung | PHP | CMS | TYPO3 | Microsites*
   +* Webhosting | Linux-Systemadministration

   www.typoworx.de <http://www.typoworx.de/> Facebook
   <http://www.facebook.com/pages/Typoworx-New-Media/134047336639842>
   XING <https://www.xing.com/profile/Gabriel_Kaufmann> 


   Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
   Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
   E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
   Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren
   sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

   This e-mail may contain confidential and/or privileged information.
   If you are not the intended recipient (or have received this e-mail
   in error) please notify the sender immediately and destroy this
   e-mail. Any unauthorized copying, disclosure or distribution of the
   material in this e-mail is strictly forbidden.