1

I am trying to get postfix set up to send mail to a user with out specifying the domain. I believe the issue is that the email domain and the server domain are different.

The company email addresses are [email protected] and the server is built with the domain cmpny.com.

I have tried adding company.com to the mydestinations but line in the main.cf but it is not helping.

Any advice would be great!

Thanks, Joe

2
  • If you put recipient domain in mydestination then Postfix will try to deliver mail locally, is this what you expect? Commented Feb 8, 2020 at 1:37
  • Locally, as in to the mail system on the local machine? or locally as in the domain in the mydestination? Commented Feb 10, 2020 at 18:25

1 Answer 1

0

If you put company.com in mydestination, then you're telling postfix that he's the hosting mailserver for company.com. If that's what you want then do the following:

  1. Create an user: useradd -m -s /bin/bash testuser
  2. Then do (you may need mailutils package): echo "Hi there" | mail -s Testing testuser
  3. Then switch to user: su testuser
  4. And check for mail: mail

You should have your mail listed.

The same will work if you put [email protected] at #2

3
  • Sorry if it is unclear. What I want is for postfix to send the email to An existing email address ([email protected]) with the command you used in step 2. What section on the postfix/main.cf would i need to enable that to happen? Commented Feb 10, 2020 at 20:22
  • that address exists on your postfix server, or in the internet? Commented Feb 10, 2020 at 20:26
  • As far as i am aware there is no main postfix server. Most of the other servers in our environment use sendmail. Commented Feb 18, 2020 at 17:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .