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 info@seconddomain.com. So these are the steps that I made.

  1. I created email - info@seconddomain.com.
  2. For postfix I created file 'virtual_domains' that includes lines of those two domains and I hashed them.
  3. In main.cf I've added line virtual_alias_domains = hash:/etc/postfix/virtual_domains
  4. I removed 'info' user from /etc/aliases (with this row all emails where dropped to root user).
  5. this file was added by virtualmin - virtual_alias_maps = hash:/etc/postfix/virtual - I created there aliases and hashed them:

    info@seconddomain.com      info-seconddomain.com
    seconddomain.com           seconddomain.com

    Now when I send email to info@seconddomain.com in maillog it look's like that

    to=<info-seconddomain.com@firstdomain.com>, orig_to=<info@seconddomain.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 info@seconddomain.com 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 :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.