Le 28/07/2021 à 13:15, Jean-François Bachelet a écrit :
Hello raf ^^)
Le 28/07/2021 à 08:54, raf a écrit :
On Wed, Jul 28, 2021 at 06:21:55AM +0200, Jean-François Bachelet
<jfbache...@free.fr> wrote:
Hello ^^)
I have some problems with my postfix install, will report one by one :
Thanks by advance to light my (postfix newbee) bulb ^^)
Jeff
Hi,
The "overriding earlier entry" warning means that you
have two definitions of smtpd_recipient_restrictions in
main.cf.
The first of them (above line 705, the one being
overridden) is:
smtpd_recipient_restrictions =
permit_mynetworks,
permit_auth_destination,
permit_sasl_authenticated,
reject
The second of them (at line 705, the one doing the
overriding) is:
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_destination,
reject_rbl_client
sbl.spamhaus.org,
permit
Postfix uses whichever comes last, and warns you about
the earlier ones. If the value in use is correct, then
delete the one that appears above it in main.cf, and
the warning should stop.
The makedefs.out warning can be stopped by deleting the
makedefs.out symlink, or by replacing it with the real
symlinked-to file in /usr/share/postfix/makedefs.out.
I can't see what's causing your real problem
(non-delivery to root), but a theory is that you have:
local_recipient_maps = unix:passwd.byname $alias_maps
which is slightly different to the default:
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
The difference means that access to /etc/passwd might
not work for postfix services that are chrooted. Just a
thought. It might be irrelevant.
You could try leaving local_recipient_maps at its
default, and see what happens.
One thing that seems strange to me is that
permit_mynetworks and permit_sasl_authenticated don't
appear in your smtpd_recipient_restrictions. These were
in the overridden value. Maybe you need to add them
back into your smtpd_recipient_restrictions. But again,
this might not be relevant to your problem.
I've tried to concatenate the two lines in one, putting the permit
stances from line 699 after the line 709 like below
but that don't work either perhaps I should have commented out the
line 'permit' or put that permit lines before the reject ones ?
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_destination,
reject_rbl_client
sbl.spamhaus.org,
permit
permit_mynetworks,
permit_auth_destination,
permit_sasl_authenticated,
reject
There seem to be a lot of things in the postconf -n
output that match the default values (e.g.
newaliases_path, setgid_group, ...). They can be
removed from main.cf.
But there's one setting that seems very odd:
sendmail_path = /usr/bin/postfix
ouch, there was a typo it's sbin not bin :(
corrected :
647 # sendmail_path: The full pathname of the Postfix sendmail command.
648 # This is the Sendmail-compatible mail posting interface.
649 #
650 sendmail_path = /usr/sbin/sendmail
that is like that in this tuto :
https://www.server-world.info/en/note?os=Debian_10&p=mail&f=1
I think it's an error that has never been reported to the site
webmaster...
(postfix newbee I said ;))
I've tested with 'sendmail' in place of 'postfix' in line 650 and now I
get a 'fatal error' when sending mails... excert from mail logs sent by
'pflogsumm' :
Fatal Errors
------------
sendmail (total: 1)
1 usage: sendmail [options]
there is no such error if sendmail_path = /usr/sbin/postfix...
Is there a good reason for that? It would normally be
sendmail_path = /usr/sbin/sendmail
You could try removing that and seeing if it helps.
As for the real problem "mail for server.mydomain.com
loops back to myself", maybe "server.mydomain.com"
should be in $mydestinations? If MX for
sender.mydomain.com is mail.my_domainFQDN.com but
mail.my_domainFQDN.com doesn't know to deliver mail for
sender.mydomain.com locally, then it might loop(?).
But don't trust me. I'm not an expert. This might be
a bad idea.
Good luck.
cheers,
raf