[NBLUG/talk] Help with apticron program

Steve S. northbaygeek at gmail.com
Sat Feb 9 12:42:29 PST 2013

On Sat, Feb 9, 2013 at 12:07 PM, Steve Bursch <sbursch at sonic.net> wrote:

> ...   I want to use the apticron program to notify me by email
> when updates are available ...
> My problem is this:  I'm not getting any emails whatsoever.
> I've checked my spam, junk, and graymail folders, and none contain any
> emails from apticron.  On the Ubuntu machine, I checked the syslog files and
> observe that CRON is invoking the apticron script. I've also manually
> invoked apticron from a terminal session (using the sudo command) and have
> observed via the System Monitor that network activity occurs when I invoke
> the command.  Apticron appears to be processing okay...it's just not sending
> out the email message.
> Can anyone give me some pointers on how I might diagnose this problem?
> Thanks in advance...Steve

I've never used "apticron," but I've debugged many scripts.
Here are some things I'll look for, or try...

1.  Does apticron invoke another mailer/mailserver (e.g. sendmail, or
whatever) ?  Is that one running, or properly configured to accept the
apticron request?  Can you check logfiles (apticron's, sendmail's,
whterver) to see mailserver-to-mailserver transaction-logs (tcp port
25, rfc28220-compliant)?  You may need to tweak your mailserver (or
apticron.conf) to turn logging ON, some are off by default...  At the
least, examine /var/lib/misc/apticron.cron (tho afaict this is just
bare timestamps, with minimal debugging value).

2.  Can you configure your apticron script to write out files onto
your local machine?  It might be worth putting in some lines of code
that confirm all pieces of the script are running correctly --
including whatever invocation to whatever mailer is used.

3. Examine the line of code where apticron actually attempts to send
the mail -- can you duplicate it by hand?

4.  Examine the network traffic in more detail.  Check
sending/recieving IP's (if you see, that's your problem --
and I've inherited mailproblems where delivery WAS going to
... ), ports/protocols, etc.  If necessary, go all the way to a full
packet-capture so you can see the actual traffic.

5.  Can you see logfiles on the receiving machine?  Go back to step.1
(above) and turn up logging to see if the recipient ever sees ANY
mail-connection from your sending machine.  If need be, aim your
apticron at a machine where you DO have admin privileges so you can
check/tweak logging, network monitoring, etc...

- Steve S.

"When I became a man I put away childish things, including the fear of
childishness and the desire to be very grown up."      -CS Lewis

More information about the talk mailing list