Emails with same domain does not go out from postfix
Asked Answered
C

2

15

I am using postfix to send out emails. Its working fine when I send email to other domains but it does not send email when I send emails to the same domain the post fix is configures with.

Below is my configuration:

myhostname = [FQDN]
virtual_alias_maps = hash:/etc/postfix/virtual
#home_mailbox = mail/
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
#mydestination = mydomain1.com, mydomain2.com
#relayhost =
#mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

Can anyone point me where misconfiguration is?

Chaudfroid answered 12/7, 2013 at 18:0 Comment(0)
B
28

Add this blank line in your main.cf file.

mydestination = 

Then reload your postfix configuration by running

/etc/init.d/postfix reload

I noticed you had tried to do something similar by commenting out the line defining mydestination, however, this will not fix your problem because mydestination defaults to $myhostname, localhost.$mydomain, localhost .

Bibbye answered 23/4, 2014 at 9:36 Comment(4)
This seems to work, although I already had many destinations defined on the mydestination = line. I simply removed my domain from the line and it now works.Sainthood
This leads to a solution, but it should be noted that removing the domain from the mydestination list will fix the issue - this is unless you have a mail handler running on the same host (if you have the mail handler, you wouldn't be having the issue in the first place anyway)Steiger
Thank you very much, this is the only answer which worked.Kovrov
Thanks @hofan41. You have saved my several hours of work :) .Lust
H
3

Check the settings in your /etc/postfix/main.cf file, specifically the setting for virtual_mailbox_domains. If your domain is in this line, but another server is the MX for your domain, then this would explain the problem - i.e. the postfix server thinks it's handling incoming mail for your domain, but the MX records say otherwise.

Huh answered 12/7, 2013 at 19:0 Comment(2)
I have mentioned my configuration above. virtual_mailbox_domains is not set and MX set on google. What configuration should I modify to fix this issue?Chaudfroid
Actually the emails are getting bounced. This is mentioned in log. This is what the log states: "Jul 14 05:18:54 localhost postfix/local[32434]: AED86105E43: to=<[email protected]>, relay=local, delay=0, delays=0/0/0/0, dsn=5.1.1, status=bounced (unknown user: "shahzad.fatehali")"Chaudfroid

© 2022 - 2024 — McMap. All rights reserved.