NAME

Langertha::Holmgang::Sim::Linux::Postfix - Postfix on a simulated Linux server — postconf, postmap, newaliases, queue

VERSION

version 0.001

SYNOPSIS

# from the Linux simulator: postconf, postfix, postmap, postalias, newaliases, postqueue, mailq, postsuper, postcat
Langertha::Holmgang::Sim::Linux::Postfix::prepare( $dev );       # when the case loads

DESCRIPTION

Postfix 3.7 (Debian 12, service postfix) on a device of type linux (cai-platform docs/entwurf-evals.md §3.3.1). /etc/postfix/main.cf and the tables are files under files; the state lives under postfix:

postfix:
  running: { relayhost: "[smtp.example.net]:587", … }   # loaded parameters; if missing, prepare() reads main.cf
  queue:
    - { id: 4F2A11C0D3, from: a@example.com, to: [ b@example.org ], size: 2311,
        time: "Tue Oct 20 08:12:01", queue: deferred,                 # deferred | hold | active
        reason: "connect to …: Connection timed out",
        deliver_when: [ { path: [ postfix, running, relayhost ], equals: "[smtp.example.net]:587" } ] }
  delivered: [ … ]                                         # by the simulator: delivered IDs
  deleted:   [ … ]                                         # by the simulator: deleted IDs

Commands: postconf [-n|-d|-h] [name …], postconf -e 'name = value' …, postconf -X name …, postfix check|reload|status|flush|start|stop, postmap [-q key] [type:]file (builds file.db from the file; mode and owner as the source), postalias/newaliases (/etc/aliases.db), postqueue -p|-f|-i id, mailq, postsuper -d|-h|-H|-r id|ALL [queue] (- reads IDs from the input), postcat -q id; systemctl reload|restart postfix like postfix reload.

Like Postfix: postconf reads and writes the file; what is running only changes with postfix reload (or a restart). Numeric parameters take no unit (message_size_limit = 50M is an error, reload fails: bad numerical configuration). A lookup (postmap -q) and delivery read the built .db, not the text file. postqueue -f delivers every deferred message whose deliver_when (expectations on the device's state as in rules) holds; the others (and every one without deliver_when) stay.

parse_main

my $p = parse_main($text);   # { name => value } — set parameters only, whitespace collapsed

prepare

When the case loads: postfix.running from main.cf if it is missing.

service_event

From the Linux simulator on systemctl start|restart|reload of the service postfix: loads main.cf; an error makes the command fail (die).

postconf

postconf (see above).

postfix

postfix check|reload|status|flush|start|stop.

postmap

postmap, postalias, newaliases (the fourth value names the program).

postqueue

postqueue -p|-f|-i id, mailq.

postsuper

postsuper -d|-h|-H|-r id|ALL|- [queue].

postcat

postcat -q id.

SUPPORT

Issues

Please report bugs and feature requests at https://github.com/Getty/langertha-holmgang/issues.

IRC

Join #langertha on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.