Bulk domains

Questions and answers about how to do stuff
Post Reply
efagokan1
Posts: 27
Joined: 28 Mar 2022 05:57

Bulk domains

Post by efagokan1 »

Hello

I own 25 domains. I want to add them all in bulk instead of adding them one by one.
Can you help with this?

Thanks.
User avatar
pdwalker
Posts: 1581
Joined: 18 Mar 2015 09:16

Re: Bulk domains

Post by pdwalker »

add the first domain and second domain in normally.

then edit the /etc/transport file and add in your other domains using the same format as the first two domains. I assume that all domains are going to the same destination mail server?

after you have finished editing the files, run the postmap command on the transport table to update the transport database file.

then test to see if everything is working.
efagokan1
Posts: 27
Joined: 28 Mar 2022 05:57

Re: Bulk domains

Post by efagokan1 »

Hello

thanks for the answer.

What I want is to do the adding process in bulk. So not just adding 1st and 2nd domains, but adding all up to 1..25. In summary, I want to add 25 domains at once. I could write a loop for it, but I don't know where and how. I think the added domain is written first to the database and then to the config files.

If there is no tool that I can add in bulk, I just need to know where the added ones are added.
User avatar
pdwalker
Posts: 1581
Joined: 18 Mar 2015 09:16

Re: Bulk domains

Post by pdwalker »

/etc/transport is the file you want to look at.

please see my previous instructions

[edit] :o

change that to /etc/postfix/transport. I think you'll find it works better.
stormgoose
Posts: 1
Joined: 18 Sep 2023 17:04

Re: Bulk domains

Post by stormgoose »

Just as update to help avoid confusion for others, at least on my install (CentOS based) the location is:

/etc/postfix/transport

Bottom of the transport file should list all your existing domains and internal mail server IPs, and you can add more entries there too (in my case, I needed to edit 8 domains as I have a new email server in play at a different internal IP address - it's worked a treat :) )
User avatar
pdwalker
Posts: 1581
Joined: 18 Mar 2015 09:16

Re: Bulk domains

Post by pdwalker »

I stand corrected.

A slip on my part. Thanks stormgoose.
Post Reply