[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[msmtp-users] patch msmtp to add custom header
Hello,
I would like to use msmtp as sendmail for CGI/PHP scripts.
For CGI scripts I would like to push extra header line to SMTP server which
would append UID of process that executed msmtp to mail headers
(e.g. "X-Sending-UID: %d"), to make searching for broken scripts in case of
spam outbreak easier (we use suexec, so each user's scripts are executed
under their UID). PHP has such functionality (if patched with the mail
header patch) but CGI is something different :)
Can anyone help me with this?
I looked at the source code and I see that msmtp_read_addresses() under some
circumstances writes mail headers tmpfile that contains headers AND the
final newline, so msmtp_sendmail() that does the main work does something
different when tmpfile exists.
Any idea how to patch msmtp as clean as possible?
Thank you.
--
Matus UHLAR - fantomas, uhlar@...186... ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux is like a teepee: no Windows, no Gates and an apache inside...