1

For some reason some usernames on a Solaris 10 system that have cron jobs send the cron errors to an external mail server to be routed back to the generating server which is blocked because of firewall rules that have always been in place.

For instance, user X has an error in her cron and it should just send a message to the local mbox for that user without going to an external mail server to route the mail but what is happening is it is trying to send that mail via my external mail server and then back to the generating host. I don't have any aliases configured for the user on the server and other users appear to be getting their cron errors normally in the local users mailbox.

I'm at then end of my rope as these emails are getting routed to my outlook inbox because of the undeliverable type error being generated by the external mail server. I can manually send an email to the local user as the local user in question using mailx and it does not route to the external mail server.

This is the error sent to my inbox from the mail server. The subject is "Undeliverable: Output from "cron" command" which is probably not any help because I know why this is rejected and it is supposed to be blocked. The real question is what is making it go there in the first place?:

user@[source server redacted] The server has tried to deliver this message, without success, and has stopped trying. Please try sending this message again. If the problem continues, contact your helpdesk. The following organization rejected your message: .

Diagnostic information for administrators:
Generating server: [mail server redacted]
user@[source server redacted]
[source server redacted]
Remote Server returned '<[source server redacted] #4.4.7>'
Original message headers:
Return-Path: <MAILER-DAEMON>
Received: from localhost (localhost)
    by [mail server redacted] (8.14.5+Sun/8.14.4) id t28BQddx014210;
    Sun, 8 Mar 2015 09:17:50 -0300 (ADT)
Date: Sun, 8 Mar 2015 09:17:50 -0300
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-ID: <201503081217.t28BQddx014210@[mail server redacted]>
To: <user@[source server redacted]>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
    'boundary="t28BQddx014210.1425817070/[mail server redacted]"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

Any useful hints or tips where to look next would be greatly appreciated.

From the mail server queue:

MDeferred: Connection timed out with [server].
Fbs
$_[public IP]
$rESMTP
$sapp101
${daemon_flags}
${if_addr}172.20.3.14
S[user]@[server]>
MDeferred: Connection timed out with [server].
rRFC822; [user]@[server]
RPFD:<[user]@[server]>
H?P?Return-Path: <▒g>
H??Received: from [server] ([public IP])
        by [mail server] (8.14.5+Sun/8.14.4) with ESMTP id t2HB312j002355
        for <[user]@[server]>; Tue, 17 Mar 2015 08:03:01 -0300 (ADT)
H??Received: from [server] (localhost [127.0.0.1])
        by [server] (8.14.5+Sun/8.14.4) with ESMTP id t2HB319V016672
        for <[user]@[server]>; Tue, 17 Mar 2015 08:03:01 -0300 (ADT)
H??Received: (from [user]@localhost)
        by [server] (8.14.5+Sun/8.14.5/Submit) id t2HB30tH016661
        for [user]; Tue, 17 Mar 2015 08:03:00 -0300 (ADT)
H??Date: Tue, 17 Mar 2015 08:03:00 -0300 (ADT)
H??From: The users name <[user]@[server]>
H??Message-Id: <201503171103.t2HB30tH016661@[server]>
H??To: [user]@[server]
H??Subject: Output from "cron" command
H??MIME-Version: 1.0
H??Content-Type: text/plain

Oddly enough, the following message looks like it was sent from the local [server] sendmail to the local [user]@[server] just fine:

Mar 17 08:03:00 [server] sendmail[26406]: [ID 801593 mail.info] t2HB30vv026406: from=<[user]@[server]>, size=696, class=0, nrcpts=1, msgid=<20150317110
3.t2HB305N026401@[server]>, proto=ESMTP, daemon=NoMTA4, relay=localhost [127.0.0.1]
Mar 17 08:03:00 [server] sendmail[26409]: [ID 801593 mail.info] t2HB30vv026406: to=<[user]@[server]>, ctladdr=<[user]@[server]> (2031/2031), del
ay=00:00:00, xdelay=00:00:00, mailer=local, pri=30926, relay=local, dsn=2.0.0, stat=Sent

1 Answer 1

2

Solaris is likely running sendmail. Typical system files that would be involved would be:

  • /etc/mail/aliases
  • /etc/mail/local.cf

If the user has a .forward or .vacation file in the home directory, then that may change delivery behavior.

Check the logs in /var/adm to see if there are any hints. CHeck any of the messages in the mail queue to see where they originated.

It is not unusual for scripts to capture their output and send the mail themselves. You didn't include the original email, but that should indicate whether CRON sent the email, or the script did.

7
  • There is no .forward or .vacation. The user is actually just an application user and not a real person. The cron job that is erroring is a log cleanup script and does not send email so without looking I am going to say it is the cron mechanism trying to send an email because the job has an error (script not executable). I could just fix that and not get the email anymore but that doesn't address the issue.
    – JPL
    Mar 17, 2015 at 11:33
  • Added a bit more logged information in OP
    – JPL
    Mar 17, 2015 at 11:50
  • Now today I have even more emails from other app users on 2 servers. Argh! Same deal. The emails should just be going to the local mbox and not routed through the external mail server. In the sendmail.cf of each server there is a DS entry that points to the external mail server but that has always been there and this wasn't a problem before.
    – JPL
    Mar 17, 2015 at 11:54
  • @JPL The messages looks like they were generated by the script not by CRON. Check the user's scripts. It may be better to configure your server so the messages can get delivered.
    – BillThor
    Mar 18, 2015 at 3:52
  • This script does not send email. Never has. It just compresses some logs.
    – JPL
    Mar 18, 2015 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .