1

Topic: Local user address alias to virtual mail

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: CentOS release 6.4
- Related log if you're reporting an issue:
Jun 18 18:40:16 domain postfix/pickup[25774]: C4889101369: uid=492 from=<apache>
Jun 18 18:40:16 domain postfix/cleanup[25816]: C4889101369: message-id=<20130618184016.C4889101369@mail.domain.com>
Jun 18 18:40:16 domain postfix/qmgr[25775]: C4889101369: from=<apache@mail.domain.com>, size=750, nrcpt=3 (queue active)
Jun 18 18:40:16 domain postfix/pipe[25819]: C4889101369: to=<jon.doe@domain.com>, relay=dovecot, delay=0.25, delays=0.11/0.02/0/0.13, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun 18 18:40:17 domain postfix/qmgr[25775]: C4889101369: removed
====

Hi, I wish to all mail that was sent by apache to be delivered with my domain, for example, instead of apache@mail.domain.com the mail should be delivered as apache@domain.com.

I did some approaches, but none of them worked:
1) I created an entry in /etc/postfix/generic and then executed the postmap command along with the "smtp_generic_maps = hash:/etc/postfix/generic" in main.cf file.
2) I created an alias to an existing account in my virtual domain, for example, "apache: postmaster" in /etc/aliases and also /etc/postfix/aliases.
3) I updated the postmaster account in LDAP with the shadowAddress attribute.

Does it have the fourth way? Or none of this are right to use with virtual mail?

2

Re: Local user address alias to virtual mail

Did you try Postfix parameter "masquerade_domains"? http://www.postfix.org/postconf.5.html# … de_domains

Just curious, why do you worry about 'apache@mail.domain.com'? You can simply create an alias in /etc/postfix/aliases to forward all emails it received to another virtual mail user.