Importing Domains and Users

Questions and answers about how to do stuff
Post Reply
toddh
Posts: 69
Joined: 16 Feb 2015 18:52

Importing Domains and Users

Post by toddh »

I am new to EFA and getting used to the menus and functionality. I have an older box that does scanning with Postfix, SA, Clam so I have a basic familiarity those and I have some scripts setup to import users and domains from our mail server.

I would like to do the same with EFA but don't want to break anything by editing the main.cf manually. I would like to setup my postfix main.cf like such.

relay_domains =
hash:/etc/postfix/transport
hash:/etc/postfix/transport_A
hash:/etc/postfix/transport_B

relay_recipient_maps =
hash:/etc/postfix/relay_recipients
hash:/etc/postfix/relay_recipients_A
hash:/etc/postfix/relay_recipients_B

I think I read here that I can edit my main.cf directly?

These file are created on the mail server and formatted in the proper convention so all I have to do is get postfix to use them in EFA. That consists of copying them over, change permissions, and then postmap. I normlally schedule on a cron every 30 min to do that.

Will this work on EFA or is there a better way to handle importing users and domains?

Thanks,

Todd
cdburgess75
Posts: 49
Joined: 11 Jun 2014 21:43

Re: Importing Domains and Users

Post by cdburgess75 »

I made very large imports with CSV uploads using the webmin https://x.x.x.x:10000 port 10000 mysql tool. The tool has an import csv option. Just download the users cvs file and edit it accordingly with excel. Then import, very simple to do really.
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Importing Domains and Users

Post by shawniverson »

I think I read here that I can edit my main.cf directly?

Any updates EFA makes to postfix are through yum and single line edits into the existing main.cf. ;)

Feel free to customize main.cf.

<disclaimer>Test any future updates before you use them in production, of course</disclaimer> :D
toddh
Posts: 69
Joined: 16 Feb 2015 18:52

Re: Importing Domains and Users

Post by toddh »

Got the main.cf updated and the transport and relay_recipients are importing fine. Created a cron and users are updating from the mail server every 30 min.

Thanks!

Todd
Post Reply