On 30/11/2012 2:04 PM, Martin Lambers wrote:
On Thu, 29 Nov 2012 21:39:32 -0400, Chris Purves wrote:I'm having problems with the output of cron jobs. cron sets the From header as root, but does not include the domain. My email is then rejected because it doesn't include a proper email address in the From header.Is the mail rejected because of the From header, or because of the envelope from address? What's the error message you get?
It's because of the From header. The envelope-from is fine. The message I receive is:
'550 No verifiable sender address in message headers'
If you really need a different From header, then you need to configure cron to generate one - msmtp only sends the mail, it does not care about its contents. If cron cannot be configured in this way, you could use procmail.
I think the problem is cron because the MTA should be told who it's from, but I think that cron assumes the mail will be delivered locally so only includes the user. From what I could find, cron cannot be configured to include the email address.
I can take a look at procmail. I want something very lightweight for sending out results from cron jobs. msmtp seemed perfect until I realized it wasn't sending cron output. It will send results from 'at', however.
I should point out that the server that rejects the email is controlled by me and running exim, so I can try to handle it from that end as well.
-- Chris Purves Visit my blog: http://chris.northfolk.ca"It's not the end of the world, but you can see it from there." - Pierre Trudeau