<div class="gmail_quote">2012/9/5 Raphaël Berlamont <span dir="ltr"><<a href="mailto:raphael.berlamont@raphux.com" target="_blank">raphael.berlamont@raphux.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">2012/9/4 Thomas Sibley <span dir="ltr"><<a href="mailto:trs@bestpractical.com" target="_blank">trs@bestpractical.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Unrelated notes about your template below.<br>
<br>
Hmm.  Can you wrap /usr/sbin/sendmail with a tiny shell script that<br>
tee's the input somewhere else and then passes it through to the real<br>
sendmail?<br>
<br>
mv -v /usr/sbin/sendmail{,.real}<br>
cat /usr/sbin/sendmail<br>
#!/bin/bash<br>
exec tee -a /tmp/sendmail-stdin | /usr/sbin/sendmail.real "$@"<br>
^D<br>
chmod a+rx /usr/sbin/sendmail<br></blockquote></div><div><br>I've done the test 3 times, same result : logs appears in "/var/log/maillog", and nothing in "/tmp/sendmail-stdin". I don't even understand how can this be possible...<br clear="all">
</div></div></blockquote></div><br>I confirm this behaviour. I slightly modified the script  : <br>############################################<br>[root@dgilx202 ~]# cat /usr/sbin/sendmail<br>#!/bin/bash<br><br>TMP_FILE="/tmp/sendmail-stdin"<br>
echo "=====NEW SENDMAIL CALL=======" >> "${TMP_FILE}"<br>echo "`date +%Y%m%d-%H%M%S`" >> "${TMP_FILE}"<br>echo "========MESSAGE BEGIN========" >> "${TMP_FILE}"<br>
exec tee -a "${TMP_FILE}" | /usr/sbin/sendmail.real "$@"<br>echo "========MESSAGE ENDED========" >> "${TMP_FILE}"<br>echo "`date +%Y%m%d-%H%M%S`" >> "${TMP_FILE}"<br>
echo "======END SENDMAIL CALL======" >> "${TMP_FILE}"<br>[root@dgilx202 ~]#<br>############################################<br><br>And with a test, here is what I have in the log fie : <br>############################################<br>
[root@dgilx202 ~]# tail -f /tmp/sendmail-stdin<br>=====NEW SENDMAIL CALL=======<br>20120906-154906<br>========MESSAGE BEGIN========<br>========MESSAGE ENDED========<br>20120906-154906<br>======END SENDMAIL CALL======<br>^C<br>
[root@dgilx202 ~]#<br>############################################<br><br>And in the maillog, this what I have : <br>############################################<br>Sep  6 15:49:06 dgilx202 postfix/smtpd[19149]: connect from unknown[10.223.2.22]<br>
Sep  6 15:49:06 dgilx202 postfix/smtpd[19149]: 3B22B23538: client=unknown[10.223.2.22]<br>Sep  6 15:49:06 dgilx202 postfix/cleanup[19154]: 3B22B23538: message-id=<<a href="mailto:4D44666F4F0B2248A2C57DD0AF573F930ECD205E@PLA122VS151.fr.myfirm.org">4D44666F4F0B2248A2C57DD0AF573F930ECD205E@PLA122VS151.fr.myfirm.org</a>><br>
Sep  6 15:49:06 dgilx202 postfix/qmgr[1793]: 3B22B23538: from=<<a href="mailto:raphael.berlamont@myfirm.fr">raphael.berlamont@myfirm.fr</a>>, size=1803, nrcpt=1 (queue active)<br>Sep  6 15:49:06 dgilx202 postfix/smtpd[19149]: disconnect from unknown[10.223.2.22]<br>
Sep  6 15:49:06 dgilx202 postfix/sendmail[19225]: fatal: <a href="mailto:rt-test@myfirm.fr">rt-test@myfirm.fr</a>(48): No recipient addresses found in message header<br>Sep  6 15:49:06 dgilx202 postfix/local[19155]: 3B22B23538: to=<<a href="mailto:RT-Test@rt.myfirm.com">RT-Test@rt.myfirm.com</a>>, relay=local, delay=0.6, delays=0.02/0/0/0.58, dsn=2.0.0, status=sent (delivered to command: /opt/rt4/bin/rt-mailgate --queue 'Test Queue' --action correspond --url <a href="https://rt.myfirm.com">https://rt.myfirm.com</a>)<br>
Sep  6 15:49:06 dgilx202 postfix/qmgr[1793]: 3B22B23538: removed<br>############################################<br><br>So I can now tell that sendmail IS called, but nothing is piped in, or it crashs before RT can pipe anything in it...<br>
<br>Idea ?<br><br>-- <br>Raphaël Berlamont<br>