Updated: 28 September 2026 · Applies to: Postfix 3.8 (Ubuntu 24.04) and 3.10 (Ubuntu 26.04)
If you send mail for several brands, customers or types of mail (for example order confirmations and newsletters), give each one its own sending IP address. Every address builds its own reputation, so trouble in one stream does not hurt the others. In Postfix this is done with sender-dependent transports: the address that the mail is sent from decides which IP address it leaves from. The assignment is fixed and stays the same.
The idea
- Domain A sends from address 1, domain B from address 2, and so on.
- Each address has its own reverse DNS name, HELO name, SPF entry and warm-up history.
- One stream is not spread over many addresses. A steady address with regular volume earns a reputation; many addresses with tiny volume each do not. Ucartz's Acceptable Use Policy allows you to give each domain, customer or type of mail its own address, and asks you to keep a stable identity for each stream. It does not allow spreading a campaign over many addresses to hide its volume.
Before you start
- You have one transport per address in
master.cf, each with its own bind address and HELO name (How to make Postfix send from a specific IP address with a matching HELO name?). In this example there areout1,out2andout3. - SPF lists all the addresses (How to write an SPF record for a server with several IP addresses?) and DKIM signs all domains (How to set up DKIM signing with OpenDKIM and Postfix for several domains?).
1. Create the map
Create /etc/postfix/sender_transport:
# envelope sender -> transport @shop.example.com out1: @news.example.com out2: @customer-a.example.net out3: customer-a-bounce@example.org out3:
The table is searched by the envelope sender address and by @domain. The value is the transport name followed by a colon. Build the database and switch it on:
sudo postmap /etc/postfix/sender_transport sudo postconf -e "sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport" sudo postconf -e "default_transport = out1" sudo systemctl reload postfix
Mail from senders that are not in the table uses default_transport. The setting affects mail to outside recipients; the table for transport_maps has higher priority if you also use it.
2. Use the right envelope sender
The map looks at the envelope sender (the Return-Path, also called MAIL FROM), not at the visible From header. Your application must set the envelope sender for each domain, for example with sendmail -f or the "Return-Path" or "bounce address" setting of your mailing software. Use a bounce address on the same domain (bounce@news.example.com) so that SPF and the transport choice both follow the domain.
3. Test each stream
echo t | mail -s "shop test" -a "From: shop@shop.example.com" -r bounce@shop.example.com yourname@gmail.com echo t | mail -s "news test" -a "From: hello@news.example.com" -r bounce@news.example.com yourname@gmail.com sudo journalctl -t postfix/out1 -t postfix/out2 --since "5 minutes ago"
The log lines must show postfix/out1 for the first message and postfix/out2 for the second. In the received message the first "Received" header shows the matching host name and address.
4. Keep a record
Keep a small table for yourself: address, host name, domains using it, start date, current daily volume. It helps when a provider reports a problem for one address.
Common problems
- Everything leaves from the default address: the envelope sender does not match the table. Check with
postqueue -jor the log linefrom=<...>. - "unknown transport" in the log: the name in the table does not exist in
master.cf, or there is a typing error. Do not forget the colon. - Changes are not picked up: run
postmapafter every edit andsudo systemctl reload postfix.
Frequently asked questions
Can two domains share an address?
Yes, if they are similar kinds of mail from the same owner. Do not mix transactional mail with bulk marketing mail on the same address.
What if an address gets a bad reputation?
Find and fix the cause instead of moving the same mail elsewhere: What to do when your IP address is on a blocklist or your mail is rejected?.
Source: Postfix configuration parameters (sender_dependent_default_transport_maps).
Need a dedicated server, more IP addresses, or a hand with the setup?
- Unmanaged dedicated servers: full root access and IPv4 subnets from /29 up to /24, ordered with the server or added later.
- Managed dedicated servers: our team looks after the operating system, updates, security and monitoring.
- Dedicated server locations: choose the country and data centre when you order.
Prefer a hand with the setup? Our engineers can do it for you: Hire an Expert, or use our on-demand server management.
