4

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 = 127.0.0.0/8 [::ffff:127.0.0.0]/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

buscandoaventuras
buscandoaventuras.com.br
fe00::0     ip6-localnet
ff00::0     ip6-mcastprefix
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters

127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
78.129.135.49 buscandoaventuras.com.br  buscandoaventuras
::1     localhost ip6-localhost ip6-loopback
fotanus
  • 163
  • 8
  • 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

1 Answers1

3

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 78.129.135.49
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 78.129.135.49
Host 49.135.129.78.in-addr.arpa. not found: 3(NXDOMAIN)

Update:

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 1.1.1.1

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.

fboaventura
  • 1,135
  • 11
  • 16