Differences between revisions 14 and 15
Revision 14 as of 2023-06-04 12:18:14
Size: 1567
Editor: PieterSmit
Comment:
Revision 15 as of 2024-02-08 09:50:04
Size: 1911
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:

== Verify smtp ssl/tls certificate ==

 * {{{
printf 'quit\n' | openssl s_client -connect mail.example.com:25 -starttls smtp | openssl x509 -dates -noout

printf 'quit\n' | openssl s_client -connect smtp.vigor.nz:25 -starttls smtp | openssl x509 -dates -text | grep "verify\|notAfter=\|vigor\|SAN\|DNS:\|Subject Alternative Name:"
}}}

SMTP Simple mail transfer protocol

SMTP / Email spoof tests

Check / Removal spam lists

Verify smtp ssl/tls certificate

  • printf 'quit\n' | openssl s_client -connect mail.example.com:25 -starttls smtp | openssl x509 -dates -noout
    
    printf 'quit\n' | openssl s_client -connect smtp.vigor.nz:25 -starttls smtp | openssl x509 -dates -text | grep "verify\|notAfter=\|vigor\|SAN\|DNS:\|Subject Alternative Name:"

Debug smtp sasl starttls authentication

  • Connect and move to tls protected channel

    $ openssl s_client -starttls smtp -crlf -connect vigor.nz:25
    ehlo testconnection
    auth plain (base64encodedstring)
  • test sasl (/etc/sasldb2 )with

    # sasldblistusers2
    # testsaslauthd -u user -p password -f /var/spool/postfix/var/run/saslauthd/mux
  • add user to sasl

    saslpasswd -c -u mail.example.com -a smtpauth test
  • view postfix smtp logs using journalctl

    journalctl -u postfix@-.service  -f
  • Check tls certificate on smtp server

    # echo "quit" | openssl s_client -starttls smtp -crlf -connect <smtp.host>:25 | openssl x509 -noout -text | grep DNS:

...

smtp (last edited 2024-02-08 09:50:04 by PieterSmit)