* [gentoo-user] /etc/crontab - sending notification to a different user
@ 2024-08-27 5:10 syscon edm
2024-08-27 7:05 ` Joost Roeleveld
2024-08-31 17:20 ` [gentoo-user] " ralfconn
0 siblings, 2 replies; 13+ messages in thread
From: syscon edm @ 2024-08-27 5:10 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
In "/etc/crontab" I have:
# for cronie
# Global variables
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=syscon8
HOME=/
But when it run a cron-job, the email is still going to "root@gmail.com"
instead of syscon8@gmail.com
How to adjust the entry to the email notification will go to a specific
user.
[-- Attachment #2: Type: text/html, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-27 5:10 [gentoo-user] /etc/crontab - sending notification to a different user syscon edm
@ 2024-08-27 7:05 ` Joost Roeleveld
2024-08-27 17:09 ` syscon edm
2024-08-31 17:20 ` [gentoo-user] " ralfconn
1 sibling, 1 reply; 13+ messages in thread
From: Joost Roeleveld @ 2024-08-27 7:05 UTC (permalink / raw
To: gentoo-user
----------------------- Original message -----------------------
From: syscon edm <syscon780@gmail.com >
To: gentoo-user@lists.gentoo.org
Date: Tue, 27 Aug 2024 07:10:18 +0200
----------------------------------------------------------------
>
> In "/etc/crontab" I have:
> # for cronie
>
> # Global variables
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=syscon8
> HOME=/
> But when it run a cron-job, the email is still going to
> "mailto:root@gmail.com " instead of mailto:syscon8@gmail.com
> How to adjust the entry to the email notification will go to a specific user.
Specify the full email address instead of just a username.
--
Joost
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-27 7:05 ` Joost Roeleveld
@ 2024-08-27 17:09 ` syscon edm
2024-08-27 20:14 ` J. Aho
0 siblings, 1 reply; 13+ messages in thread
From: syscon edm @ 2024-08-27 17:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
That is not it.
I changed in /etc/crontab
MAILTO=syscon8@gmail.com
restart cronie but system is still emailing it to root@gmail.com
On Tue, Aug 27, 2024 at 1:49 AM Joost Roeleveld <joost@antarean.org> wrote:
>
>
> ----------------------- Original message -----------------------
> From: syscon edm <syscon780@gmail.com >
> To: gentoo-user@lists.gentoo.org
> Date: Tue, 27 Aug 2024 07:10:18 +0200
> ----------------------------------------------------------------
>
> >
> > In "/etc/crontab" I have:
>
> > # for cronie
> >
> > # Global variables
> > SHELL=/bin/bash
> > PATH=/sbin:/bin:/usr/sbin:/usr/bin
> > MAILTO=syscon8
> > HOME=/
>
> > But when it run a cron-job, the email is still going to
> > "mailto:root@gmail.com " instead of mailto:syscon8@gmail.com
>
> > How to adjust the entry to the email notification will go to a specific
> user.
>
> Specify the full email address instead of just a username.
>
> --
> Joost
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1754 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-27 17:09 ` syscon edm
@ 2024-08-27 20:14 ` J. Aho
2024-08-31 16:56 ` Michael
0 siblings, 1 reply; 13+ messages in thread
From: J. Aho @ 2024-08-27 20:14 UTC (permalink / raw
To: gentoo-user
On 27/08/2024 19.09, syscon edm wrote:
> That is not it.
>
> I changed in /etc/crontab
> MAILTO=syscon8@gmail.com <mailto:syscon8@gmail.com>
>
> restart cronie but system is still emailing it to root@gmail.com
> <mailto:root@gmail.com>
What job is run? Some jobs has their own configuration to where the mail
is sent.
You could give an example...
--
//Aho
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-27 20:14 ` J. Aho
@ 2024-08-31 16:56 ` Michael
2024-08-31 19:11 ` syscon edm
0 siblings, 1 reply; 13+ messages in thread
From: Michael @ 2024-08-31 16:56 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
On Tuesday, 27 August 2024 21:14:56 BST J. Aho wrote:
> On 27/08/2024 19.09, syscon edm wrote:
> > That is not it.
> >
> > I changed in /etc/crontab
> > MAILTO=syscon8@gmail.com <mailto:syscon8@gmail.com>
Does it work if you try:
MAILTO="syscon8@gmail.com"
> > restart cronie but system is still emailing it to root@gmail.com
> > <mailto:root@gmail.com>
>
> What job is run? Some jobs has their own configuration to where the mail
> is sent.
> You could give an example...
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-27 5:10 [gentoo-user] /etc/crontab - sending notification to a different user syscon edm
2024-08-27 7:05 ` Joost Roeleveld
@ 2024-08-31 17:20 ` ralfconn
1 sibling, 0 replies; 13+ messages in thread
From: ralfconn @ 2024-08-31 17:20 UTC (permalink / raw
To: gentoo-user
Il 27/08/24 07:10, syscon edm ha scritto:
> In "/etc/crontab" I have:
> # for cronie
>
> # Global variables
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=syscon8
> HOME=/
>
> But when it run a cron-job, the email is still going to "root@gmail.com
> <mailto:root@gmail.com>" instead of syscon8@gmail.com
> <mailto:syscon8@gmail.com>
>
> How to adjust the entry to the email notification will go to a specific
> user.
I suppose you want email delivered through an external email server. I
had to configure the MTA for that, nullmailer in my case, it's not
cronie's job.
raffaele
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-31 16:56 ` Michael
@ 2024-08-31 19:11 ` syscon edm
2024-08-31 19:16 ` Michael
0 siblings, 1 reply; 13+ messages in thread
From: syscon edm @ 2024-08-31 19:11 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]
>> MAILTO="syscon8@gmail.com"
MAILTO="syscon8@gmail.com"
MAILTO='syscon8@gmail.com'
MAILTO=syscon8
I've tried single quote, double quotes, but it doesn't work; now even
without quotes I don't get email from cronie
After every change I restart "/etc/init.d/cronie restart
My simple cron entry:
55 12 * * 1-5 mv /var/spool/asterisk/monitor/* /home/thelma/mon/
I should receive email from cron
On Sat, Aug 31, 2024 at 10:57 AM Michael <confabulate@kintzios.com> wrote:
> On Tuesday, 27 August 2024 21:14:56 BST J. Aho wrote:
> > On 27/08/2024 19.09, syscon edm wrote:
> > > That is not it.
> > >
> > > I changed in /etc/crontab
> > > MAILTO=syscon8@gmail.com <mailto:syscon8@gmail.com>
>
> Does it work if you try:
>
> MAILTO="syscon8@gmail.com"
>
>
> > > restart cronie but system is still emailing it to root@gmail.com
> > > <mailto:root@gmail.com>
> >
> > What job is run? Some jobs has their own configuration to where the mail
> > is sent.
> > You could give an example...
>
>
[-- Attachment #2: Type: text/html, Size: 2029 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-31 19:11 ` syscon edm
@ 2024-08-31 19:16 ` Michael
2024-08-31 19:34 ` syscon edm
0 siblings, 1 reply; 13+ messages in thread
From: Michael @ 2024-08-31 19:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
On Saturday, 31 August 2024 20:11:34 BST syscon edm wrote:
> >> MAILTO="syscon8@gmail.com"
>
> MAILTO="syscon8@gmail.com"
> MAILTO='syscon8@gmail.com'
> MAILTO=syscon8
>
> I've tried single quote, double quotes, but it doesn't work; now even
> without quotes I don't get email from cronie
> After every change I restart "/etc/init.d/cronie restart
>
> My simple cron entry:
> 55 12 * * 1-5 mv /var/spool/asterisk/monitor/* /home/thelma/mon/
>
> I should receive email from cron
What errors do you get from your MTA in your logs? Increase verbosity if you
need to get more info.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-31 19:16 ` Michael
@ 2024-08-31 19:34 ` syscon edm
2024-08-31 20:16 ` Michael
0 siblings, 1 reply; 13+ messages in thread
From: syscon edm @ 2024-08-31 19:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2228 bytes --]
Sorry, the cron entry should be:
55 12 * * * mv /var/spool/asterisk/monitor/* /home/thelma/mon/
1-5 is Monday to Friday
mail.log:
Aug 31 13:24:01 i5 postfix/qmgr[32301]: 0880F17E00EB: from=<
syscon8@gmail.com>, size=699, nrcpt=1 (queue active)
Aug 31 13:24:02 i5 postfix/smtp[9110]: 0880F17E00EB: to=<root@gmail.com>,
orig_to=<root>, relay=smtp.gmail.com[142.250.99.108]:587, delay=1.3,
delays=0.02/0.01/0.55/0.68, dsn=2.0.0, status=sent (250 2.0.0 OK
1725132231 98e67ed59e1d1-2d85b0fdf44sm6088797a91.6 - gsmtp)
Aug 31 13:24:02 i5 postfix/qmgr[32301]: 0880F17E00EB: removed
Gmail is accepting the mail but it is sending to "root" instead of "syscon8"
My cat /etc/mail/aliases
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: postmaster
postmaster: root
# General redirections for pseudo accounts.
adm: root
bin: root
daemon: root
exim: root
lp: root
mail: root
named: root
nobody: root
postfix: root
# Well-known aliases -- these should be filled in!
root: syscon8@gmail.com
fd: syscon8@gmail.com
# operator:
# Standard RFC2142 aliases
abuse: postmaster
ftp: root
hostmaster: root
news: usenet
noc: root
security: root
usenet: root
uucp: root
webmaster: root
www: webmaster
On Sat, Aug 31, 2024 at 1:17 PM Michael <confabulate@kintzios.com> wrote:
> On Saturday, 31 August 2024 20:11:34 BST syscon edm wrote:
> > >> MAILTO="syscon8@gmail.com"
> >
> > MAILTO="syscon8@gmail.com"
> > MAILTO='syscon8@gmail.com'
> > MAILTO=syscon8
> >
> > I've tried single quote, double quotes, but it doesn't work; now even
> > without quotes I don't get email from cronie
> > After every change I restart "/etc/init.d/cronie restart
> >
> > My simple cron entry:
> > 55 12 * * 1-5 mv /var/spool/asterisk/monitor/* /home/thelma/mon/
> >
> > I should receive email from cron
>
> What errors do you get from your MTA in your logs? Increase verbosity if
> you
> need to get more info.
[-- Attachment #2: Type: text/html, Size: 3354 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-31 19:34 ` syscon edm
@ 2024-08-31 20:16 ` Michael
2024-08-31 20:56 ` syscon edm
0 siblings, 1 reply; 13+ messages in thread
From: Michael @ 2024-08-31 20:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2074 bytes --]
On Saturday, 31 August 2024 20:34:49 BST syscon edm wrote:
> Sorry, the cron entry should be:
> 55 12 * * * mv /var/spool/asterisk/monitor/* /home/thelma/mon/
> 1-5 is Monday to Friday
>
> mail.log:
>
> Aug 31 13:24:01 i5 postfix/qmgr[32301]: 0880F17E00EB: from=<
> syscon8@gmail.com>, size=699, nrcpt=1 (queue active)
> Aug 31 13:24:02 i5 postfix/smtp[9110]: 0880F17E00EB: to=<root@gmail.com>,
> orig_to=<root>,
You probably have in your /etc/postfix/main.cf:
myorigin = $some_user@some_domain.com
where some_user@some_domain.com is not syscon8@gmail.com, but root@*?
> relay=smtp.gmail.com[142.250.99.108]:587, delay=1.3,
> delays=0.02/0.01/0.55/0.68, dsn=2.0.0, status=sent (250 2.0.0 OK
> 1725132231 98e67ed59e1d1-2d85b0fdf44sm6088797a91.6 - gsmtp)
> Aug 31 13:24:02 i5 postfix/qmgr[32301]: 0880F17E00EB: removed
>
> Gmail is accepting the mail but it is sending to "root" instead of "syscon8"
>
> My cat /etc/mail/aliases
> # Basic system aliases -- these MUST be present.
> MAILER-DAEMON: postmaster
> postmaster: root
>
> # General redirections for pseudo accounts.
> adm: root
> bin: root
> daemon: root
> exim: root
> lp: root
> mail: root
> named: root
> nobody: root
> postfix: root
>
> # Well-known aliases -- these should be filled in!
> root: syscon8@gmail.com
> fd: syscon8@gmail.com
> # operator:
>
> # Standard RFC2142 aliases
> abuse: postmaster
> ftp: root
> hostmaster: root
> news: usenet
> noc: root
> security: root
> usenet: root
> uucp: root
> webmaster: root
> www: webmaster
You can grep your postfix files for root and root@ to find the culprit. It
seems your postfix configuration is rewriting the 'Send As' name, if not whole
address. My Postfix knowledge is rather out of date, but current users should
be able to advise with a specific fix for this problem.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-31 20:16 ` Michael
@ 2024-08-31 20:56 ` syscon edm
2024-09-01 9:23 ` Michael
0 siblings, 1 reply; 13+ messages in thread
From: syscon edm @ 2024-08-31 20:56 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2889 bytes --]
In /etc/postfix/main.cf I only have:
myorigin = gmail.com
If I use:
myorigin = syscon8@gmail.com
I get an error message;
Aug 31 14:28:02 i5 postfix/smtp[25841]: 1A31217E00EC: to=<root@syscon8@
gmail.com>, relay=smtp.gmail.com[142.250.99.109]:587, delay=0.54,
delays=0.01/0/0.5/0.03, dsn=5.1.3, status=bounced (host
smtp.gmail.com[142.250.99.109]
said: 553-5.1.3 The recipient address <root@syscon8@gmail.com> is not a
valid RFC 553-5.1.3 5321 address.
my /etc/postfix/sender_canonical
/^root@gmail\.com$/ syscon8@gmail.com
On Sat, Aug 31, 2024 at 2:17 PM Michael <confabulate@kintzios.com> wrote:
> On Saturday, 31 August 2024 20:34:49 BST syscon edm wrote:
> > Sorry, the cron entry should be:
> > 55 12 * * * mv /var/spool/asterisk/monitor/* /home/thelma/mon/
> > 1-5 is Monday to Friday
> >
> > mail.log:
> >
> > Aug 31 13:24:01 i5 postfix/qmgr[32301]: 0880F17E00EB: from=<
> > syscon8@gmail.com>, size=699, nrcpt=1 (queue active)
> > Aug 31 13:24:02 i5 postfix/smtp[9110]: 0880F17E00EB: to=<root@gmail.com
> >,
> > orig_to=<root>,
>
> You probably have in your /etc/postfix/main.cf:
>
> myorigin = $some_user@some_domain.com
>
> where some_user@some_domain.com is not syscon8@gmail.com, but root@*?
>
>
> > relay=smtp.gmail.com[142.250.99.108]:587, delay=1.3,
> > delays=0.02/0.01/0.55/0.68, dsn=2.0.0, status=sent (250 2.0.0 OK
> > 1725132231 98e67ed59e1d1-2d85b0fdf44sm6088797a91.6 - gsmtp)
> > Aug 31 13:24:02 i5 postfix/qmgr[32301]: 0880F17E00EB: removed
> >
> > Gmail is accepting the mail but it is sending to "root" instead of
> "syscon8"
> >
> > My cat /etc/mail/aliases
> > # Basic system aliases -- these MUST be present.
> > MAILER-DAEMON: postmaster
> > postmaster: root
> >
> > # General redirections for pseudo accounts.
> > adm: root
> > bin: root
> > daemon: root
> > exim: root
> > lp: root
> > mail: root
> > named: root
> > nobody: root
> > postfix: root
> >
> > # Well-known aliases -- these should be filled in!
> > root: syscon8@gmail.com
> > fd: syscon8@gmail.com
> > # operator:
> >
> > # Standard RFC2142 aliases
> > abuse: postmaster
> > ftp: root
> > hostmaster: root
> > news: usenet
> > noc: root
> > security: root
> > usenet: root
> > uucp: root
> > webmaster: root
> > www: webmaster
>
> You can grep your postfix files for root and root@ to find the culprit.
> It
> seems your postfix configuration is rewriting the 'Send As' name, if not
> whole
> address. My Postfix knowledge is rather out of date, but current users
> should
> be able to advise with a specific fix for this problem.
>
[-- Attachment #2: Type: text/html, Size: 4574 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/crontab - sending notification to a different user
2024-08-31 20:56 ` syscon edm
@ 2024-09-01 9:23 ` Michael
2024-09-03 2:00 ` [gentoo-user] [SOLVED] " syscon edm
0 siblings, 1 reply; 13+ messages in thread
From: Michael @ 2024-09-01 9:23 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]
On Saturday, 31 August 2024 21:56:59 BST syscon edm wrote:
> In /etc/postfix/main.cf I only have:
>
> myorigin = gmail.com
>
> If I use:
> myorigin = syscon8@gmail.com
>
> I get an error message;
> Aug 31 14:28:02 i5 postfix/smtp[25841]: 1A31217E00EC: to=<root@syscon8@
> gmail.com>,
OK, I expect you'd need to set an alias instead. Try:
My cat /etc/mail/aliases
# Basic system aliases -- these MUST be present.
# Redirect mail for local recipients
MAILER-DAEMON: postmaster
postmaster: root
root: syscon8
or try:
root: syscon8@gmail.com
then run 'newaliases' each time to rebuild the database. One of these aliases
ought to work.
> relay=smtp.gmail.com[142.250.99.109]:587, delay=0.54,
> delays=0.01/0/0.5/0.03, dsn=5.1.3, status=bounced (host
> smtp.gmail.com[142.250.99.109]
> said: 553-5.1.3 The recipient address <root@syscon8@gmail.com> is not a
> valid RFC 553-5.1.3 5321 address.
>
> my /etc/postfix/sender_canonical
> /^root@gmail\.com$/ syscon8@gmail.com
I don't think you should be using canonical - this will be rewriting addresses
within the header *and* body of messages.
Use an alias instead.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] [SOLVED] /etc/crontab - sending notification to a different user
2024-09-01 9:23 ` Michael
@ 2024-09-03 2:00 ` syscon edm
0 siblings, 0 replies; 13+ messages in thread
From: syscon edm @ 2024-09-03 2:00 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]
On Sun, Sep 1, 2024 at 3:24 AM Michael <confabulate@kintzios.com> wrote:
> On Saturday, 31 August 2024 21:56:59 BST syscon edm wrote:
> > In /etc/postfix/main.cf I only have:
> >
> > myorigin = gmail.com
> >
> > If I use:
> > myorigin = syscon8@gmail.com
> >
> > I get an error message;
> > Aug 31 14:28:02 i5 postfix/smtp[25841]: 1A31217E00EC: to=<root@syscon8@
> > gmail.com>,
>
> OK, I expect you'd need to set an alias instead. Try:
>
> My cat /etc/mail/aliases
> # Basic system aliases -- these MUST be present.
> # Redirect mail for local recipients
> MAILER-DAEMON: postmaster
> postmaster: root
> root: syscon8
>
> or try:
>
> root: syscon8@gmail.com
>
>
> then run 'newaliases' each time to rebuild the database. One of these
> aliases
> ought to work.
>
>
> > relay=smtp.gmail.com[142.250.99.109]:587, delay=0.54,
> > delays=0.01/0/0.5/0.03, dsn=5.1.3, status=bounced (host
> > smtp.gmail.com[142.250.99.109]
> > said: 553-5.1.3 The recipient address <root@syscon8@gmail.com> is not a
> > valid RFC 553-5.1.3 5321 address.
> >
> > my /etc/postfix/sender_canonical
> > /^root@gmail\.com$/ syscon8@gmail.com
>
> I don't think you should be using canonical - this will be rewriting
> addresses
> within the header *and* body of messages.
>
> Use an alias instead.
>
Thank you folks for suggestions, but none of them worked.
What work is to put in the first line of: "crontab" file:
MAILTO=syscon8@gmail.com
[-- Attachment #2: Type: text/html, Size: 2636 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-09-03 2:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 5:10 [gentoo-user] /etc/crontab - sending notification to a different user syscon edm
2024-08-27 7:05 ` Joost Roeleveld
2024-08-27 17:09 ` syscon edm
2024-08-27 20:14 ` J. Aho
2024-08-31 16:56 ` Michael
2024-08-31 19:11 ` syscon edm
2024-08-31 19:16 ` Michael
2024-08-31 19:34 ` syscon edm
2024-08-31 20:16 ` Michael
2024-08-31 20:56 ` syscon edm
2024-09-01 9:23 ` Michael
2024-09-03 2:00 ` [gentoo-user] [SOLVED] " syscon edm
2024-08-31 17:20 ` [gentoo-user] " ralfconn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox