Where does crontab get the email address of the user it emails / where are user email addresses set?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am trying to familiarize myself with crontab. I know that it is supposed to send an email containing the output of jobs to the user that scheduled them however, I can see in the syslog that the address crontab is sending emails to is not a "local" one (as if I were to type mail -s "email here" username) but an external email address (like user@example.com).



Can someone tell me from where this email is derived and how I can set the users' email address to something else?



This could be because I have a top-level domain associated with my instance (I can see in the log the emails are being sent there), however, I actually have two domain names pointed to this server so I don't know how crontab is choosing or what would happen if there were no domain on this machine.



In short I am just trying to figure out where this default email address is set.










share|improve this question























  • On what operating system? The capabilities to send emails to non-local users depends on the cron implementation. And what MTA (mail server software, e.g. postfix, exim, etc.) are you using? It may be the MTA that's doing the rewriting.
    – Gilles
    Aug 17 '16 at 21:47










  • This is for Ubuntu Linux. What is strange to me is that, until I installed mailutils, I could not even use the mail program, therefore I do not know how cron would have sent an email (even to local users).
    – Startec
    Aug 18 '16 at 5:05














up vote
1
down vote

favorite












I am trying to familiarize myself with crontab. I know that it is supposed to send an email containing the output of jobs to the user that scheduled them however, I can see in the syslog that the address crontab is sending emails to is not a "local" one (as if I were to type mail -s "email here" username) but an external email address (like user@example.com).



Can someone tell me from where this email is derived and how I can set the users' email address to something else?



This could be because I have a top-level domain associated with my instance (I can see in the log the emails are being sent there), however, I actually have two domain names pointed to this server so I don't know how crontab is choosing or what would happen if there were no domain on this machine.



In short I am just trying to figure out where this default email address is set.










share|improve this question























  • On what operating system? The capabilities to send emails to non-local users depends on the cron implementation. And what MTA (mail server software, e.g. postfix, exim, etc.) are you using? It may be the MTA that's doing the rewriting.
    – Gilles
    Aug 17 '16 at 21:47










  • This is for Ubuntu Linux. What is strange to me is that, until I installed mailutils, I could not even use the mail program, therefore I do not know how cron would have sent an email (even to local users).
    – Startec
    Aug 18 '16 at 5:05












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am trying to familiarize myself with crontab. I know that it is supposed to send an email containing the output of jobs to the user that scheduled them however, I can see in the syslog that the address crontab is sending emails to is not a "local" one (as if I were to type mail -s "email here" username) but an external email address (like user@example.com).



Can someone tell me from where this email is derived and how I can set the users' email address to something else?



This could be because I have a top-level domain associated with my instance (I can see in the log the emails are being sent there), however, I actually have two domain names pointed to this server so I don't know how crontab is choosing or what would happen if there were no domain on this machine.



In short I am just trying to figure out where this default email address is set.










share|improve this question















I am trying to familiarize myself with crontab. I know that it is supposed to send an email containing the output of jobs to the user that scheduled them however, I can see in the syslog that the address crontab is sending emails to is not a "local" one (as if I were to type mail -s "email here" username) but an external email address (like user@example.com).



Can someone tell me from where this email is derived and how I can set the users' email address to something else?



This could be because I have a top-level domain associated with my instance (I can see in the log the emails are being sent there), however, I actually have two domain names pointed to this server so I don't know how crontab is choosing or what would happen if there were no domain on this machine.



In short I am just trying to figure out where this default email address is set.







cron email






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 17 '16 at 21:46









Gilles

510k12010081537




510k12010081537










asked Aug 17 '16 at 4:33









Startec

2671418




2671418











  • On what operating system? The capabilities to send emails to non-local users depends on the cron implementation. And what MTA (mail server software, e.g. postfix, exim, etc.) are you using? It may be the MTA that's doing the rewriting.
    – Gilles
    Aug 17 '16 at 21:47










  • This is for Ubuntu Linux. What is strange to me is that, until I installed mailutils, I could not even use the mail program, therefore I do not know how cron would have sent an email (even to local users).
    – Startec
    Aug 18 '16 at 5:05
















  • On what operating system? The capabilities to send emails to non-local users depends on the cron implementation. And what MTA (mail server software, e.g. postfix, exim, etc.) are you using? It may be the MTA that's doing the rewriting.
    – Gilles
    Aug 17 '16 at 21:47










  • This is for Ubuntu Linux. What is strange to me is that, until I installed mailutils, I could not even use the mail program, therefore I do not know how cron would have sent an email (even to local users).
    – Startec
    Aug 18 '16 at 5:05















On what operating system? The capabilities to send emails to non-local users depends on the cron implementation. And what MTA (mail server software, e.g. postfix, exim, etc.) are you using? It may be the MTA that's doing the rewriting.
– Gilles
Aug 17 '16 at 21:47




On what operating system? The capabilities to send emails to non-local users depends on the cron implementation. And what MTA (mail server software, e.g. postfix, exim, etc.) are you using? It may be the MTA that's doing the rewriting.
– Gilles
Aug 17 '16 at 21:47












This is for Ubuntu Linux. What is strange to me is that, until I installed mailutils, I could not even use the mail program, therefore I do not know how cron would have sent an email (even to local users).
– Startec
Aug 18 '16 at 5:05




