Postfix not receiving mail

I got this error message sent to google when i tried to deliver mail to eric@... the *'s are numbers for my ip address and eric is my username, why isn’t it working? Is there something i can do to make sure it will accept my ip address as the domain name? it seems to have reached the server and got that response below and i can send local emails.

501 5.1.3 Bad recipient address syntax

also i think i messed up with postconf now and the process wont start. I entered my ip address as the domain name. how can i fix postconf data?

I entered this stuff:

postconf -e "myhostname = humble.localhost"
postconf -e "mydomain = localhost"
postconf -e "mydestination = \$myhostname, \$mydomain, localhost, localhost.\$mydomain, $(cat /etc/hostname).\$mydomain"
postconf -e "myorigin = \$mydomain"

and its not working.

actually entered them again and got the service to start now but still it wont accept email to eric@ipaddress

Have you tried:


I think its a gmail problem because i entered it like you said and it didn’t work but when i used the mail command to send it to that address it worked.

wait no i got this email trying to send to root:

Message  1:
From MAILER-DAEMON  Tue Jun  6 16:12:26 2023
X-Original-To: eric@localhost
Delivered-To: eric@localhost
Date: Tue,  6 Jun 2023 16:12:26 -0400 (EDT)
From: MAILER-DAEMON@localhost (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: eric@localhost
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
Content-Transfer-Encoding: 8bit

Part 1:
Content-Description: Notification
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

This is the mail system at host humble.localhost.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<root@[ip-address]>: mail for [ip-address] loops back to myself

Part 2:
Content-Description: Delivery report
Content-Type: message/delivery-status

Part 3:
Content-Description: Undelivered Message
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit

From eric@localhost Tue Jun  6 16:12:26 2023
Date: Tue, 06 Jun 2023 16:12:26 -0400
To: root@[ip-address]
Subject: testing
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
From: Eric Justin Allan <eric@localhost>

<root@[ip-address]>: mail for [ip-address] loops back to myself, does that mean its working?

I get this error when i send to my hostname from gmail eric@hostname

Relay access denied

This seemed to stop the error message sent to gmail for relay problems but i didnt get the email, my router ip address is so im not sure if i set that up correctly.

mynetworks =,

postconf -n

humble:~ # postconf -n
alias_maps = lmdb:/etc/aliases
biff = no
canonical_maps = lmdb:/etc/postfix/canonical
command_directory = /usr/sbin
compatibility_level = 2
content_filter =
daemon_directory = /usr/lib/postfix/bin/
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $proce
ss_id & sleep 5
defer_transports =
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
disable_vrfy_command = yes
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 0
message_strip_characters = \0
mydestination = $myhostname, $mydomain, localhost, localhost.$mydomain, humble.$mydomain
mydomain = localhost
myhostname = humble.localhost
mynetworks =,
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_clientcerts =
relay_domains = $mydestination lmdb:/etc/postfix/relay
relayhost =
relocated_maps = lmdb:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = lmdb:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_enforce_tls = no
smtp_sasl_auth_enable = no
smtp_sasl_password_maps =
smtp_sasl_security_options =
smtp_tls_CAfile =
smtp_tls_CApath =
smtp_tls_cert_file =
smtp_tls_key_file =
smtp_tls_session_cache_database =
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions =
smtpd_delay_reject = yes
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sasl_path = smtpd
smtpd_sasl_type = cyrus
smtpd_sender_restrictions = lmdb:/etc/postfix/access
smtpd_tls_CAfile =
smtpd_tls_CApath =
smtpd_tls_ask_ccert = no
smtpd_tls_cert_file =
smtpd_tls_exclude_ciphers = RC4
smtpd_tls_key_file =
smtpd_tls_received_header = no
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = lmdb:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = lmdb:/etc/postfix/virtual

actually i just got it to work sending to my hostname. I just relized there is a log file called /var/log/mail that helped it said that that ip address was wrong it had to end with a 0.

mynetworks =,

i still get bad recipient address when trying to use gmail to send to eric@[ipaddress] tho so idk.