Matus UHLAR - fantomas: > Hello, > > the postfix' sendmail -bv option has different usage than sendmail's -bv: > > -bv Verify names only - do not try to collect or deliver a message. > Verify mode is normally used for validating users or mailing > lists. > > # sendmail -bv [email protected] > [email protected]... deliverable: mailer local, user xxx
With Postfix, that is funndamentally not possible, because deliveries happen asynchronously in the background. I'll resist the temptation to harp on the security holes that I elininated this way. OK, one: real Sendmail would import a hostile LD_LIBRARY_PATH or LD_PRELOAD setting from a local attacker, and would use that setting while it executed delivery to "|commmand" in .forward files. This allowed a local attacker to execute commands with the privileges of the recipient. > The "sendmail -bv" can be used by spamass-milter to resolve destination > user and to use that users' spamassassin preferences: > > -x Pass the recipient address through sendmail -bv, which will per? > form virtusertable and alias expansion. The resulting username > is then passed to spamc. Requires the -u flag. The spamass-mil? > ter configuration process does its best to find sendmail, but it > is possible to override this compiled-in setting via the Well that isn't going to work with Postfix. The sendmail emulation can only go so far; if you want 100%, use real sendmail. > only expanding virtual aliases should be fine. The following: (postmap -q [email protected] maptype:mapname || postmap -q @example.com) will exit with status 0 (success) if a match was found. It'll take more code to handle the third form: stripping an address extension. Let me know if you need help. Wietse
