On Sunday 24 May 2015 05:46:37 meino.cra...@gmx.de wrote:
> Walter Dnes <waltd...@waltdnes.org> [15-05-24 05:52]:
> > On Sun, May 24, 2015 at 03:34:09AM +0200, meino.cra...@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_em...@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: signature.asc
Description: This is a digitally signed message part.

Reply via email to