I'm new to postfix. Sending e-mails works fine, but I can't receive external e-mails. I only have one server, so my domain name is equal the mail server name. By what I read, I don't need to configure one MX for that, but I did just to be sure (with the domain name). It shows fine in the answer section from dig.

Telnet from an outside machine over the internet works fine, and sending one e-mail directly from telnet works like a charm. However, when trying to send one e-mail from gmail or yahoo, nothing happens - not even show a entry in the mail.log.

I wonder if port 25 is enough to receive e-mails from external servers? What my problem can be?

EDIT: postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = buscandoaventuras.com.br, localhost.com.br, localhost
myhostname = buscandoaventuras.com.br
mynetworks = [::ffff:]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

EDIT: output for: hostname ; cat /etc/mailname ; cat /etc/hosts

fe00::0     ip6-localnet
ff00::0     ip6-mcastprefix
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment. buscandoaventuras.com.br  buscandoaventuras
::1     localhost ip6-localhost ip6-loopback
  • 1
    You probably need to paste the output of postconf -n at the very least. – NickW Mar 11 '13 at 16:02
  • Sorry, please check the edit – fotanus Mar 11 '13 at 16:34
  • If connectivity to port 25 works and nothing appears in the logs the problem is likely with your DNS records. Please show what records you've setup. – mgorven Mar 11 '13 at 16:37
  • connectivity on external machine port 25 works and appears on the mail.log, but when sending one e-mail from gmail nothing appears on logs. Please feel free to dig the site, the domain name is in the configuration file. – fotanus Mar 11 '13 at 16:52

Your MX is pointing to an nonexistent domain busandoaventuras.com.br, you made a typo and skipped an c. And your IP address isn't reverse resolving to your MX, this may cause you some problems with anti-spam configurations.

$ host buscandoaventuras.com.br
buscandoaventuras.com.br has address
buscandoaventuras.com.br mail is handled by 1 busandoaventuras.com.br.
$ host -t mx buscandoaventuras.com.br
buscandoaventuras.com.br mail is handled by 1 busandoaventuras.com.br.
$ host busandoaventuras.com.br
Host busandoaventuras.com.br not found: 3(NXDOMAIN)
$ host
Host not found: 3(NXDOMAIN)


So let us have some changes in your machine. First you need set a proper hostname to it. choose one that you like, is boaviagem and change the files /etc/mailname, /etc/hostname and /etc/hosts to reflect it:

# echo boaviagem > /etc/hostname
# sed -i 's/^/boaviagem./g' /etc/mailname
# sed -i 's/busca/boaviagem.busca/g' /etc/hosts

Reboot your machine, just for the sake of it. Then let's go to DNS and Postfix. Into DNS create an A record pointing boaviagem to your machine's IP address.

boaviagem   IN A

and change your MX to have your machine in it.

@   IN MX 10 boaviagem.buscandoaventuras.com.br

Change your serial and reload DNS. Now, into postfix, change my_hostname to /etc/mailname. Restart postfix and wait for your DNS to refresh propagation. Try again and see if this fixed it.

  • Thanks for getting that, but after fix the typo or trying with blank, didn't worked either. – fotanus Mar 11 '13 at 20:24
  • Can you post the result of the command hostname ; cat /etc/mailname ; cat /etc/hosts? – fboaventura Mar 11 '13 at 21:49
  • posted - thanks for your time. Any chance that gmail and yahoo require reverse dns working to deliver? – fotanus Mar 11 '13 at 21:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.