A registered user can send email through any name(including admin@domian.tld,root@domain.tld,webmaster@domain.tld). I tested it by creating a test user on the server then trying to send mail from a random name.
Type the name you want to be displayed for the receiver of the email(eg.Tom,john,etc.). Type a random name in email along with the domain(random_name@yourdomain.tld).Click ok.
Is the email flagged in some way on the receiver side?
Because your trick only seems to change the reply-to address right? You could do the same thing with "randomname@gmail.com" can’t you?
smtpd_sender_login_maps should test the From field to the logged in SASL authentication. If it mattches the email should go ,otherwise there is an error message. But its not happening in my case.
I tried this with both files /etc/postfix/main.cf and /etc/postfix/master.cf. Editing /etc/postfix/main.cf stops every mail (Admin account no effect of the rule, so try with new user account ) to be able to send and gives the error email not owned by the user. When this should not happen with the real email.(e.g. user@domain.tld should be able to send mail user@domail.tld,but it reject this scenario too.)
No in gmail the return path and from never changes. You may use any new identity but the the source only shows the real gmail email address. That way you can use gmail as SMTP relay for any of the email server, but any of the mail relayed will show the real gmail address in return path and from .
This is not in the case of Yunohost postfix server. Any one having the account in yunohost can relay any email identity from it. That makes the server open relay server for the person having account on it.
I tried lot of workarounds to stop the unassigned identities to stop being relayed from Yunohost server, but non of them worked. So the server remains open relay SMTP for the person having account on the server.
Can anyone tell me how can LDAP identity be matched with the sender envelop address of the email before sending it ?