Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

modifying mail:postfix:mynetworks with serveradmin

Greetings,

I'm trying to modify the postfix settings on an Xserve running 10.3.9 using the settings from another currently-working Xserve as a model. The servers are located at a remote facility so I have to do the configuration using serveradmin (or some other command lineu utility). I'm having big problems figuring out the correct syntax for modifying the mail:postfix:mynetworks parameter.

Here's the settings from the working system (obfuscated):

deitrich@serv01 deitrich> sudo serveradmin settings mail:postfix:mynetworks
mail:postfix:mynetworks: arrayindex:0 = "127.0.0.1/32"
mail:postfix:mynetworks: arrayindex:1 = "192.168.1.1/32"
mail:postfix:mynetworks: arrayindex:2 = "192.168.2.1/32"

Currently the new system is set to:

deitrich@serv02 deitrich> sudo serveradmin settings mail:postfix:mynetworks
mail:postfix:mynetworks: arrayindex:0 = "127.0.0.1/32"

I'm trying to add 192.168.1.2 and 192.168.2.2 to the mynetworks list on the second server. However, when I try to modify the array I get the following:

deitrich@serv02 deitrich> sudo serveradmin command
mail:postfix:mynetworks: arrayindex:0 = create
mail:postfix:mynetworks: arrayindex:0 = "127.0.0.1/32"
mail:postfix:mynetworks: arrayindex:1 = "192.168.1.2/32"
mail:postfix:mynetworks: arrayindex:2 = "192.168.2.2/32"
[ctrl-d]
Invalid index "0", must specifiy array elements in order
Index = 0, count = 1, currentArray = (create)
for key: "mail:postfix:mynetworks: arrayindex:0"

If I try it without the 'create' I get:

deitrich@serv02 deitrich> sudo serveradmin command
mail:postfix:mynetworks: arrayindex:0 = "127.0.0.1/32"
mail:postfix:mynetworks: arrayindex:1 = "192.168.1.2/32"
mail:postfix:mynetworks: arrayindex:2 = "192.168.2.2/32"
[ctrl-d]
You need to specify a "command =" line with the command option

I've tried dozens of different variations and get similar results for all of them. I've read through the man page for serveradmin and the command line manual multiple times but obviously I'm missing something. Could someone clue me in to what the correct syntax is?

--
Dave Deitrich
deitrich@mac.com



Xserve G5 Mac OS X (10.3.9)

Posted on Jan 10, 2006 5:25 PM

Reply
4 replies

Jan 10, 2006 7:35 PM in response to Dave Deitrich

While I can't help you achieve the desired result using serveradmin, you can edit /etc/postfix/main.cf and find a line like this, and modify it as such:

mynetworks = 127.0.0.1/32,192.168.1.2/32,192.168.2.2/32

I personally use nano:

sudo nano /etc/postfix/main.cf

Message was edited by: jaydisc (update mynetworks text to suit specific situation)

Jan 12, 2006 12:14 PM in response to Dave Deitrich

I'm not sure what settings in NetInfo you're concerned with.
You can safely modify the settings of master.cf and main.cf with a text editor (pico/nano/vi/emacs).

When you run ServerAdmin next time, you'll see those new settings if they were entered correctly and it's a feature which ServerAdmin supports. There are many config parameters you can set which have no place in ServerAdmin, ServerAdmin just ignores them.


Jeff

Jan 16, 2006 7:23 AM in response to UptimeJeff

Huh. I swear that didn't work before (many weeks ago) but it seems to work fine now. Color me embarassed... :-/

The documentation for serveradmin is still wrong, though. The man page says you can dump settings into a file using "serveradmin settings [blah] > template", edit the template file and then reload the settings. At least in the case of mail:postfix:mynetworks this isn't true.

However my immediate problem is resolved. Thanks for the help.

modifying mail:postfix:mynetworks with serveradmin

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.