Re: Dovecot UIDs and POP.

2019-09-22 Thread Plutocrat via dovecot
On 22/09/2019 4:08 AM, @lbutlr via dovecot wrote:
>> So while I was migrating the mail, I did try for a while to understand the 
>> format of the UID files, but failed to do so in the available time, so the 
>> client just had to deal with duplicate emails. But now the smoke has 
>> cleared, I'd like to understand the problem a little better, and I was 
>> hoping someone on this forum could explain it to me, and the changes I'd 
>> need to make to the files so that the POP client DIDN'T download the 
>> duplicate emails.
> 
> Did you check ? It has a lot of info on 
> this.

I did see that page, but was unable to figure out which of the three UID 
related files I needed to keep, and which to edit in order to 'trick' the email 
client into not re-downloading the mails. 

The migration was from dovecot 2.x to 2.x, so I don't think there was any 
translation issue between servers. The POP clients were Outlook (my old 
nemesis). The only information I could find is that the dovecot UIDL format is 
pop3_uidl_format = %v.%u
But that didn't really take me anywhere. So its all a bit of a mystery. I was 
hoping there would be a UID guru on this list who could walk me through it, or 
point me to some reference. 

> Don’t know, but dsync says it does this: 
> "The pop3-migration plugin is used to preserve POP3 UIDLs. When dsync is 
> handling IMAP INBOX and requests a POP3 UIDL, the plugin connects to the POP3 
> server and figures out which IMAP messages match which POP3 messages and then 
> returns the appropriate POP3 UIDL.”
> Trouble is, if you are migrating POP and the server is not up, I am not sure 
> what you can do with dsync?

I did try to use dsync (aka doveadm sync) for a few hours, but couldn't get a 
test account to migrate across. It seems like this would have been the solution 
but I was unable to confirm. At times it seemed to login and complete without 
error, but I could never find where it had put the mail! Other times it refused 
to login or gave permission errors. I looked around for real life examples, but 
wasn't able to find any. 

Had I got it to work, I could maybe have figured out the UID problem. Maybe 
that will be a project for me in the future, when I have a spare few hours!

Maybe if I gave a few details of the directory structure that would help. I was 
migrating from a Cpanel installation to a standalone mail server. 
In Cpanel, there was the admin account login, and under that 
~/mail/domain1.com/mailbox1
~/mail/domain1.com/mailbox2
~/mail/domain2.com/mailbox1
~/mail/domain2.com/mailbox2

On the target server the same structure existed. One login, admin, and under 
that account 
~/mail/domain1.com/mailbox1
~/mail/domain1.com/mailbox2
~/mail/domain2.com/mailbox1
~/mail/domain2.com/mailbox2
All files and directories were chown admin:mail 

The command I used was 
doveadm sync -u t...@domain.com ssh -i id_rsa -o "StrictHostKeyChecking=no" 
admin@100.110.120.130

I tried a few options to tell it where to put the mail, but dovecot on the 
target server didn't seem to know where each account was located. 

P.


Spam Blocking by filtering on username / id

2019-09-22 Thread Plutocrat via dovecot
This is probably quite an easy question, but I haven't been able to find the 
answer. I'm running a server where all the email addresses are in the format 
"u...@domain.com". I've noticed that a large number of fake login attempts use 
the format "user" eg. reception, service, root, admin. 

Is it possible to prevent any such logins to these email users without an 
@domain.com? Or maybe ignore them. Or drop them from the logging. 

P.