On Mon, Oct 21, 2024 at 11:55:27AM +0800, Joan Moreau via Postfix-users wrote:
> Here the output of the command:
>
> /opt/postfix/postmulti -x -- sh -c '
> printf "\n%s:\n" "$MAIL_CONFIG"
> /opt/postfix/postconf -f config_directory import_environment
> queue_directory
> syslog_name
> printf -- "--\n"
> /opt/postfix/postconf -P "*/*/syslog_name"
> '
>
> =============
>
> /etc/mail/postfix:
> config_directory = /etc/mail/postfix
> queue_directory = /var/spool/postfix/0
> syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
> --
> relay/unix/syslog_name = postfix/$service_name
This should be either the instance independent:
relay/unix/syslog_name =
${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
or else set explicitly in each instance:
>
> /etc/mail/postfix-smtp1:
> config_directory = /etc/mail/postfix-smtp1
> queue_directory = /var/spool/postfix/1
> syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
> --
> relay/unix/syslog_name = postfix/$service_name
With this, the "relay" transport logging will fail to distinguish
between "postfix" and "postfix-smtp1", and ditto for all the other
instances. I should have also asked for "multi_instance_name", but I
assume that's set correctly in each instance (check!).
> For the evidence, I am routing the emails by the source sender via exim to
> specific relays (running on postfix on the same machine, each binding on one
> IP)
That's not "evidence". Where's the logging showing messages ending up
in a different instance than the one that received them?
> Email sent to one postfix on one IP (correctly) but get in the queue of the
> default postfix when sending out if not sent immediatly (bounced or
> greylisted by the receiver or else)
You're claiming that deferred messages end up in a different queue than
the instance they came into, show evidence (LOGGING).
At this time you should also post the output of:
$ postmulti -x -- sh -c '
printf "\n%s:\n" "$MAIL_CONFIG"
postconf -f config_directory inet_interfaces multi_instance_name
smtpd_proxy_filter queue_directory
printf -- "--\n"
postconf -Mf "*/inet" "*/pass"
printf -- "--\n"
postconf -P "*/*/syslog_name"
'
On Mon, Oct 21, 2024 at 11:58:47AM +0800, Joan Moreau via Postfix-users wrote:
> Also un ls -alR in /var/spool/postfix/0 gives the list of pending emails,
> while ls -alR in /var/spool/postfix/x (x>0) shows an empty queue
That does not mean anything other than that the default instance has
undelivered mail, and others don't. And the way to list queues is not
"ls -alR", but "postqueue -p" (a.k.a. "mailq"):
$ postmulti -i - postqueue -p
$ postmulti -i postfix-smtp1 postqueue -p
$ postmulti -i postfix-smtp2 postqueue -p
Without reporting logging you'll get nowhere.
> I would expect, if I am not worng, that queued messages are getting in
> /var/spool/postfix/x according to the instance handling the emaili,
> isn't it?
Queued messages are in the queue of the (last) Postfix instance that has
received and has not yet delivered the message.
--
Viktor.
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]