Root messages in /var/mail

Discussion in 'ISPConfig 3 Priority Support' started by MaxT, May 4, 2019.

  1. MaxT

    MaxT Active Member

    I have some messages inside /var/mail/root without being sent
    All them are "From: [email protected]" -> "To: [email protected]"
    Sometimes I'm receiving messages with that same "From:... To: ", although for some reason there are messages which are not sent.

    I have included a new line "root: [email protected]" inside /etc/aliases, and do #newaliases, although still are not sent.

    What's the reason for this?

    thx
     
    Last edited: May 4, 2019
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Check with command
    Code:
    mailq
    
    if you have e-mail messages waiting in the queue. That should show reason they were not sent yet. Or look in mail logfile for more info.
     
    MaxT likes this.
  3. MaxT

    MaxT Active Member

    thanks Taleman :). It's strange because #mailq shows no messages in queue. Neither /var/log/mail.log show errors.

    These hold messages are from cron tasks, although when I execute these cron commands directly, the messages are sent normally.

    I don't know the cause. I emptied /var/mail/root and do a #newaliases again. I will wait for these cron tasks to check again.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You did not mention cron at all in your original message. Script not working when cron starts it is a different problem.
    Check you use same shell in cron as you do when testing from command line.
    Check what PATH is in cron, it may be the commands are not found. One way around is to use full pathnames for all commands.
    Cron should send you e-mail containing all outputs from the cron run. Read
    Code:
    man 8 cron
    about MAILTO if you did not receive such e-mails.
    Further info on how you have set up this cron job might be useful if you want further advice.
     
    MaxT likes this.
  5. MaxT

    MaxT Active Member

    I have inserted the complete path in some scripts, and do a #newaliases after including one line "root: [email protected]" inside /etc/aliases.
    It works now. I'm not sure about the cause but now seems to be solved.

    thanks!
     

Share This Page