[augeas-devel] Modifying a comma separated list in the postfix main.cf file - possible?

Graham Leggett minfrin at sharp.fm
Sat Nov 24 15:06:30 UTC 2012


Hi all,

I have a file /etc/postfix/main.cf that contains the following:

virtual_alias_maps = A, B, C

I want to perform the following three steps:

- Add a value D to the end, producing the following:

virtual_alias_maps = A, B, C, D

- Add a value E to the end, producing the following:

virtual_alias_maps = A, B, C, D, E

- Remove a value D from the comma separated list, producing the following. Notice how we don't know what position D is in the list:

virtual_alias_maps = A, B, C, E

Can this be done with the existing augeas postfix lens today? Does augeas have functionality to manipulate comma separated values, or is the only solution to this problem physically modifying the lens?

Regards,
Graham
--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4365 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20121124/b4a66beb/attachment.p7s>


More information about the augeas-devel mailing list