Hi,
Can I change the sender address of cron mails? If so, where?
Every now and then a mail comes out of the crontab executions and I'd like to send this off to a different address.
Thanks.
Change sender of Crontab mails
Moderator: crythias
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Change sender of Crontab mails
erausner wrote:Can I change the sender address of cron mails?
Which do you want? Sender address or recipient address?erausner wrote:I'd like to send this off to a different address.
And *which* cron job do you want to change? Note that all jobs in otrs/var/cron are concatenated into one crontab file, I believe in alphabetical order, so you'll have to change the recipient "back" as appropriate.
Also, note that the crontab itself is only going to email what would show up as errors (or printed to the screen) as the job runs. Meanwhile the *job* might follow its own course and ignore anything crontab because it is alerting for pending jobs or such.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 3
- Joined: 05 Nov 2013, 10:37
- Znuny Version: 3.1.3
- Real Name: Egil Rausner
Re: Change sender of Crontab mails
It's the recipient of the output from crontab execution mail actually.
The crontabs for user "otrs" is what I'd like to change recipient for. I've looked in the procmail and it's as if there is done a filtering and then it's handed off to some script or handler.
I've also noticed that the recipient is already the same as the default email address in email setting, bound to one of the queues. Which means that crontab error messages and crontab messages in general get picked up by the postmaster script and imported into OTRS. That's what I'm trying to avoid by changing the recipient to another email address. Is that doable?
What do you mean I'll have to change the recipient back?
The crontabs for user "otrs" is what I'd like to change recipient for. I've looked in the procmail and it's as if there is done a filtering and then it's handed off to some script or handler.
I've also noticed that the recipient is already the same as the default email address in email setting, bound to one of the queues. Which means that crontab error messages and crontab messages in general get picked up by the postmaster script and imported into OTRS. That's what I'm trying to avoid by changing the recipient to another email address. Is that doable?
What do you mean I'll have to change the recipient back?
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Change sender of Crontab mails
OK, there's a link to address that.erausner wrote:It's the recipient of the output from crontab execution mail actually.
Crontabs run as user will tend to send to the user's email account, but unless you're directly receiving emails to otrs@localhost and using procmail to parse OR you've aliased otrs@localhost to support@yourdomain (or whatever your email is) you'll likely not see it as a ticket. But if you are seeing it as ticket, then change the MAILTO in the first cron job (aaa something?)erausner wrote: Which means that crontab error messages and crontab messages in general get picked up by the postmaster script and imported into OTRS
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 3
- Joined: 05 Nov 2013, 10:37
- Znuny Version: 3.1.3
- Real Name: Egil Rausner
Re: Change sender of Crontab mails
Thank you.
The mailto value was root@localhost, but I had trouble finding the forward or alias for root.
Now the OTRS crontabs are forwarded to another email.
The mailto value was root@localhost, but I had trouble finding the forward or alias for root.
Now the OTRS crontabs are forwarded to another email.