Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Cron Jobs not emailing
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Cron Jobs not emailing

n1kkon1kko Member

I moved to a new vps and since moving my cron job for WHMCS is not working. I have checked paths etc although they are still the same. What could the problem be?

using cPanel

Comments

  • rds100rds100 Member

    Port 25 is filtered? Can you send any mails at all from this box?

  • Check the logs? What OS is it?

    Thanked by 1Microlinux
  • n1kkon1kko Member

    Can send emails fine. Running Centos 6.5 how do I check the logs?

  • Caveman122Caveman122 Member
    edited June 2014

    It is at /var/log/maillog, is cron sending emails to root? if so, you might want to modify /etc/aliases at the bottom and uncomment root:

    Person who should get root's mail

    root: [email protected]

    After saving that file, run

    postalias /etc/aliases

    Restart related services, or the VPS if you don't know.

  • VPNVPN Member

    I assume that WHMCS confirms the cronjob actually ran?

  • n1kkon1kko Member

    The cron job is showing in WHMCS System Activity Log.

    This is in /var/log/maillog

    Jun 16 08:22:07 server1 dovecot: imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=7849, secured, session=
    Jun 16 08:22:07 server1 dovecot: imap(n1kko): Disconnected: Logged out in=82, out=666, bytes=82/666
    Jun 16 08:22:07 server1 dovecot: imap(n1kko): Disconnected: Logged out in=67, out=831, bytes=67/831
    Jun 16 08:22:10 server1 dovecot: imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=7874, secured, session=<4yiNE/P7PgB/AAAB>
    Jun 16 08:22:10 server1 dovecot: imap(n1kko): Disconnected: Logged out in=70, out=616, bytes=70/616
    Jun 16 08:22:11 server1 dovecot: imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=7886, secured, session=<22uZE/P7PwB/AAAB>
    Jun 16 08:22:11 server1 dovecot: imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=7887, secured, session=<6oOZE/P7QAB/AAAB>
    Jun 16 08:22:11 server1 dovecot: imap(n1kko): Disconnected: Logged out in=82, out=666, bytes=82/666
    Jun 16 08:22:11 server1 dovecot: imap(n1kko): Disconnected: Logged out in=311, out=26518, bytes=311/26518
  • n1kkon1kko Member
    edited June 2014

    This is showing in /var/log/cron

    Jun 16 13:40:01 server1 crond[1309]: (n1kko) RELOAD (/var/spool/cron/n1kko)
    Jun 16 13:40:01 server1 CROND[2943]: (root) CMD (/usr/lib/sa/sa1 1 1)
    Jun 16 13:40:01 server1 CROND[2944]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Jun 16 13:40:01 server1 CROND[2945]: (root) CMD (/usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1)
  • Caveman122Caveman122 Member
    edited June 2014

    That's dovecot in your maillog, and cron log won't show mail entries by default. find the relevant out going email log around the time cron was ran. It would be postfix or the like for outgoing. I still feel like it is like an alias issue.

  • n1kkon1kko Member

    I changed the cron job time to 13:55 to check

    This is var/log/cron

    Jun 16 13:55:01 server1 CROND[4515]: (root) CMD (/usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1)
    Jun 16 13:55:01 server1 CROND[4516]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)

    but nothing in var/log/maillog for 13:55

  • n1kkon1kko Member

    If I run the cron job from command line it works fine

    Starting
    Starting Updating Currency Exchange Rates
     - Done
    Starting Generating Invoices
     - 0 Invoices Created
    Starting Applying Late Fees
     - Late Invoice Fees added to 0 Invoices
    Starting Processing Credit Card Charges
     - Credit Card Payments Processed (0 Captured, 0 Failed)
    Starting Processing Invoice Reminder Notices
     - Sent 0 Unpaid Invoice Payment Reminders
     - Sent 0 Reminders
    Starting Processing Domain Renewal Notices
     - Sent 0 Notices
    Starting Processing Overdue Suspensions
     - Processed 0 Suspensions
    Starting Performing Automated Fixed Term Service Terminations
     - Processed 0 Terminations
    Starting Auto Closing Inactive Tickets
    Starting Processing Email Marketer Rules
    Starting Updating Disk & Bandwidth Usage Stats
     - Done
    Starting Performing Client Status Sync
     - Done
    Completed
    Cron Job Hooks Run...
    Starting Database Backup
    Backup Complete...
    Goodbye
  • Not a timezone issue is it?

    If you changed the VPS's timezone you need to restart the cron daemon.

  • n1kkon1kko Member

    I did change the time zone but rebooted VPS as the time was wrong. But still not working!

  • Master_BoMaster_Bo Member
    edited June 2014

    What MTA (SMTP server) do you use to send outgoing email (postfix, sendmail, exim,...)? Is it actually running?

    Have you tried to emulate conversation with MTA using 'telnet localhost 25'?

  • n1kkon1kko Member
    edited June 2014

    Server running Dovecot and is up and running as I can send and receive emails fine

  • n1kkon1kko Member

    SOLVED: Opened a ticket with WHMCS and turns out it's a minor bug with the latest version which I updated yesterday... 3 hours later!

    Thanks for all the help everyone :D

Sign In or Register to comment.