On 05/08/17 21:30, /dev/rob0 wrote:
On Sat, Aug 05, 2017 at 07:58:19PM +0300, Marat Khalili wrote:
That's what I'd like to know to, is this hostname mention even
being used?
I doubt it is, but I am too lazy / busy to test. :)  You could also
consult your Berkeley DB documentation.

I do know that Postfix simply queries it for the localpart in a
localpart@domain, where domain is in $mydestination.  Metadata in
aliases.db is not queried.

Well, I looked it bit more into it and it quickly became exercise in software archaeology. That's what I found out:

1) It's not metadata, it's data associated with key 'YP_MASTER_NAME'.

2) It was present in sendmail and used by NIS: https://books.google.ru/books?id=NQblqMiVqvQC&pg=PT152&lpg=PT152&dq=YP_MASTER_NAME .

3) It was added to postfix in 1999 as documented in HISTORY:

19990325

        Workaround: Solaris NIS alias maps need special entries
        (YP_MASTER_NAME, YP_LAST_MODIFIED). What's worse, normal
        keys/values include a null byte at the end, but the YP_XXX
        ones don't. Problem reported by Walcir Fontanini, state
        university of Campinas, Brazil.  File: postalias/postalias.c.

4) Finally, it is currently set in postalias.c but never used indeed.

Final results: no need to change it, but if necessary it can be changed with newaliases under chroot (tested this), directly with some Berkeley DB tool (since it is just one known key-value pair), or specified in makedbm command-line. Also, this problem is not even new: see https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.nis/nis_movmastserv.htm

Thank you for the help, it was an interesting excursion for me.

--

With Best Regards,
Marat Khalili

Reply via email to