PostfixAdmin historically didn't send much (a welcome email?) email - and would have probably have been installed on the Postfix server - so could get away with sending everything locally.
It's probably past time that it was changed to use an SMTP library, which would hopefully add support for the various SSL parameters you're referencing.
For now, i doubt it's possible - to do much more than what fsockopen() supports - i.e. using a ssl://localhost style url for the smtp server config parameter.
(see: https://www.php.net/fsockopen )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
would have probably have been installed on the Postfix server - so could get away with sending everything locally.
...
It's probably past time that it was changed to use an SMTP library
to be fair, different strokes, right?
my own policies are that all submission/transports/relays -- local or otherwise -- need to have auth/access controls available; and most of that's migrated to mandatory already.
in practice here, that means every connection/handshake is locked down with SSL cert verification, with tighetened protocols/ciphers.
sure, a bit more work up front to setup, but distributes/scales far more easily; once setup correctly, moving the SMTP server 'elsewhere', changing certs, etc becomes a trivial exercise.
and, with those^ policies in-place & widespread around here, what's "past" is my option to re-introduce 'weaker' security. tbh, a PITA, some days ...
"The function stream_socket_client() is similar but provides a richer set of options, including non-blocking connection and the ability to provide a stream context. "
i'm adding postfixadmin to a working dovecot+postfix setup.
for mail sending, i use dovecot's submission protocol, with required SSL cert verification; config includes,
all SMTP clients must provide cert+CA for certificate-based send authentication.
for php clients, configs must provide the connection auth data; e.g., for Roundcube client,
additional/required php SSL context options (https://www.php.net/manual/en/context.ssl.php) are readily specified,
with that^ typical config, connect+submit works as intended, & without error.
in postfixadmin, checking for any relevant config opts, only finds,
with just
specified, postfixadmin mail send fails, clearly for missing CA/crt data,
how/where are required SSL context params configured for use by Postfixadmin's SMTP send function?
Last edit: pgnd 2020-09-13
Hi -
PostfixAdmin historically didn't send much (a welcome email?) email - and would have probably have been installed on the Postfix server - so could get away with sending everything locally.
Because of this, PostfixAdmin has only basic SMTP sending functionality - see https://github.com/postfixadmin/postfixadmin/blob/3d46ec795969f76604a8ed522df130548ae428c2/functions.inc.php#L1408
It's probably past time that it was changed to use an SMTP library, which would hopefully add support for the various SSL parameters you're referencing.
For now, i doubt it's possible - to do much more than what fsockopen() supports - i.e. using a ssl://localhost style url for the smtp server config parameter.
(see: https://www.php.net/fsockopen )
to be fair, different strokes, right?
my own policies are that all submission/transports/relays -- local or otherwise -- need to have auth/access controls available; and most of that's migrated to mandatory already.
in practice here, that means every connection/handshake is locked down with SSL cert verification, with tighetened protocols/ciphers.
sure, a bit more work up front to setup, but distributes/scales far more easily; once setup correctly, moving the SMTP server 'elsewhere', changing certs, etc becomes a trivial exercise.
and, with those^ policies in-place & widespread around here, what's "past" is my option to re-introduce 'weaker' security. tbh, a PITA, some days ...
That page does mention:
"The function stream_socket_client() is similar but provides a richer set of options, including non-blocking connection and the ability to provide a stream context. "
@
the function does apparently support the ssl context options ... which should, in principle, be sufficient.
i don't have a sense for how "similar" it is; is it a simple (nearly) drop-in replacement?
taking a look at RoundCubeMail's approach
may be of interest.
There's also PhpMailer
that's a comprehensive mailer lib.
it certainly provides the capabilities required
it might be easily included, but may be vast overkill ....