This is for Ubuntu Linux. What is strange to me is that, until I installed mailutils, I could not even use the mail program, therefore I do not know how cron would have sent an email (even to local users).
– Startec
Aug 18 '16 at 5:05










1 Answer
1






active

oldest

votes

















up vote
1
down vote













man 5 crontab




 If MAILTO is defined (and non-empty), mail is sent
to the user so named. MAILTO may also be used to direct mail to multi‐
ple recipients by separating recipient users with a comma.






share|improve this answer
















  • 1




    Good find! Unfortunately this does not explain where mail is sent if MAILTO is not defined and does not answer my question.
    – Startec
    Aug 17 '16 at 4:43










  • user@cat /etc/mailname or how you configured your mta. it's not crontab's job to choose address, it always addresses the local user.
    – Ipor Sircer
    Aug 17 '16 at 4:47










  • Ah, there is the answer I am looking for. So it appends the users' name onto how the mta was configured. I see, thank you.
    – Startec
    Aug 17 '16 at 4:50










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f303868%2fwhere-does-crontab-get-the-email-address-of-the-user-it-emails-where-are-user%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













man 5 crontab




 If MAILTO is defined (and non-empty), mail is sent
to the user so named. MAILTO may also be used to direct mail to multi‐
ple recipients by separating recipient users with a comma.






share|improve this answer
















  • 1




    Good find! Unfortunately this does not explain where mail is sent if MAILTO is not defined and does not answer my question.
    – Startec
    Aug 17 '16 at 4:43










  • user@cat /etc/mailname or how you configured your mta. it's not crontab's job to choose address, it always addresses the local user.
    – Ipor Sircer
    Aug 17 '16 at 4:47










  • Ah, there is the answer I am looking for. So it appends the users' name onto how the mta was configured. I see, thank you.
    – Startec
    Aug 17 '16 at 4:50














up vote
1
down vote













man 5 crontab




 If MAILTO is defined (and non-empty), mail is sent
to the user so named. MAILTO may also be used to direct mail to multi‐
ple recipients by separating recipient users with a comma.






share|improve this answer
















  • 1




    Good find! Unfortunately this does not explain where mail is sent if MAILTO is not defined and does not answer my question.
    – Startec
    Aug 17 '16 at 4:43










  • user@cat /etc/mailname or how you configured your mta. it's not crontab's job to choose address, it always addresses the local user.
    – Ipor Sircer
    Aug 17 '16 at 4:47










  • Ah, there is the answer I am looking for. So it appends the users' name onto how the mta was configured. I see, thank you.
    – Startec
    Aug 17 '16 at 4:50












up vote
1
down vote










up vote
1
down vote









man 5 crontab




 If MAILTO is defined (and non-empty), mail is sent
to the user so named. MAILTO may also be used to direct mail to multi‐
ple recipients by separating recipient users with a comma.






share|improve this answer












man 5 crontab




 If MAILTO is defined (and non-empty), mail is sent
to the user so named. MAILTO may also be used to direct mail to multi‐
ple recipients by separating recipient users with a comma.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 17 '16 at 4:38









Ipor Sircer

9,3161920




9,3161920







  • 1




    Good find! Unfortunately this does not explain where mail is sent if MAILTO is not defined and does not answer my question.
    – Startec
    Aug 17 '16 at 4:43










  • user@cat /etc/mailname or how you configured your mta. it's not crontab's job to choose address, it always addresses the local user.
    – Ipor Sircer
    Aug 17 '16 at 4:47










  • Ah, there is the answer I am looking for. So it appends the users' name onto how the mta was configured. I see, thank you.
    – Startec
    Aug 17 '16 at 4:50












  • 1




    Good find! Unfortunately this does not explain where mail is sent if MAILTO is not defined and does not answer my question.
    – Startec
    Aug 17 '16 at 4:43










  • user@cat /etc/mailname or how you configured your mta. it's not crontab's job to choose address, it always addresses the local user.
    – Ipor Sircer
    Aug 17 '16 at 4:47










  • Ah, there is the answer I am looking for. So it appends the users' name onto how the mta was configured. I see, thank you.
    – Startec
    Aug 17 '16 at 4:50







1




1




Good find! Unfortunately this does not explain where mail is sent if MAILTO is not defined and does not answer my question.
– Startec
Aug 17 '16 at 4:43




Good find! Unfortunately this does not explain where mail is sent if MAILTO is not defined and does not answer my question.
– Startec
Aug 17 '16 at 4:43












user@cat /etc/mailname or how you configured your mta. it's not crontab's job to choose address, it always addresses the local user.
– Ipor Sircer
Aug 17 '16 at 4:47




user@cat /etc/mailname or how you configured your mta. it's not crontab's job to choose address, it always addresses the local user.
– Ipor Sircer
Aug 17 '16 at 4:47












Ah, there is the answer I am looking for. So it appends the users' name onto how the mta was configured. I see, thank you.
– Startec
Aug 17 '16 at 4:50




Ah, there is the answer I am looking for. So it appends the users' name onto how the mta was configured. I see, thank you.
– Startec
Aug 17 '16 at 4:50

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f303868%2fwhere-does-crontab-get-the-email-address-of-the-user-it-emails-where-are-user%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?