ddavness / power-mailinabox

A Mail-in-a-Box with extra capabilities and more customizability. Not just for power users!
Creative Commons Zero v1.0 Universal
168 stars 31 forks source link

Alias changes #103

Closed lifeboy closed 1 year ago

lifeboy commented 1 year ago

I have added a new domain to my own P-MiaB testbox (although it holds my personal mail, I also use it to try out things) and was perplexed by the lack of emails for that domain. Long story, but it turned out that I had misconfigured the domain alias. Instead of redirecting it to the actual mail account, I redirected it to itself, i.o.w. @giesler.za.net was being sent to @giesler.za.net. The system doesn't complain about that, but now the mail is stuck in a folder which I can't reach from the GUI.

Can I move the files to the mailbox where I can read it, or how can I get to that mail? It currently sits in /home/user-data/mail/mailboxes/giesler.za.net/roland/new.

Here's what I have tried: /home/user-data/mail/mailboxes/giesler.za.net/roland/new# cp '1670832968.M622214P4070388.box2,S=238067,W=241421' ../../../gtahardware.co.za/roland/cur/ /home/user-data/mail/mailboxes/giesler.za.net/roland/new# cp '1670832968.M622214P4070388.box2,S=238067,W=241421' ../../../gtahardware.co.za/roland/new/

Neither of the above makes the message show up in the mailbox.

Any tips on how I could get to the email?

lifeboy commented 1 year ago

I have used this too:

root@box2:/home/user-data/mail/mailboxes# doveadm -v copy -u roland@giesler.za.net Inbox user roland@gtahardware.co.za ALL
doveadm(roland@giesler.za.net): Error: Mailbox INBOX: open(/home/user-data/mail/mailboxes/gtahardware.co.za/roland/cur/1670832968.M622214P4070388.box2,S=238067,W=241421:2,) failed: Permission denied (euid=8(mail) egid=8(mail) missing +r perm: /home/user-data/mail/mailboxes/gtahardware.co.za/roland/cur/1670832968.M622214P4070388.box2,S=238067,W=241421:2,)
doveadm(roland@giesler.za.net): Error: Copying message UID 140 from 'INBOX' failed: Internal error occurred. Refer to server log for more information. [2022-12-12 11:01:46] (stream)
doveadm(roland@giesler.za.net): Error: Mailbox INBOX: open(/home/user-data/mail/mailboxes/gtahardware.co.za/roland/cur/1670834474.M288594P4074701.box2,S=238067,W=241421:2,) failed: Permission denied (euid=8(mail) egid=8(mail) missing +r perm: /home/user-data/mail/mailboxes/gtahardware.co.za/roland/cur/1670834474.M288594P4074701.box2,S=238067,W=241421:2,)
doveadm(roland@giesler.za.net): Error: Copying message UID 141 from 'INBOX' failed: Internal error occurred. Refer to server log for more information. [2022-12-12 11:01:46] (stream)

Although I have added +rw permissions to "new" and "cur" in gtahardware/roland/, it still fails with "permission denied".

ls -la gtahardware.co.za/roland/new
total 8
drwxrw-r--  2 mail mail 4096 Dec 12 10:41 .
drwx------ 11 mail mail 4096 Dec 12 11:06 ..
lifeboy commented 1 year ago

I think it was a misconfiguration from my side. I had a mailbox for roland<at>giesler.za.net as well as a domain alias for <at>giesler.za.net. I honestly can't remember when I created the mailbox, but when I went through all the configs again I finally realised what was happening.

I have now removed the domain alias and mail is flowing properly.