Hello Matus ^^)

Le 28/07/2021 à 09:36, Matus UHLAR - fantomas a écrit :
On 28.07.21 06:21, Jean-François Bachelet wrote:
I have some problems with my postfix install, will report one by one :


I have activated the 'soft_bounce = yes' option in main.cf to see what happens.


1 / Mail sent by some daemons running as 'root' (here it's Pflogsumm, per example) with 'r...@server.mydomain.com'

for 'r...@server.domain.com' are bounced/rejected, as reported in '/var/spool/postfix/defer/' :

---------------------------------------------------------------------------------------------------------------------- <r...@server.mydomain.com>: mail for server.mydomain.com loops back to myself
recipient=r...@server.mydomain.com
offset=780
dsn_orig_rcpt=rfc822;r...@server.mydomain.com
status=4.4.6
action=delayed
reason=mail for server.mydomain.com loops back to myself

this mean that your server is going to send mail to "server.mydomain.com"
and your postfix sees it should deliver domain to itself, but postfix does
not know how to handle mail for server.mydomain.com
- you have to put "server.mydomain.com" to mydestinations if you want to
handle the mail locally

? but the pflogsumm crontab send its mail using 'mail' (as other system daemons do when necessary) not postfix for its reports... :


"perl /usr/sbin/pflogsumm -e -d yesterday /var/log/mail.log | mail -s 'Pflogsumm Logwatch for Postfix' root"


so aliases should apply and the mail should be sent to my external personal address.


hum, here is the content of 'mydestination' without an 's' as in the 'main.cf' conf file :

#mydestination = $myhostname, localhost.$mydomain, localhost

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#       mail.$mydomain, www.$mydomain, ftp.$mydomain


and the others mysomethings :

myhostname = mail.example.com

mydomain = example.com <-- look ! as I said below ;)

myorigin = $myhostname


Note that you should use example.com, as mydomain.com is real and owned by
someone

Don't worry, I have a proper FQDN that I don't want to spread in public mailing lists, hence the 'mydomain' as placeholder ;)

but next time I'll put 'example.com' instead ^^)


I don't understand as in the 'aliases' file I have set 'root: me@my_email.fr' so mail sent to 'root' should end in my personal mailbox...

the same problem as above. the destination address is not taken as local so
it's not aliases.

postconf: warning: /etc/postfix/main.cf, line 705: overriding earlier entry: smtpd_recipient_restrictions=permit_mynetworks, permit_auth_destination, permit_sasl_authenticated, reject

and what's exactly in 'main.cf' around that problematic 705 line :

699 smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, permit_sasl_authenticated, reject

- here you devine smtpd_recipient_restrictions

704 # SMTP Restrictions Defaults + Anti-Spam
705 smtpd_recipient_restrictions = reject_invalid_hostname,
706         reject_unknown_recipient_domain,
707         reject_unauth_destination,
708         reject_rbl_client sbl.spamhaus.org,
709         permit

- here you define smtpd_recipient_restrictions again

'cause it was specified as is in the tuto I've linked in my previous mail.

btwn I've tried to concatenate the two lines in one, putting the permit stances from line 699 after the line 709

but that don't work either :( perhaps I should have commented out the line 709 ?


last question : I found this in mail header sources when directly send to me to my external address (skipping 'root' to be sure I get the reports till the problem is resolved, it must be as I have a sh*tload of others aliases that will must be handled fine (migrating an uterly old suse server to a new debian one)...


Received-SPF: None (DAG4EX1.mxp6.local:
 r...@server.example.com does not designate permitted sender hosts)


How can/what I must do to get rid of this ? maybe it should read r...@mail.example.com there (it's the mail server's name) ?,

that should a permited sender hosts no ?


(note : I haven't configured spf, dkim, dmarc, etc, yet on this new server, one thing at a time and ensure that's working fine before pilling other things on top ;))


Jeff

Reply via email to