{
    "mode": "man",
    "parameter": "makedatprog",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/makedatprog/1/json",
    "generated": "2026-05-30T05:16:06Z",
    "synopsis": "makedat {-src=textfile} {-tmp=tmpfile} {-file=gdbmfile} [-cidr]",
    "sections": {
        "NAME": {
            "content": "makedat - create GDBM/DB files for maildrop\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "makedat {-src=textfile} {-tmp=tmpfile} {-file=gdbmfile} [-cidr]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The gdbm family of functions in maildrop provides access to GDBM/DB databases - simple\ndatabase files. The gdbm family of functions provide a way of quickly storing and looking up\nkey/data pairs.\n\nYou can use any program to create GDBM/DB database files.  makedat is a quick utility to\ncreate GDBM or DB files from plain text files.\n\nThe system administrator selects whether maildrop uses GDBM or DB database files and whether\nmakedat creates GDBM or DB database files as well.\n\nThe makedat command may not be available to you. GDBM/DB support in maildrop is optional, and\nthe system administrator may choose not to install GDBM/DB support and the makedat command.\n\nTo see whether GDBM or DB support is being used, run the command \"maildrop -v\".\n\nThe textfile argument to makedat is a plain text file containing key/value pairs. Each line\nin the text file contains a key value, followed by a tab and a data value. The data value may\nbe omitted, which defaults to \"1\". For example, the following three lines:\n\nexample.com\n\ndomain.com<tab>ok\n\nfoo.domain.com<tab>bad\n\nThree key/value pairs are created: example.com, value \"1\"; domain.com, value \"ok\", and\n\"foo.domain.com\", value \"bad\".\n\nEmpty lines in textfile, and lines starting with the # character, are ignored.\n\ntextfile can be \"-\", in which case standard input is used.\n\ngdbmfile is the GDBM/DB file to create. If this file exists, its existing contents are\nreplaced.\n\ntmpfile is a name of a temporary file in the same directory as gdbmfile.  tmpfile is used by\nmakedat to create the GDBM file, then tmpfile is renamed to gdbmfile.\n\nThis approach foregoes any need for locking in order to be able to dynamically update GDBM/DB\nfiles used by maildrop's gdbm functions. However, makedat does not use any locks on tmpfile,\nso multiple instances of makedat using the same tmpfile are prohibited.\n\nThe -cidr flag specifies that the key is an IP netblock in CIDR notation. This flag requires\nthe Net::CIDR Perl module to be installed separately. Download Net::CIDR from\nhttp://www.cpan.org.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "There are historical reasons why database functions in maildrop are called gdbm functions.\nThe initial implementation used GDBM functions exclusively. The ability to use the DB library\ninstead of the GDBM library has been added later.\n",
            "subsections": []
        },
        "EXAMPLE": {
            "content": "makedat blacklist /etc/mail/blacklist.tmp /etc/mail/blacklist.dat\n\nTakes blacklist, and creates /etc/mail/blacklist.dat, using /etc/mail/blacklist.tmp as a\ntemporary file.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "maildrop(1)[1], maildropgdbm(5)[2].\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "",
            "subsections": [
                {
                    "name": "Sam Varshavchik",
                    "content": "Author\n"
                }
            ]
        },
        "NOTES": {
            "content": "1. maildrop(1)\nhttp://www.courier-mta.org/maildrop/maildrop.html\n\n2. maildropgdbm(5)\nhttp://www.courier-mta.org/maildrop/maildropgdbm.html\n\n\n\nCourier Mail Server                          06/20/2015                                   MAKEDAT(1)",
            "subsections": []
        }
    },
    "summary": "makedat - create GDBM/DB files for maildrop",
    "flags": [],
    "examples": [
        "makedat blacklist /etc/mail/blacklist.tmp /etc/mail/blacklist.dat",
        "Takes blacklist, and creates /etc/mail/blacklist.dat, using /etc/mail/blacklist.tmp as a",
        "temporary file."
    ],
    "see_also": [
        {
            "name": "maildrop",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/maildrop/1/json"
        },
        {
            "name": "maildropgdbm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/maildropgdbm/5/json"
        }
    ]
}