I came to this solution, a bash script to validate a local recipient employing the SMTP protocol.


#!/bin/bash

nc localhost 25 << EOF | grep '250 2.1.5 Ok' | sed 's/250 2.1.5 Ok/OK/'
 HELO localhost
 MAIL FROM: <dim...@thessaloniki.gr>
 RCPT TO: <$1>
 QUIT
EOF

Dimitrios



O/H Wietse Venema έγραψε:
????????? ???????????:
Hi !

Is there any Programming Interface (api) , so that a Postfix instance
could be accessed programmaticaly, say, a C program?

Currently,  all the SUPPORTED interfaces require that non-Postfix
code communicates with Postfix via some protocol:  examples are
the SMTP protocol, the pipe-to-command protocol, the SMTPD policy
protocol, the Milter protocol, and a simple TCP-based lookup table.

for example, connect to a Postfix instance and validate if an e-mail
address is a valid recipient  for the specific instance...

You can already do this with the existing SMTP interface.

        Wietse

Reply via email to