Sendmail Alias Pipe

Here is a sendmail configuration that leverages Command line message injection. With this method, LTMP is not used at all.


virtusertable

test@example.com                example-test
test-request@example.com        example-test
test-owner@example.com          example-test
test-join@example.com           example-test
test-leave@example.com          example-test
test-bounces@example.com        example-test

aliases

example-test:                   "|mailman inject test.example.com"

sm.bin

To be able to pipe to the mailman script you need to add a symlink to it in the sm.bin directory, either /usr/libexec/sm.bin or /usr/local/libexec/sm.bin depending on if you are using sendmail from the base or ports system.

ln -s /usr/local/bin/mailman /usr/local/libexec/sm.bin

groups

Finally, sendmail needs to be able to write in Mailman directories and write to Mailman files. To do this add group mailnull to user mailman:

mailman:*:91:mailnull

Getting the permissions right can be tricky. Here the log files are your friends.


Back to the main page

Copyright © 2026
Craig Leres