Hi all,

running several postfix instances, it should be possible to let them communicate over unix sockets as they are all on the same machine. There are three instances that accept mails (local, submission, and internet) and forward them to the fourth instance that deals with delivery. That fourth instance should listen on a unix socket, the three other instances should have a corresponding transport.

For the delivering instance, postfix-out, i added in the master.cf:

smtpd      unix  n      -       y       -       -       smtpd

After restarting the instance, /var/spool/postfix-out/public/smtpd exists with owner postfix:postfix and mod 4666.

For testing purposes (i do not want have trouble with incoming and submission mails) i only changed the local, null-client, instance postfix in main.cf:

default_transport = lmtp:unix:/var/spool/postfix-out/public/smtpd

Sending a mail by

root@bywater /etc/postfix # sendmail -i -f root -t <<EOF
From: root
To: [email protected]
Subject: test

test
EOF

Shows in mail.info for instance postfix:

2025-10-19T14:27:02.660689+02:00 bywater postfix/pickup[2064535]: A13661E12A4: uid=0 from=<root> 2025-10-19T14:27:02.665159+02:00 bywater postfix/cleanup[2064540]: A13661E12A4: message-id=<[email protected]> 2025-10-19T14:27:02.714870+02:00 bywater postfix/qmgr[2064536]: A13661E12A4: from=<[email protected]>, size=291, nrcpt=1 (queue active) 2025-10-19T14:27:02.773551+02:00 bywater postfix/lmtp[2064542]: A13661E12A4: to=<[email protected]>, relay=none, delay=0.12, delays=0.11/0.01/0/0, dsn=4.4.1, status=deferred (connect to bywater.qno.de[/var/spool/postfix-out/public/smtpd]: No such file or directory)

No log entries for instance postfix-out.

man 8 lmtp says:
unix:pathname
Connect to the local UNIX-domain server that is bound to the specified pathname. If the process runs chrooted, an absolute pathname is interpreted relative to the Postfix queue directory.

As postfix and postfix-out are in different chroot, it is not possible to create a path from one chroot to the other, so i made a symbolic link:

root@bywater /var/spool/postfix/public # ln -s /var/spool/postfix-out/public/smtpd

and changed in main.cf:

default_transport = lmtp:unix:public/smtpd

Still no such file or directory.

But there must be a way to transport mail via unix socket from one postfix instance to another?

TIA
QNo


_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to