* [gentoo-user] Problems with "mailto" (fcrontab)
@ 2015-05-23 18:53 Meino.Cramer
2015-05-24 0:29 ` wabenbau
0 siblings, 1 reply; 7+ messages in thread
From: Meino.Cramer @ 2015-05-23 18:53 UTC (permalink / raw
To: Gentoo
Hi,
In my fcrontab file I added:
&b(1),mailto(root) * * */14 * * /home/mccramer/bin/check.sh
I would exspect to get mail each time the command is run.
&b(1),mailto(root) */2 * * * * /home/mccramer/bin/check.sh
"check.sh"'s last line is 'date' so this command prints something.
I would exspect to reveive mail from fcron but: no.
Is there something else to configure? Do I need to setup a
complete mailserver for log mails? Do I have to create a
fully fledge email account?
Slightly confused...
Meino
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problems with "mailto" (fcrontab)
2015-05-23 18:53 [gentoo-user] Problems with "mailto" (fcrontab) Meino.Cramer
@ 2015-05-24 0:29 ` wabenbau
2015-05-24 1:34 ` Meino.Cramer
0 siblings, 1 reply; 7+ messages in thread
From: wabenbau @ 2015-05-24 0:29 UTC (permalink / raw
To: gentoo-user
Meino.Cramer@gmx.de wrote:
> Hi,
>
> In my fcrontab file I added:
> &b(1),mailto(root) * * */14 * * /home/mccramer/bin/check.sh
>
> I would exspect to get mail each time the command is run.
>
>
> &b(1),mailto(root) */2 * * * * /home/mccramer/bin/check.sh
>
> "check.sh"'s last line is 'date' so this command prints something.
>
> I would exspect to reveive mail from fcron but: no.
>
>
> Is there something else to configure? Do I need to setup a
> complete mailserver for log mails? Do I have to create a
> fully fledge email account?
>
> Slightly confused...
> Meino
>
You need some kind of mta. On my system, mail-mta/ssmtp does the job
for me.
--
Regards
wabe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problems with "mailto" (fcrontab)
2015-05-24 0:29 ` wabenbau
@ 2015-05-24 1:34 ` Meino.Cramer
2015-05-24 1:45 ` covici
2015-05-24 3:42 ` Walter Dnes
0 siblings, 2 replies; 7+ messages in thread
From: Meino.Cramer @ 2015-05-24 1:34 UTC (permalink / raw
To: gentoo-user
wabenbau@gmail.com <wabenbau@gmail.com> [15-05-24 03:21]:
> Meino.Cramer@gmx.de wrote:
>
> > Hi,
> >
> > In my fcrontab file I added:
> > &b(1),mailto(root) * * */14 * * /home/mccramer/bin/check.sh
> >
> > I would exspect to get mail each time the command is run.
> >
> >
> > &b(1),mailto(root) */2 * * * * /home/mccramer/bin/check.sh
> >
> > "check.sh"'s last line is 'date' so this command prints something.
> >
> > I would exspect to reveive mail from fcron but: no.
> >
> >
> > Is there something else to configure? Do I need to setup a
> > complete mailserver for log mails? Do I have to create a
> > fully fledge email account?
> >
> > Slightly confused...
> > Meino
> >
>
> You need some kind of mta. On my system, mail-mta/ssmtp does the job
> for me.
>
> --
> Regards
> wabe
>
Hi wabe,
sorry...forgot to mention:
I am receiving mail from the internet and I am able to send mail
to the internet.
Installed is:
[I] mail-client/mailx
Available versions: 8.1.2.20050715-r6
Installed versions: 8.1.2.20050715-r6(05:08:10 09/08/12)
Homepage: http://www.debian.org/
Description: The /bin/mail program, which is used to send mail via shell scripts
[I] mail-client/mailx-support
Available versions: 20060102-r1
Installed versions: 20060102-r1(22:47:46 09/12/10)
Homepage: http://www.openbsd.org/
Description: Provides lockspool utility
[I] mail-filter/procmail
Available versions: 3.22-r10 {mbox selinux}
Installed versions: 3.22-r10(23:42:13 09/12/10)(-mbox -selinux)
Homepage: http://www.procmail.org/
Description: Mail delivery agent/filter
[I] net-mail/fetchmail
Available versions: 6.3.26-r2 {hesiod kerberos nls socks ssl tk PYTHON_TARGETS="python2_7"}
Installed versions: 6.3.26-r2(19:33:49 11/07/14)(nls ssl tk -hesiod -kerberos -socks PYTHON_TARGETS="python2_7")
Homepage: http://www.fetchmail.info/
Description: the legendary remote-mail retrieval and forwarding utility
[I] net-mail/mailbase
Available versions: 1 1.1 {pam}
Installed versions: 1.1(18:39:22 01/16/13)(pam)
Homepage: http://www.gentoo.org/
Description: MTA layout package
[I] virtual/mailx
Available versions: 0 1
Installed versions: 1(15:34:53 04/26/14)
Description: Virtual for mail implementations
[I] dev-perl/MailTools
Available versions: 2.120.0-r1
Installed versions: 2.120.0-r1(13:19:53 02/14/15)
Homepage: http://search.cpan.org/dist/MailTools/
Description: Manipulation of electronic mail addresses
[I] mail-mta/msmtp
Available versions: 1.4.31-r1 ~1.4.32 ~1.6.0 ~1.6.1 {doc gnome-keyring gnutls idn libsecret +mta nls sasl ssl vim-syntax PYTHON_TARGETS="python2_7"}
Installed versions: 1.4.31-r1(19:25:19 02/11/15)(doc gnutls mta nls sasl ssl -gnome-keyring -idn -vim-syntax)
Homepage: http://msmtp.sourceforge.net/
Description: An SMTP client and SMTP plugin for mail user agents such as Mutt
What reasons disable fcron to send mail to me or root?
Best regards,
mcc
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problems with "mailto" (fcrontab)
2015-05-24 1:34 ` Meino.Cramer
@ 2015-05-24 1:45 ` covici
2015-05-24 3:42 ` Walter Dnes
1 sibling, 0 replies; 7+ messages in thread
From: covici @ 2015-05-24 1:45 UTC (permalink / raw
To: gentoo-user
Meino.Cramer@gmx.de wrote:
> wabenbau@gmail.com <wabenbau@gmail.com> [15-05-24 03:21]:
> > Meino.Cramer@gmx.de wrote:
> >
> > > Hi,
> > >
> > > In my fcrontab file I added:
> > > &b(1),mailto(root) * * */14 * * /home/mccramer/bin/check.sh
> > >
> > > I would exspect to get mail each time the command is run.
> > >
> > >
> > > &b(1),mailto(root) */2 * * * * /home/mccramer/bin/check.sh
> > >
> > > "check.sh"'s last line is 'date' so this command prints something.
> > >
> > > I would exspect to reveive mail from fcron but: no.
> > >
> > >
> > > Is there something else to configure? Do I need to setup a
> > > complete mailserver for log mails? Do I have to create a
> > > fully fledge email account?
> > >
> > > Slightly confused...
> > > Meino
> > >
> >
> > You need some kind of mta. On my system, mail-mta/ssmtp does the job
> > for me.
> >
> > --
> > Regards
> > wabe
> >
>
> Hi wabe,
>
> sorry...forgot to mention:
> I am receiving mail from the internet and I am able to send mail
> to the internet.
> Installed is:
> [I] mail-client/mailx
> Available versions: 8.1.2.20050715-r6
> Installed versions: 8.1.2.20050715-r6(05:08:10 09/08/12)
> Homepage: http://www.debian.org/
> Description: The /bin/mail program, which is used to send mail via shell scripts
>
> [I] mail-client/mailx-support
> Available versions: 20060102-r1
> Installed versions: 20060102-r1(22:47:46 09/12/10)
> Homepage: http://www.openbsd.org/
> Description: Provides lockspool utility
>
> [I] mail-filter/procmail
> Available versions: 3.22-r10 {mbox selinux}
> Installed versions: 3.22-r10(23:42:13 09/12/10)(-mbox -selinux)
> Homepage: http://www.procmail.org/
> Description: Mail delivery agent/filter
>
> [I] net-mail/fetchmail
> Available versions: 6.3.26-r2 {hesiod kerberos nls socks ssl tk PYTHON_TARGETS="python2_7"}
> Installed versions: 6.3.26-r2(19:33:49 11/07/14)(nls ssl tk -hesiod -kerberos -socks PYTHON_TARGETS="python2_7")
> Homepage: http://www.fetchmail.info/
> Description: the legendary remote-mail retrieval and forwarding utility
>
> [I] net-mail/mailbase
> Available versions: 1 1.1 {pam}
> Installed versions: 1.1(18:39:22 01/16/13)(pam)
> Homepage: http://www.gentoo.org/
> Description: MTA layout package
>
> [I] virtual/mailx
> Available versions: 0 1
> Installed versions: 1(15:34:53 04/26/14)
> Description: Virtual for mail implementations
>
> [I] dev-perl/MailTools
> Available versions: 2.120.0-r1
> Installed versions: 2.120.0-r1(13:19:53 02/14/15)
> Homepage: http://search.cpan.org/dist/MailTools/
> Description: Manipulation of electronic mail addresses
>
> [I] mail-mta/msmtp
> Available versions: 1.4.31-r1 ~1.4.32 ~1.6.0 ~1.6.1 {doc gnome-keyring gnutls idn libsecret +mta nls sasl ssl vim-syntax PYTHON_TARGETS="python2_7"}
> Installed versions: 1.4.31-r1(19:25:19 02/11/15)(doc gnutls mta nls sasl ssl -gnome-keyring -idn -vim-syntax)
> Homepage: http://msmtp.sourceforge.net/
> Description: An SMTP client and SMTP plugin for mail user agents such as Mutt
>
> What reasons disable fcron to send mail to me or root?
What do your logs tell you?
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici@ccs.covici.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problems with "mailto" (fcrontab)
2015-05-24 1:34 ` Meino.Cramer
2015-05-24 1:45 ` covici
@ 2015-05-24 3:42 ` Walter Dnes
2015-05-24 4:46 ` Meino.Cramer
1 sibling, 1 reply; 7+ messages in thread
From: Walter Dnes @ 2015-05-24 3:42 UTC (permalink / raw
To: gentoo-user
On Sun, May 24, 2015 at 03:34:09AM +0200, Meino.Cramer@gmx.de wrote
>
> What reasons disable fcron to send mail to me or root?
By convention, it seems that all MTAs have symlinks at
/usr/bin/sendmail /usr/lib/sendmail and /usr/sbin/sendmail. Programs
that automatically send email, expect to find "sendmail" symlinks. Do
you have those symlinks from msmtp?
My most embarressing linux moment was when ssmtp sent output from
verbose cron jobs to root (at me). My ssmtp was configured to simply
re-route everything to my ISP's MTA. The net result was that the output
went to root@my_ISP "They were not amused". That was when I learned
about setting the destination for all userids < 10 to myself. I also
ran a script designed to break the symlinks and prevent portage from
making sendmail symlinks...
rm -r /usr/bin/sendmail
rm -r /usr/lib/sendmail
rm -r /usr/sbin/sendmail
mkdir /usr/bin/sendmail
touch /usr/bin/sendmail/.keep
mkdir /usr/lib/sendmail
touch /usr/lib/sendmail/.keep
mkdir /usr/sbin/sendmail
touch /usr/sbin/sendmail/.keep
That worked great for a few years. Portage output an error message
about being unable to symlink, but continued. Then portage changed the
failure mode to shut down portage when it was unable to create
symlinks... AAARRRGGGHHH. Now when that happens, I remove the
"sendmail" directories, run emerge to build ssmtp, and then run the
script to break the symlinks. I know that it's redundant, after setting
destination for uid < 10, but "once burned, twice shy".
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problems with "mailto" (fcrontab)
2015-05-24 3:42 ` Walter Dnes
@ 2015-05-24 4:46 ` Meino.Cramer
2015-05-24 10:04 ` Mick
0 siblings, 1 reply; 7+ messages in thread
From: Meino.Cramer @ 2015-05-24 4:46 UTC (permalink / raw
To: gentoo-user
Walter Dnes <waltdnes@waltdnes.org> [15-05-24 05:52]:
> On Sun, May 24, 2015 at 03:34:09AM +0200, Meino.Cramer@gmx.de wrote
> >
> > What reasons disable fcron to send mail to me or root?
>
> By convention, it seems that all MTAs have symlinks at
> /usr/bin/sendmail /usr/lib/sendmail and /usr/sbin/sendmail. Programs
> that automatically send email, expect to find "sendmail" symlinks. Do
> you have those symlinks from msmtp?
>
> My most embarressing linux moment was when ssmtp sent output from
> verbose cron jobs to root (at me). My ssmtp was configured to simply
> re-route everything to my ISP's MTA. The net result was that the output
> went to root@my_ISP "They were not amused". That was when I learned
> about setting the destination for all userids < 10 to myself. I also
> ran a script designed to break the symlinks and prevent portage from
> making sendmail symlinks...
>
> rm -r /usr/bin/sendmail
> rm -r /usr/lib/sendmail
> rm -r /usr/sbin/sendmail
> mkdir /usr/bin/sendmail
> touch /usr/bin/sendmail/.keep
> mkdir /usr/lib/sendmail
> touch /usr/lib/sendmail/.keep
> mkdir /usr/sbin/sendmail
> touch /usr/sbin/sendmail/.keep
>
> That worked great for a few years. Portage output an error message
> about being unable to symlink, but continued. Then portage changed the
> failure mode to shut down portage when it was unable to create
> symlinks... AAARRRGGGHHH. Now when that happens, I remove the
> "sendmail" directories, run emerge to build ssmtp, and then run the
> script to break the symlinks. I know that it's redundant, after setting
> destination for uid < 10, but "once burned, twice shy".
>
> --
> Walter Dnes <waltdnes@waltdnes.org>
> I don't run "desktop environments"; I run useful applications
>
Hi Walter,
This is, what I have found:
lrwxrwxrwx 1 root root 14 Feb 11 19:25 /usr/bin/sendmail -> /usr/bin/msmtp
My email address (see above) is different from my userid on my Linux
box and (personally) I dont have configured anything which alias
my userid to my email address or vice versa.
I will now try to let fcron to mail to me (my userid so to speak)
instead of root since the fcrontab is alos mine.
When I do something like this
cat <file> | mail <my userid>
or
cat <file> | mail <my userid>@localhost
I get
send-mail: recipient address <my userid> not accepted by the server
send-mail: server message: 501 Syntax error in parameters or arguments
send-mail: could not send mail (account default from /home/<my userid>/.msmtprc)
Can't send mail: sendmail process failed with error code 65
send-mail: recipient address <my userid>@localhost not accepted by the server
send-mail: server message: 550-Requested action not taken: mailbox unavailable
send-mail: server message: 550 invalid DNS MX or A/AAAA resource record
send-mail: could not send mail (account default from /home/<my userid>/.msmtprc)
Can't send mail: sendmail process failed with error code 65
Question for me is: Is "server" my ISP's server? Or a default error
message" or something which is exspected to be installed at my Linux
box?
By the way:
> That was when I learned
> about setting the destination for all userids < 10 to myself. I also
> ran a script designed to break the symlinks and prevent portage from
> making sendmail symlinks...
It may be, that I have to learn it too. ;)
What shall I do to acchive this?
Best regards,
Meino
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problems with "mailto" (fcrontab)
2015-05-24 4:46 ` Meino.Cramer
@ 2015-05-24 10:04 ` Mick
0 siblings, 0 replies; 7+ messages in thread
From: Mick @ 2015-05-24 10:04 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 4254 bytes --]
On Sunday 24 May 2015 05:46:37 Meino.Cramer@gmx.de wrote:
> Walter Dnes <waltdnes@waltdnes.org> [15-05-24 05:52]:
> > On Sun, May 24, 2015 at 03:34:09AM +0200, Meino.Cramer@gmx.de wrote
> >
> > > What reasons disable fcron to send mail to me or root?
> > >
> > By convention, it seems that all MTAs have symlinks at
> >
> > /usr/bin/sendmail /usr/lib/sendmail and /usr/sbin/sendmail. Programs
> > that automatically send email, expect to find "sendmail" symlinks. Do
> > you have those symlinks from msmtp?
> >
> > My most embarressing linux moment was when ssmtp sent output from
> > verbose cron jobs to root (at me). My ssmtp was configured to simply
> > re-route everything to my ISP's MTA. The net result was that the output
> > went to root@my_ISP "They were not amused".
Well, you are meant to define root's alias address as your own
my_email@myisp.com equivalent, if you have set up your local mail program to
relay messages via your ISP's mail servers.
> > That was when I learned
> > about setting the destination for all userids < 10 to myself. I also
> > ran a script designed to break the symlinks and prevent portage from
> > making sendmail symlinks...
> >
> > rm -r /usr/bin/sendmail
> > rm -r /usr/lib/sendmail
> > rm -r /usr/sbin/sendmail
> > mkdir /usr/bin/sendmail
> > touch /usr/bin/sendmail/.keep
> > mkdir /usr/lib/sendmail
> > touch /usr/lib/sendmail/.keep
> > mkdir /usr/sbin/sendmail
> > touch /usr/sbin/sendmail/.keep
Unorthodox perhaps, but whatever works for you ... :-)
> > That worked great for a few years. Portage output an error message
> >
> > about being unable to symlink, but continued. Then portage changed the
> > failure mode to shut down portage when it was unable to create
> > symlinks... AAARRRGGGHHH. Now when that happens, I remove the
> > "sendmail" directories, run emerge to build ssmtp, and then run the
> > script to break the symlinks. I know that it's redundant, after setting
> > destination for uid < 10, but "once burned, twice shy".
>
> Hi Walter,
>
> This is, what I have found:
>
> lrwxrwxrwx 1 root root 14 Feb 11 19:25 /usr/bin/sendmail -> /usr/bin/msmtp
>
> My email address (see above) is different from my userid on my Linux
> box and (personally) I dont have configured anything which alias
> my userid to my email address or vice versa.
Have you configured your msmtp to be able to send messages? Which SMTP server
are you pointing it at?
> I will now try to let fcron to mail to me (my userid so to speak)
> instead of root since the fcrontab is alos mine.
>
> When I do something like this
>
> cat <file> | mail <my userid>
>
> or
>
> cat <file> | mail <my userid>@localhost
>
> I get
>
> send-mail: recipient address <my userid> not accepted by the server
> send-mail: server message: 501 Syntax error in parameters or arguments
> send-mail: could not send mail (account default from /home/<my
> userid>/.msmtprc) Can't send mail: sendmail process failed with error code
> 65
>
> send-mail: recipient address <my userid>@localhost not accepted by the
> server send-mail: server message: 550-Requested action not taken: mailbox
> unavailable send-mail: server message: 550 invalid DNS MX or A/AAAA
> resource record send-mail: could not send mail (account default from
> /home/<my userid>/.msmtprc) Can't send mail: sendmail process failed with
> error code 65
>
>
> Question for me is: Is "server" my ISP's server? Or a default error
> message" or something which is exspected to be installed at my Linux
> box?
It depends how you have configured msmtp. You are meant to point it to an
SMTP server which in turn is configured to accept messages from the user you
have defined in your msmtp configuration. So, if you are sending messages
from cron@localhost without having configured an alias for cron: pointing to a
real email account at your ISP, they will reject it because root@localhost is
not configured on their mailserver.
If you want to only send messages locally, then set up mailx or equivalent
application and create necessary local boxen to receive messages in.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-24 10:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-23 18:53 [gentoo-user] Problems with "mailto" (fcrontab) Meino.Cramer
2015-05-24 0:29 ` wabenbau
2015-05-24 1:34 ` Meino.Cramer
2015-05-24 1:45 ` covici
2015-05-24 3:42 ` Walter Dnes
2015-05-24 4:46 ` Meino.Cramer
2015-05-24 10:04 ` Mick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox