Thanks for the hint @Dennis1993 , unluckily, the following does not seem to work:
$ sudo -u postgres psql -c "select pg_size_pretty( pg_relation_size( 'http_logs' ) );" zammad
pg_size_pretty
----------------
86 MB
(1 riga)
$ sudo -u zammad zammad run rails r 'HttpLog.cleanup(1.day)'
$ sudo -u postgres psql -c "select pg_size_pretty( pg_relation_size( 'http_logs' ) );" zammad
pg_size_pretty
----------------
86 MB
$ sudo -u postgres psql -c "vacuum full http_logs;" zammad
$ sudo -u postgres psql -c "select pg_size_pretty( pg_relation_size( 'http_logs' ) );" zammad
pg_size_pretty
----------------
29 MB
and the table is not shrinking as I would expect, since all the logs are of today. However, this is at least something I can schedule to ensure the table will stay under control.