Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emails with same domain does not go out from postfix

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?

like image 572
Shahzad Fateh Ali Avatar asked Jul 12 '13 18:07

Shahzad Fateh Ali


People also ask

Where does postfix store outgoing mail?

Postfix sends all log messages to /var/log/mail.

Can a domain have multiple mail servers?

Of course, yes. A domain can have as many MX records (and thus, mail servers) as you wish. You can even set up priorities between them. For example, the MX records of the domain gmail.com are (you can get this a command host -t MX -v gmail.com ):

Is postfix a SMTP server?

As an SMTP server, Postfix implements a first layer of defense against spambots and malware.


1 Answers

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 .

like image 61
hofan41 Avatar answered Oct 17 '22 20:10

hofan41