Basic Postfix not working

Hello, I'm a linode noob but my setup has gone great until I started setting up email. The only thing I want my email to be able to do is to forward emails from some of the domains I'm hosting to my gmail acccount. It looks like I could just install Postfix and things would work. I tried to follow the instructions in the Linode Libary but I cannot get email to delver (or do anything). My best guess is that I have something messed up in the DNS or the Postfix Configuration. Also, I have my DNS setup with the defauls settings done when you pick "Create Master Zone"

My first question is what I should use as the FQDN for Postfix. My domain is goftg.com and I used phazer.goftg.com, which was the default, but I also tried mail.goftg.com and just goftg.com. When I used the default it griped about no DNS for phazer in the goftg dns. I added an A record, but I also tried just chnaging the domain to mail.goftg.com . Here are my configuration files..

root@phazer:/var/log# postconf -n

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

appenddotmydomain = no

biff = no

config_directory = /etc/postfix

home_mailbox = mail/

inet_interfaces = all

mailboxsizelimit = 0

mydestination = mail.goftg.com, localhost.goftg.com, goftg.com , localhost

myhostname = mail.goftg.com

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

myorigin = /etc/mailname

readme_directory = no

recipient_delimiter = +

relayhost =

smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache

smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)

smtpdtlscert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem

smtpdtlskey_file = /etc/ssl/private/ssl-cert-snakeoil.key

smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache

smtpdusetls = yes

virtualaliasmaps = hash:/etc/postfix/virtual

This is the contents of /etc/postfix/virtual (emails modifed for privacy)

hello@goftg.com jim@gmail.com

testme@goftg.com jim@gmal.me, peggy@gmail.me

This is the contents of the goftg.com dns zone

; goftg.com [440981]

$TTL 86400

@ IN SOA ns1.linode.com. jim.me.com. 2013053002 14400 14400 1209600 86400

@ NS ns1.linode.com.

@ NS ns2.linode.com.

@ NS ns3.linode.com.

@ NS ns4.linode.com.

@ NS ns5.linode.com.

@ MX 10 mail.goftg.com.

@ A 50.116.37.123

mail A 50.116.37.123

phazer A 50.116.37.123

www A 50.116.37.123

Here is my firewall rules, again very basic

root@phazer:/var/log# sudo iptables -L

Chain INPUT (policy ACCEPT)

target prot opt source destination

fail2ban-ssh tcp – anywhere anywhere multiport dports ssh

ACCEPT all -- anywhere anywhere

REJECT all -- anywhere 127.0.0.0/8 reject-with icmp-port-unreachable

ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED

ACCEPT tcp -- anywhere anywhere tcp dpt:http

ACCEPT tcp -- anywhere anywhere tcp dpt:https

ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh

ACCEPT icmp -- anywhere anywhere

LOG all -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: "

DROP all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)

target prot opt source destination

DROP all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

ACCEPT all -- anywhere anywhere

Chain fail2ban-ssh (1 references)

target prot opt source destination

RETURN all -- anywhere anywhere

As I said, I have a generic installation, and did as plain of an install as possible, but the docs are old on the library, and I must have somthing wrong. Nothing is showing up in the mail.log except for the service starting and stopping. Thanks for any help

Jim

2 Replies

I have it workng a little better. I opened up the ports in my firewall and reinstalled with the fqdon set to mail.goftg.com. Now I'm getting

554 5.7.1 <jim@goftg.com>: Relay access denied

OK, got it working, secret was to add a domain entry to my virtual file ie

goftg.com DOMAIN

hello@goftg.com me@gmail.com

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct