On Mon, Oct 21, 2024 at 03:55:54PM +0800, Joan Moreau via Postfix-users wrote:

> > This should be either the instance independent:
> > 
> >     relay/unix/syslog_name =
> > ${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
> > 
> How to do that ?

By not NOT setting:

    relay unix ... smtp
        -o syslog_name = postix/$service_name

and instead setting:

    relay unix ... smtp
        -o { syslog_name = 
${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name }

> > That's not "evidence".  Where's the logging showing messages ending up
> > in a different instance than the one that received them?
>
> How can I log anything ? The email arrive in one of the multi and
> endup in teh " default"  queue. There is nothing in between

You don't log anything, your Postfix processes do the logging.  You just
need to report relevant entries from your mail logs.  Until you find and
post the relevant mail logs, you have no evidence.

> # /opt/postfix/postmulti -x -- sh -c '
>         printf "\n%s:\n" "$MAIL_CONFIG"
> /opt/postfix/postconf -f config_directory inet_interfaces
> multi_instance_name smtpd_proxy_filter queue_directory
>         printf -- "--\n"
> /opt/postfix/postconf -Mf "*/inet" "*/pass"
>         printf -- "--\n"
> /opt/postfix/postconf -P "*/*/syslog_name"
> '

Seems your "/bin/sh" does not have a "printf" built-in, perhaps next
time try "bash -c" instead.  For now this will do.

> config_directory = /etc/mail/postfix
> inet_interfaces = 
> [2a01:4f9:2a:85a::2],95.216.8.62,127.0.0.2,95.217.140.1,[2a01:4f9:2a:85a::11]
> multi_instance_name =
> smtpd_proxy_filter =
> queue_directory = /var/spool/postfix/0
> 26         inet  n       -       n       -       -       smtpd
>     -o 
> syslog_name=${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
> 26/inet/syslog_name =
>   ${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
> cleanup/unix/syslog_name =
>   ${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
> relay/unix/syslog_name =
>   ${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name

You appear to be receiving mail on port 26.

Seems you figured out the syslog_name syntax.  But you likely don't need
the override for at least "cleanup", and could probably do better than
"$service_name" on port 26.

> config_directory = /etc/mail/postfix-smtp1
> inet_interfaces = [2a01:4f9:2a:85a::11] 95.217.140.1
> multi_instance_name = postfix-smtp1
> smtpd_proxy_filter =
> queue_directory = /var/spool/postfix/1
> 26         inet  n       -       n       -       -       smtpd
>     -o 
> syslog_name=${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
> [...]

The basic instance settings look OK, tehy each have a different set of
IP addresses (inet_interfaces), and no proxy_filter to reroute mail
to the wrong place.  Any "content_filter" settings in effect?

> >     $ postmulti -i - postqueue -p
> >     $ postmulti -i postfix-smtp1 postqueue -p
> >     $ postmulti -i postfix-smtp2 postqueue -p
>
> these commands reach an  error:

Yes, I left out the "-x".

      $ postmulti -i -             -x postqueue -p
      $ postmulti -i postfix-smtp1 -x postqueue -p
      $ postmulti -i postfix-smtp2 -x postqueue -p

> 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?

You still have not posted any logs.  This is a waste of time.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to