Results 1 to 4 of 4

Thread: Problem with mail from Cron

  1. #1
    Join Date
    Feb 2009
    Location
    Staffordshire
    Posts
    7

    Default Problem with mail from Cron

    I am having a problem with system mail. I have a cron job to create scripted backups using rsync. I append the output of the various backup jobs to a text file, and then run the command 'mail -s "Backups Confirmation" "rz33fv" </tmp/backuplist' at the end of the script.

    The problem is no mail is arriving. I have checked that the postfix daemon is running. There are no files at all in /var/mail. The most recent output in /var/log/mail.info is:

    Nov 17 20:58:06 fujitsu postfix/pickup[9891]: 9797C3CFD2: uid=0 from=<root>
    Nov 17 20:58:06 fujitsu postfix/cleanup[10936]: 9797C3CFD2: message-id=<20091117205806.9797C3CFD2@fujitsu.home.dev> Nov 17 20:58:06 fujitsu postfix/qmgr[9892]: 9797C3CFD2: from=<root@fujitsu.home.dev>, size=448, nrcpt=1 (queue active)
    Nov 17 20:58:06 fujitsu postfix/local[10939]: 9797C3CFD2: to=<rz33fv@localhost.home.dev>, orig_to=<rz33fv@localhost>, relay=local, delay=0.28, delays=0.22/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)

    Which appears to me to suggest that it should have been delivered. The environment variable MAIL points to /var/spool/mail/rz33fv.
    So I appear to have an entry in /var/log/mail.info that says the mail was delivered, the environment variable appears to point to a valid location, but there is nothing there. I'm sure I'm probably missing something blindingly obvious here, but right now I'm just confused. Has anyone any idea what might be happening?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,121
    Blog Entries
    15

    Default Re: Problem with mail from Cron

    Quote Originally Posted by pfnorris
    I am having a problem with system mail. I have a cron job to create
    scripted backups using rsync. I append the output of the various backup
    jobs to a text file, and then run the command 'mail -s "Backups
    Confirmation" "rz33fv" </tmp/backuplist' at the end of the script.

    The problem is no mail is arriving. I have checked that the postfix
    daemon is running. There are no files at all in /var/mail. The most
    recent output in /var/log/mail.info is:

    Nov 17 20:58:06 fujitsu postfix/pickup[9891]: 9797C3CFD2: uid=0
    from=<root>
    Nov 17 20:58:06 fujitsu postfix/cleanup[10936]: 9797C3CFD2:
    message-id=<20091117205806.9797C3CFD2@fujitsu.home.dev>
    Nov 17 20:58:06 fujitsu postfix/qmgr[9892]: 9797C3CFD2:
    from=<root@fujitsu.home.dev>, size=448, nrcpt=1 (queue active)

    Nov 17 20:58:06 fujitsu postfix/local[10939]: 9797C3CFD2:
    to=<rz33fv@localhost.home.dev>, orig_to=<rz33fv@localhost>, relay=local,
    delay=0.28, delays=0.22/0.01/0/0.06, dsn=2.0.0, status=sent (delivered
    to maildir)

    Which appears to me to suggest that it should have been delivered. The
    environment variable MAIL points to /var/spool/mail/rz33fv.
    So I appear to have an entry in /var/log/mail.info that says the mail
    was delivered, the environment variable appears to point to a valid
    location, but there is nothing there. I'm sure I'm probably missing
    something blindingly obvious here, but right now I'm just confused. Has
    anyone any idea what might be happening?
    Hi
    You need to edit the /etc/postfix/main.cf file and rem out the
    following entry and restart postfix;

    home_mailbox = Maildir/

    See http://lists.opensuse.org/opensuse/2.../msg01102.html
    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.37-0.1-default
    up 1 day 18:37, 3 users, load average: 0.18, 0.10, 0.09
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18


  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Problem with mail from Cron

    Either that or tell your mail reader to use Maildir/ style mailboxes.

  4. #4
    Join Date
    Feb 2009
    Location
    Staffordshire
    Posts
    7

    Default Re: Problem with mail from Cron

    Thanks guys

    I'll give it a go when I get home later.

    Much appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •