Change sender of Crontab mails

Moderator: crythias

Locked
erausner
Znuny newbie
Posts: 3
Joined: 05 Nov 2013, 10:37
Znuny Version: 3.1.3
Real Name: Egil Rausner

Change sender of Crontab mails

Post by erausner »

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.
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

Post by crythias »

erausner wrote:Can I change the sender address of cron mails?
erausner wrote:I'd like to send this off to a different address.
Which do you want? Sender address or recipient 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
erausner
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

Post by erausner »

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?
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

Post by crythias »

erausner wrote:It's the recipient of the output from crontab execution mail actually.
OK, there's a link to address that.
erausner wrote: Which means that crontab error messages and crontab messages in general get picked up by the postmaster script and imported into OTRS
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?)
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
erausner
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

Post by erausner »

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.
Locked