Re: nullmailer, cron email & email provider requiring appropriate "From" field
Chris Bannister wrote:
> On Sun, Feb 01, 2015 at 08:01:23AM +1300, Chris Bannister wrote:
>> On Sat, Jan 31, 2015 at 09:03:44PM +0300, Johannes Graumann wrote:
>> > Hello,
>> >
>> > I have setup nullmailer on a debian stable system of mine to forward
>> > email to the smtp server of my mykolab.com account. That account
>> > requires that "From" in the header matches the account email.
>> > Cron on my system insists to send email (as e.g. produced by a logcheck
>> > cron job) using "From" as derived from the user the executed script
>> > runs under ("logcheck", in this case) and the provider accordingly
>> > refuses the email.
>> >
>> > Googling leeds to the conclusion, that while cron on debian (stable) is
>> > accepting "MAILTO" in crontab, it doesn't accept "MAILFROM", which
>> > other distributions (Centos?) seem to have ...
>> >
>> > Can anyone propose an elegant way to solve this issue?
>> >
>> > Thank you for your consideration,
>>
>> Does this help:
>> http://www.debianhelp.co.uk/logcheck.htm
>>
>> First hit on google searching for 'logcheck email from'
>
> Oooops, I should have checked that page more carefully, doesn't mention
> setting the from.
>
> Might be easier just to install postfix :)
>
> But saw this:
> http://opensourcehacker.com/2013/01/02/sendmail-using-nullmailer-and-gmail-account-on-linux-server/
>
Switched to postfix and with the help of canonical_maps got it to work:
postfix is now rewriting from in all outgoing headers ...
Joh
Reply to: