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

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, isnt' it ?

Maybe a config mistake or something else ?

On 2024-10-21 11:55, Joan Moreau wrote:

Hi

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
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix/0
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
relay/unix/syslog_name = postfix/$service_name

/etc/mail/postfix-smtp1:
config_directory = /etc/mail/postfix-smtp1
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix/1
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
relay/unix/syslog_name = postfix/$service_name

/etc/mail/postfix-smtp2:
config_directory = /etc/mail/postfix-smtp2
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix/2
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
relay/unix/syslog_name = postfix/$service_name

/etc/mail/postfix-smtp3:
config_directory = /etc/mail/postfix-smtp3
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix/3
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
relay/unix/syslog_name = postfix/$service_name

/etc/mail/postfix-smtp4:
config_directory = /etc/mail/postfix-smtp4
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix/4
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
relay/unix/syslog_name = postfix/$service_name

/etc/mail/postfix-smtp5:
config_directory = /etc/mail/postfix-smtp5
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix/5
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
relay/unix/syslog_name = postfix/$service_name

/etc/mail/postfix-smtp6:
config_directory = /etc/mail/postfix-smtp6
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix/6
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
relay/unix/syslog_name = postfix/$service_name

=============

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)

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)

On 2024-10-21 11:34, Viktor Dukhovni via Postfix-users wrote:
On Mon, Oct 21, 2024 at 09:31:53AM +0800, Joan Moreau via Postfix-users wrote:

I am using the " multi" postifx
: https://www.postfix.org/MULTI_INSTANCE_README.html

When an email is ending in the queue for relaunch, it goes to the
principal process, not the one where it has firstly managed by

(says if I have 2 instance p1 and p2, I send the mail with p2, I
restart postfix, the email is now sent by p1 inproperly)

Is this a bug or a misconfiguration ?
It is not even clear what problem you're describing.

- Perhaps the message does not even touch multiple queues, and all
you have is misconfigured logging?

1.  Nothing built-in to the Postfix queue manager or delivery agents
moves messages from one instance queue to another.  So what you're
describing "can't happen".  Many services can even run in a chroot
jail, with the OS constraining their view of the filesystem to just
the queue directory.

2.  Of course if you somehow manage to give multiple instances the same
queue directory, that would a serious misconfiguration.  Post the
output of:

$ postmulti -x -- sh -c '
printf "\n%s:\n" "$MAIL_CONFIG"
postconf -f config_directory import_environment queue_directory syslog_name
printf -- "--\n"
postconf -P "*/*/syslog_name"
'

On my single-instance system the output is:

/opt/postfix/etc:
config_directory = /opt/postfix/etc
import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY
LANG=C POSTLOG_SERVICE POSTLOG_HOSTNAME
queue_directory = /var/spool/postfix
syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}
--
465/inet/syslog_name = postfix/smtps
submission/inet/syslog_name = postfix/submission

3.  As mentioned by Wietse, post logs that evidence the reported issue.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to