1 (edited by joan 2014-01-16 21:10:18)

Topic: How to let a user send mail from a domain alias

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Linux inte.com.es 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
- Related log if you're reporting an issue:
====
Hi,

I have a domain: main.com and a domain alias.com
I would like to send mail using: joan@main.com and joan@alias.com

Is the only way to remove the reject_sender_login_mismatch ?
Is there any secure alternative?

thanks a lot

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How to let a user send mail from a domain alias

Alternative solution is modifying /etc/postfix/mysql/sender_login_maps.cf to query and return email address under alias domain.

3

Re: How to let a user send mail from a domain alias

I was just about to ask the same question.  What would the syntax be?  The current line in sender_login_maps.cf is:

SELECT mailbox.username FROM mailbox,domain WHERE mailbox.username='%s' AND mailbox.domain='%d' AND mailbox.domain=domain.domain AND mailbox.enablesmtp=1 AND mailbox.active=1 AND domain.backupmx=0 AND domain.active=1

4

Re: How to let a user send mail from a domain alias

Hi @answerman,

I'm afraid that you have to try it yourself, sorry about this.

5

Re: How to let a user send mail from a domain alias

No problem, I just figured someone had done it already.

6

Re: How to let a user send mail from a domain alias

Consider that, by default, this can be made sending email as "shadowAddress" istead of "mailAlias"
I use the LDAP backend but the syntax is similar