Configuração de cabeçalhos de 'sendmail' para tarefas agendadas ([email protected])

2

Eu uso o Ubuntu 14 no AWS EC2. Eu tenho um usuário não root crontab . Após a conclusão da tarefa do cron, um email é para MAILTO address, conforme definido em crontab . O remetente do email tem esta aparência:
[email protected]

Como posso alterar o email "de" para:

EDIT-1: Seguindo comentários contribuídos, executei telnet localhost 25 no terminal e voltei:

220 ip-111-11-0-11.us-east-1.compute.internal ESMTP Sendmail 8.14.4/8.14.4/Debian-4.1ubuntu1
Tue, 5 Jul 2016 13:38:31 GMT
(No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]

Então meu MTA é sendmail e minha pergunta se torna:

Como eu configuro o sendmail para que os cabeçalhos de e-mail dos meus agendes trabalhem como acima?

    
por user1525248 05.07.2016 / 01:35

1 resposta

-1

man 5 crontab resolverá seu problema. Diz, em parte:

An  active line in a crontab will be either an environment setting or a
   cron command.  An environment setting is of the form,

       name = value

   where the spaces around  the  equal-sign  (=)  are  optional,  and  any
   subsequent  non-leading  spaces  in  value  will  be  part of the value
   assigned to name.  The value string may be placed in quotes (single  or
   double, but matching) to preserve leading or trailing blanks.

   Several   environment   variables  are  set  up  automatically  by  the
   bcron-exec(8) program.  SHELL is set to /bin/sh, and LOGNAME, USER, and
   HOME are set from the /etc/passwd line of the crontab's owner.

   In  addition to LOGNAME, USER, HOME, and SHELL, bcron-exec(8) will look
   at MAILTO if it has any reason to send mail  as  a  result  of  running
   commands  in  ''this''  crontab.  If MAILTO is defined (and non-empty),
   mail is sent to the user so named.  If  MAILTO  is  defined  but  empty
   (MAILTO=""), no mail will be sent.  Otherwise mail is sent to the owner
   of the crontab.  This option is  useful  if  you  decide  on  /bin/mail
   instead  of  /usr/lib/sendmail  as your mailer when you install cron --
   /bin/mail doesn't do aliasing, and UUCP usually doesn't read its mail.
    
por waltinator 05.07.2016 / 01:40