When a PC user who does not have mail access to the network prints to an AIX print server, the mail generated by the qdaemon when a printing error occurs is undeliverable and can get bounced around the network.
This document discusses how to get the mail for this PC user either sent to a central administrative user or deleted altogether.
This document applies to all levels of AIX.
Some messages can be stopped from the terminal by setting the messages to the screen off with mesg n, but there has been greater success with specifying to send these messages by mail. This can be done with the qprt -C flag during the print process.
When the user is on a system without mail capabilities this can cause considerable problems. One solution is to use the rewrite capability of sendmail to redirect the output for the PC users to a local user. The second solution redirects the mail to /dev/null, which erases the mail. The rest of this document describes the problem in more detail and outlines the fix.
From MAILER-DAEMON Tue Sep 17 18:06:17 1996 Received: from localhost (localhost) by tesch.aix.dfw.ibm.com (AIX4.2/UCB 8. 7/8.7) with internal id SAA22142; Tue, 17 Sep 1996 18:06:17 -0500 (CDT) Date: Tue, 17 Sep 1996 18:06:17 -0500 (CDT) From: Mail Delivery Subsystem <MAILER-DAEMON> Subject: Warning: could not send message for past 4 hours Message-Id: <199609172306.SAA22142@tesch.aix.dfw.ibm.com> To: lpd MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="SAA22142.843001577/tesch.aix.dfw.ibm.com" Auto-Submitted: auto-generated (warning-timeout) This is a MIME-encapsulated message --SAA22142.843001577/tesch.aix.dfw.ibm.com ********************************************** ** THIS IS A WARNING MESSAGE ONLY ** ** YOU DO NOT NEED TO RESEND YOUR MESSAGE ** ********************************************** The original message was received at Tue, 17 Sep 1996 13:49:16 -0500 (CDT) from lpd@localhost ----- The following addresses have delivery notifications ----- pc-user@fahey.aix.dfw.ibm.com (transient failure) --- The transcript of the session follows --- pc-user@fahey.aix.dfw.ibm.com... Deferred: Connection refused by fahey.aix.d fw.ibm.com. Warning: message still undelivered after 4 hours Will keep trying until message is 5 days old --SAA22142.843001577/tesch.aix.dfw.ibm.com Content-Type: message/delivery-status Reporting-MTA: dns; tesch.aix.dfw.ibm.com Arrival-Date: Tue, 17 Sep 1996 13:49:16 -0500 (CDT) Final-Recipient: RFC822; pc-user@fahey.aix.dfw.ibm.com Action: delayed Status: 4.2.0 Remote-MTA: DNS; fahey.aix.dfw.ibm.com Last-Attempt-Date: Tue, 17 Sep 1996 18:06:17 -0500 (CDT) Will-Retry-Until: Sun, 22 Sep 1996 13:49:16 -0500 (CDT)
###################################### ### Ruleset 0 -- Parse Address ### ###################################### S0 R<@> $#local $: <@> special case error msgs R$* : $* ; <@> $#error $@ 5.1.3 $: "list:; syntax illegal for recipient addresses" R<@ $+> $#error $@ 5.1.1 $: "user address required" R$* <$* : $* > $* $#error $@ 5.1.1 $: "colon illegal in host name part" R$* < @ . > $* $#error $@ 5.1.2 $: "invalid host name"
# Can we rewrite userid pcuser to stay here # note the rulesets must be separated by a tab character Rpc-user $* $#local $: jwtesch ^ Tab ^ don't add this line.
> 3,0 pc-user@pchost.com rewrite: ruleset 3 input: pc-user @ pchost . com rewrite: ruleset 96 input: pc-user < @ pchost . com > rewrite: ruleset 96 returns: pc-user < @ pchost . com > rewrite: ruleset 3 returns: pc-user < @ pchost . com > rewrite: ruleset 0 input: pc-user < @ pchost . com > rewrite: ruleset 0 returns: $# local $: jwteschThis will work only if the user on the remote system is identified to AIX as pc-user. This is typical for an OS/2 or Windows lpr client. However, a similar line can be added to using the individual client host name. This line would look like:
Running sendmail in test mode, the results can be seen:
# sendmail -bt Address Test Mode (ruleset 3 is not automatically invoked) Enter <ruleset> <address> > 0,3 pc-user@fahey rewrite: ruleset 0 input: pc-user @ fahey rewrite: ruleset 0 returns: $# local $: jwtesch rewrite: ruleset 3 input: $# local $: jwtesch rewrite: ruleset 96 input: $# local $: jwtesch rewrite: ruleset 96 returns: $# local $: jwtesch rewrite: ruleset 3 returns: $# local $: jwtesch > 0,3 pc-user@fahey.aix.dfw.ibm.com rewrite: ruleset 0 input: pc-user @ fahey . aix . dfw . ibm . com rewrite: ruleset 0 returns: $# local $: jwtesch
R$* fahey $* $#local $: / tmp / fahey.msg
Test: # sendmail -bt Address Test Mode (ruleset 3 is not automatically invoked) Enter <ruleset> <address> > 3,0 pc-user@fahey.aix.dfw.ibm.com rewrite: ruleset 3 input: pc-user @ fahey . aix . dfw . ibm . com rewrite: ruleset 96 input: pc-user < @ fahey . aix . dfw . ibm . com > rewrite: ruleset 96 returns: pc-user < @ fahey . aix . dfw . ibm . com . > rewrite: ruleset 3 returns: pc-user < @ fahey . aix . dfw . ibm . com . > rewrite: ruleset 0 input: pc-user < @ fahey . aix . dfw . ibm . com . > rewrite: ruleset 0 returns: $# local $: / tmp / fahey . msgThere were permissions problems when this was tested, so it may be better to use a local user and .forward to a file. Of course, to make the messages disappear, use /dev/null as your file.
R$* ntsrv $* $#devnull $: /dev/nullThis says that anything sent to the server named ntsrv should be handled by the Mailer called devnull.
The next step is to create the Mailer Definition in the MAILER DEFINITION section of sendmail as follows:
Mdevnull, P=[FILE], S=0/0, R=0/0, M=0, F=DEFMPlosu, L=0, E=\n, T=DNS/RFC822/X-Unix, A=FILE /dev/nullAfter making these changes run the command:
refresh -s sendmailNow all messages sent to the users at ntsrv will be discarded.
[ Doc Ref: 91911163912332 Publish Date: Mar. 19, 2001 4FAX Ref: 6435 ]