Gah, work-arounds
I wanted to setup a simple cron job that would send an output of a simple file to a simple e-mail address.. something like..
tail -10 whatever.txt | mail -s "here's whatever" whomever@spamme.com
No, of course that's too easy.. when you use a picky postfix server that rejects addresses like, say root@hostname as invalid..
Back to the drawing board... Write a complex perl script or see if there's any way of doing this with a shell one-liner.. and this is where postfix compatibility with sendmail really pays off..
tail -10 whatever.txt | sendmail -f dumbass@localhost.com -s "here's whatever" whomever@spamme.com
Voila.. Reply-to is set, postifx is happy.. a one liner after all.
I'm a bit annoyed that I couldn't find a way of doing this with mail though.. Google failed me..
(yes, save your "reconfigure postifx" comments.. that's unnecessary and too much work)
Comments
Would it have working with mail if you'd used '<spamme@hostname>' instead of 'spamme@hostname'?
Posted by: Derek | July 7, 2003 11:41 PM
Nope.. that wouldn't work :)
Posted by: kasia | July 8, 2003 02:05 PM