I am helping a friend with his system. As such things are not as I
would set them up. But just the same I can't figure out this
problem. So I come here seeking a second set of eyes on it. What is
the problem that I am not seeing here?
rwp@teton:~$ echo test | mailx -s test [email protected]
...works... ...the message arrives in my mailbox...
...this comes in through /usr/sbin/sendmail of course...
rwp@teton:~$ swaks --to [email protected] --server 127.0.0.1:25
=== Trying 127.0.0.1:25...
=== Connected to 127.0.0.1.
<- 220 teton.example.net ESMTP Postfix (Debian/GNU)
-> EHLO teton.example.net
<- 250-teton.example.net
<- 250-PIPELINING
<- 250-SIZE 40000000
<- 250-ETRN
<- 250-ENHANCEDSTATUSCODES
<- 250-8BITMIME
<- 250-DSN
<- 250-SMTPUTF8
<- 250 CHUNKING
-> MAIL FROM:<[email protected]>
<- 250 2.1.0 Ok
-> RCPT TO:<[email protected]>
<** 554 5.7.1 <[email protected]>: Relay access denied
-> QUIT
<- 221 2.0.0 Bye
=== Connection closed with remote host.
Oct 18 21:21:03 teton postfix/smtpd[8049]: connect from localhost[127.0.0.1]
Oct 18 21:21:03 teton postfix/smtpd[8049]: NOQUEUE: reject: RCPT from
localhost[127.0.0.1]: 554 5.7.1 <[email protected]>: Relay access denied;
from=<[email protected]> to=<[email protected]> proto=ESMTP
helo=<teton.example.net>
Oct 18 21:21:03 teton postfix/smtpd[8049]: disconnect from
localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4
That illustrates the problem. My friend has SquirrelMail set up but
it can't send mail to the 127.0.0.1:25 via SMTP due to Relay Access
Denied. That's the actual problem. But of course I use swaks to
debug things. But the goal is to get SquirrelMail running. And I
think that is running again. Pretty sure it had been working.
Here is the main.cf file, which my friend has modified extensively.
Personally I would trim out the items that are the same as the default
values. I know, I know, I changed the actual domain names so that my
friend wouldn't be annoyed that I posted this information. But
otherwise it's all there. I prettied up smtpd_recipient_restrictions
a little as the default wrapping was not good.
Because smtpd_recipient_restrictions starts with permit_mynetworks and
mynetworks includes 127.0.0.0/8 I would expect that smtp on the local
host to 127.0.0.1:25 should be allowed. But instead it is the Relay
error.
rwp@teton:~$ postconf mail_version # Debian Stable 10 Buster
mail_version = 3.4.14
rwp@teton:~$ postconf -nf
alias_maps = hash:/etc/aliases
bounce_queue_lifetime = 3d
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/lib/postfix/sbin
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 $process_id & sleep 5
disable_vrfy_command = yes
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mail_owner = postfix
maximal_queue_lifetime = 3d
message_size_limit = 40000000
mydestination = $myhostname, localhost.$mydomain, $mydomain, localhost,
example.com, example.org
mydomain = example.net
myhostname = teton.example.net
mynetworks = "172.105.151.107/32, 96.88.95.55/32, 127.0.0.0/8"
mynetworks_style = host
myorigin = $mydomain
non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock
queue_directory = /var/spool/postfix
relay_domains = $mydestination
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_helo_required = yes
smtpd_milters = unix:/var/run/opendkim/opendkim.sock
smtpd_recipient_restrictions =
permit_mynetworks,
reject_unauth_destination
check_helo_access hash:/etc/postfix/helo-access
reject_rbl_client zen.spamhaus.org=127.0.0.[2..11],
reject_rhsbl_sender dbl.spamhaus.org=127.0.1.[2..99],
reject_rhsbl_helo dbl.spamhaus.org=127.0.1.[2..99],
reject_rhsbl_reverse_client dbl.spamhaus.org=127.0.1.[2..99],
warn_if_reject reject_rbl_client zen.spamhaus.org=127.255.255.[1..255]
unknown_local_recipient_reject_code = 550
The helo-access file contains:
localhost REJECT You are not localhost.
93.184.216.34 REJECT You are not 93.184.216.34
The master.cf file is unchanged from the OS package.
rwp@teton:~$ postconf -Mf
smtp inet n - y - - smtpd
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
-o syslog_name=postfix/$service_name
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
postlog unix-dgram n - n - 1 postlogd
maildrop unix - n n - - pipe flags=DRhu
user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe flags=Fqhu
user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe flags=F
user=ftn
argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe flags=Fq.
user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe flags=R
user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop}
${user} ${extension}
mailman unix - n n - - pipe flags=FR
user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop}
${user}
The master.cf is the Debian packaged default version of the file and
there have been no local changes. Confirmed by etckeeper.
So what am I missing that I will be astonished I did not see myself?
Thanks! :-)
Bob