Post by Bob NicholsPost by Timothy BuchananI installed postfix and dovecot on an RPi4 under Raspbian 10. I have a
static ip with a Google domain, ko0y.org. I added an account to my
outlook client. I can send from ko0y.org, but not to it. From gmail, I
DNS Error: 30040130 DNS type 'mx' lookup of ko0y.org responded with
code NOERROR 30040130 DNS type 'aaaa' lookup of mail.ko0y.org.
responded with code NXDOMAIN 30040130 DNS type 'a' lookup of
mail.ko0y.org. responded with code NXDOMAIN
On Google domains I have ko0y.org and mail.ko0y.org as registered
hosts with my static ip. I have A record pointing to my ip and MX
record pointing to mail.ko0y.org.
What am I missing here? Thanks for all help.
There is indeed an A-record for ko0y.org, but there is no A- (or AAAA-)
record for mail.ko0y.org. If you refer to mail.ko0y.org as your MX
server, there must also be an A-record defined for that subdomain.
If you are using the same IP address for both domains, you may find it
easier to simply delete the MX-record altogether: in the absence of
addresses are likely to try to connect to ko0y.org's IP address.
--
for e-mail remove .invalid
Thanks for the prompt answer. I modified the DNS records to include A records for ko0y.org, mail.ko0y.org, smtp.ko0y.org, and www.ko0y.org and deleted any MX record. However, mail is still not going through. In the mail log, i do see a lot of unknown connections that are immediately dropped, probably bots looking for holes? Sometimes one will send a GET HTTP or STARTTLS. Here is the config file for postfix, see any problems there?
smtpd_banner = $myhostname ESMTP $mail_name (Raspbian)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
#compatibility_level = 2
# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/ko0y.org/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/ko0y.org/privkey.pem
smtpd_use_tls=yes
smtpd_tls_auth_only = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
#smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = ko0y.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = ipv4
inet_interfaces = all
#Handing off local delivery to Dovecot's LMTP, and telling it where to store mail
virtual_transport = lmtp:unix:private/dovecot-lmtp
#Virtual domains, users, and aliases
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
The Rpi4 has the hostname ko0y.org. When I telnet from within the Rpi, I can send mail to an outside address. But nothing comes in. Can you see from this whether I have problems in the DNS or postfix? Thanks again.