Hello, I digged into it, and here is a fix. The problem was we use a variable aimed to be free()'d for some work on a string, thus overwriting the address we would free later. Note that without an @ in rewriteDomain, the free()'d variable p is set to zero by strrchr(), leading to a free(0) which do not make it crash but create a little memory leak.
ssmtp-rewritedomain-with@-fix.patch
Description: Binary data
pgppDVyuSscZk.pgp
Description: PGP signature