Cron Enviroment

Hi Cron Version: amd64/focal 3.0pl1-136ubuntu1 Is there a method of adding the user path to a crontab WITHOUT editing the crontab & adding 'PATH=' ?
I also can not 'MAILFROM=' to work either, this would be useful as the host does not have a dkim record and fails some mailer checks.

Status: 
Active
Virtualmin version: 
613
Webmin version: 
1962

Comments

Howdy -- thanks for contacting us!

One way to do that is by editing the user's crontab, as you mentioned, that's how I do it on my own personal systems.

You should be able to do that from within Webmin too though... try looking in Webmin -> System -> Scheduled Cron Jobs.

In there are two options.

One, is the "Manually Edit Cron Jobs". That lets you edit any cron file on the system, including the ones owned by each user.

Two, is the "Create new environment variable". I haven't tried this before, but looking at that, it appears you could use that to set a PATH or MAILTO variable for a user's cron jobs.

but not the MAILFROM ?

Sorry, I meant MAILFROM -- it should allow you to set any environment variable, not just those two.

At user level MAILTO works MAILFROM does not just uses root@host my host does not have any mail services set up so when it sends mail there is no spf/dkim/dmarc headers and other mail servers just reject or pop it into junk