I'm running virtualmin on my server, that have two domains let name them firstdomain.com and seconddomain.com. My goal is to receive mails on email firstname.lastname@example.org. So these are the steps that I made.
- I created email - email@example.com.
- For postfix I created file 'virtual_domains' that includes lines of those two domains and I hashed them.
- In main.cf I've added line virtual_alias_domains = hash:/etc/postfix/virtual_domains
- I removed 'info' user from /etc/aliases (with this row all emails where dropped to root user).
this file was added by virtualmin - virtual_alias_maps = hash:/etc/postfix/virtual - I created there aliases and hashed them:
firstname.lastname@example.org info-seconddomain.com seconddomain.com seconddomain.com
Now when I send email to email@example.com in maillog it look's like that
to=<firstname.lastname@example.org>, orig_to=<email@example.com>, relay=local, delay=39, delays=0.3/0.03/0/39, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
It finally deliverd to mailbox (after received mail it has a big pause in which it tries, I think, to recognize where to place the mail - about 2sec).
First question: Why it doesn't recognize 'seconddomain.com' and I don't see in maillog the below
Second question: What I need to change to achieve that? Third question: When I send email from firstname.lastname@example.org in original file I see:
'Received: from firstdomain.com'
can I change that to refer to domain that matchs email address?
In advance thank you for your reply :)