1 (edited by craig 2018-09-15 10:58:02)

Topic: Sending as alias on another hosted domain

======== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: CentOS 7.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?: Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi Zhang,

I have read the "alias from another domain" post from 2016 (as well as "Allow member to send email as mailing list or mail alias"), and I am running into the same need. I thought that if I aliased aliasdomain.com to realdomain.com I would be able to send as user@aliasdomain.com if user@realdomain.com existed and I logged in as that user. However, I get the dreaded "sender is not the same" error:

"RCPT TO <some.other@address.tld> failed: <some.other@address.tld>: Recipient address rejected: Sender is not same as SMTP authenticate username".

Both realdomain.com and aliasdomain.com are hosted on my server.

I don't want to allow mismatched senders on *all* domains, just one domain (realdomain.com, with aliasdomain.com aliased to it) on my server.

Is this possible?


Craig


EDIT: Changed the domains to ones that are clearer, instead of using numbered domains.

2

Re: Sending as alias on another hosted domain

craig wrote:

Is this possible?

Actually, I can answer that question: Yes, it is possible, because it's working for another domain on the same server, so I'm very confused why it's not working on this domain.

3 (edited by craig 2018-09-15 11:58:33)

Re: Sending as alias on another hosted domain

There is one small (I would argue) difference between the domain where this is working and the one where it is not. I set up a test user on the broken domain exactly as it is set up on the working domain, and this time I get a different error:

RCPT TO <some.other@address.tld> failed: <user@aliasdomain.com>: Sender address rejected: User unknown in virtual mailbox table.

As in my initial post, user@aliasdomain.com is the address on the aliased domain.

The change I tried was to *not* create the listed aliases for the *user* on realdomain.com.

This is a summary of what is working and what is not working:

WORKING DOMAIN (no USER aliases)

Log in as: user@realdomain.com
Send from: user@aliasdomain.com

BROKEN DOMAIN (user with *user* alias user@aliasdomain.com, error message in initial post)

Log in as: user.xxxx@realdomain.com
Send from: user@aliasdomain.com

BROKEN DOMAIN (user with NO *user* aliases, error message above in this post)

Log in as: user.xxxx@realdomain.com
Send from: user@aliasdomain.com

So it looks like if the "user" (the local part in the email address) is the same for both realdomain.com and aliasdomain.com, then it works. However, while that works with the working example, it's not possible for all users on the broken domain.


Craig