mjl- / mox

modern full-featured open source secure mail server for low-maintenance self-hosted email
https://www.xmox.nl
MIT License
3.69k stars 110 forks source link

Does alias work? #244

Open exander77 opened 1 week ago

exander77 commented 1 week ago

Had alias setup and no mails come through the night. Changed it to address and it now works. What happened to those e-mails?

exander77 commented 1 week ago

I even had catchall setup. And those e-mails just seem gone.

exander77 commented 1 week ago

Seems like having alias caused all mails to sent to that address disappear.

exander77 commented 1 week ago

So I setup testalias@mydomain.cz:

Nedoručitelná zpráva / Undelivered Mail Returned to Sender
Vaše zpráva pro <[testalias@mydomain.cz](mailto:testalias@mydomain.cz)> ze dne 10.11.2024 nemohla být doručena.
Zpráva je přiložena.

Your message for <[testalias@mydomain.cz](mailto:testalias@mydomain.cz)> from 2024/11/10 could not be delivered.
It's attached below.

Důvod / Reason:
---------------

5.0.0 smtp; 550 5.7.2 not allowed to send to destination (l9Kp9hn5SySsIOl366ySJw)

Permanent Failure - Other or Undefined Status

Alias testalias@mydoman.cz is set on mydomain.cz:

Members can list other members Allow messages to use the alias address in the message From header It leads to mymail@mydoman.cz that is accociate with account myaccount.

I log, there is:

mox-1  | l=info m="deliver error" pkg=smtpserver rcptto=testalias@mydomain.cz code=550 secode=secode usererror=true errmsg="not allowed to send to destination" cid=19313e6c2b3 delta="52.76µs"

This is pretty bad arror, causing all the mails to be lost.

Unsetting these:

Members can list other members Allow messages to use the alias address in the message From header

Doesn't change the issue.

exander77 commented 1 week ago

I am adding that I have catch all setup on the same account and if I send to anything else on mydomain.com it is received. But when I create alias, it is rejected.

mjl- commented 1 week ago

Do you also have "Public, anyone can post instead of only members" checked? If not, the message in the "message from" header must be a member of the alias, otherwise sending to the alias is not permitted and it triggers you message you're seeing.

I suppose you created the alias to get emails sent to the alias address delivered to multiple accounts? Does a message sent by one of the members to the alias get the message delivered to the other member(s) of the alias?

exander77 commented 1 week ago

@mjl- No, I don't have public, I actually didn't know what that meant:

Public, anyone can post instead of only members

But now, rereading it several times, do I get this correctly, that this needs to be checked for the alias to actually receive e-mails from outside?

If that is the case, I think it should be default.

exander77 commented 1 week ago

But even then I am unsure if it should beat catch all. If nobody else caught that mail, shouldn't it be caught by catch all?

mjl- commented 1 week ago

But now, rereading it several times, do I get this correctly, that this needs to be checked for the alias to actually receive e-mails from outside?

Yeah... The concept of "alias" was also a bit "list", or "private mailing list".

If that is the case, I think it should be default.

Yes, that seems like a safer default. It's easy to disable public posting after you've got messages you didn't want. Better than to get messages rejected that you do want.

But even then I am unsure if it should beat catch all. If nobody else caught that mail, shouldn't it be caught by catch all?

I think that would cause new confusion, especially if the account of the catchall address is also a member of the list. You would get a message sent to the alias, think all members got it, but only you got it because your account was configured for the catchall address.

exander77 commented 1 week ago

I think that would cause new confusion, especially if the account of the catchall address is also a member of the list. You would get a message sent to the alias, think all members got it, but only you got it because your account was configured for the catchall address.

I think he should still get it if he is only person getting it. Catch all as I understand it is to catch e-mails that wasn't caught by any other mechanism. If the e-mail is not caught by anybody and not even catch all then it is effectively lost.

exander77 commented 1 week ago

h... The concept of "alias" was also a bit "list", or "private mailing list".

Yes, I didn't get this. And I was confused what is difference between alias and address. I am used from postfix. And didn't get the concept, but I think primary feature people use this for is to route one e-mail address to multiple accounts.

mjl- commented 6 days ago

I'll look into making the UI and config options more clear what the alias is for, and that it isn't for adding an email address to just one account. Let's leave this issue open for that.