anchor.diff:    ;
   
     aliasesFile = pkgs.writeText "postfix-aliases" aliases;
  +  canonicalFile = pkgs.writeText "postfix-canonical" cfg.canonical;
     virtualFile = pkgs.writeText "postfix-virtual" cfg.virtual;
     localRecipientMapFile = pkgs.writeText "postfix-local-recipient-map" (concatMapStrings (x: x + " ACCEPT\n") cfg.localRecipients);
     checkClientAccessFile = pkgs.writeText "postfix-check-client-access" cfg.dnsBlacklistOverrides;
  
positive.code:     (mkIf haveAliases {
        services.postfix.aliasFiles.aliases = aliasesFile;
      })
      (mkIf haveTransport {
        services.postfix.mapFiles.transport = transportFile;
      })
  
negative.code: 
    haveAliases = cfg.postmasterAlias != "" || cfg.rootAlias != ""
                        || cfg.extraAliases != "";
    haveCanonical = cfg.canonical != "";
    haveTransport = cfg.transport != "";
    haveVirtual = cfg.virtual != "";
    haveLocalRecipients = cfg.localRecipients != null;
  