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
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:
From MAILER-DAEMON Tue Jun 6 16:12:26 2023
Date: Tue, 6 Jun 2023 16:12:26 -0400 (EDT)
From: MAILER-DAEMON@localhost (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Content-Type: multipart/report; report-type=delivery-status;
Content-Type: text/plain; charset=utf-8
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
Content-Description: Delivery report
Content-Description: Undelivered Message
From eric@localhost Tue Jun 6 16:12:26 2023
Date: Tue, 06 Jun 2023 16:12:26 -0400
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
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 192.168.1.1 so im not sure if i set that up correctly.
mynetworks = 192.168.1.1/28, 127.0.0.0/8
humble:~ # postconf -n
alias_maps = lmdb:/etc/aliases
biff = no
canonical_maps = lmdb:/etc/postfix/canonical
command_directory = /usr/sbin
compatibility_level = 2
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
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_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
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 = 192.168.1.1/28, 127.0.0.0/8
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_domains = $mydestination lmdb:/etc/postfix/relay
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_use_tls = no
smtpd_banner = $myhostname ESMTP
smtpd_delay_reject = yes
smtpd_helo_required = no
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_ask_ccert = no
smtpd_tls_exclude_ciphers = RC4
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 = 192.168.1.0/28, 127.0.0.0/8
i still get bad recipient address when trying to use gmail to send to eric@[ipaddress] tho so idk.