AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  How can I stop qdaemon from mailing users?

    Posted Tue November 06, 2007 05:35 AM

    Originally posted by: SystemAdmin


    Is there a way that I can suppress email status messages from qdaemon being sent to users in the event of job failure / cancellation, etc?

    Our application passes print jobs through to qdaemon for processing as 'normal' users. Most (not all, so I can't do blanket clear-outs of spurious emails) of these users don't use UNIX mail. However, the application is unix mail-aware, so will display annoying 'you've got mail' type messages to the users. Plus the fact that these mails are just clogging up the filesystems.

    Thanks and regards,

    Alex


  • 2.  Re: How can I stop qdaemon from mailing users?

    Posted Tue November 06, 2007 09:29 AM

    Originally posted by: SystemAdmin


    I've used two solutions to this in the past and both use modifcations to the sendmail.cf file. First you can setup a redirect of email for these users to a local user, second you can setup the mail for these users to go to a new mailer type and send them to a file /dev/null, also you can setup procmail for the users and have procmail forward the mail to their mail server accounts.

    I am leary to post the solution I used then because I haven't tested it since AIX 4.2 in 1998.

    sendmail rewrite rules are a bit confusing, but are also very powerful. First you have to know what you want to do with the mail and do you want to do it to all mail for the user.

    You might also look at procmail (I think it is open source) which can do some sorting of mail and resend.


  • 3.  Re: How can I stop qdaemon from mailing users?

    Posted Tue November 06, 2007 10:25 AM

    Originally posted by: SystemAdmin


    Unfortunately there's no easy way to separate the users that ARE actively using UNIX mail from the ones that aren't.

    Just for a little more background information - the application is using the lp command to submit the print jobs. I notice with the qprt command you can use the -A option to specify the reporting level; level 0 turns off reporting.

    As far as I can tell the lp command doesn't front-end the qprt command, or at least not in a way that allows for manipulation of this -A flag - is this correct or can I persue this avenue?

    An alternative might be to move the lp command and replace it with a shell-script that calls the qprt command with the required options. This would only be possible if the qprt command is a functional equivalent - any doubt would require extensive testing and therefore make the whole excercise unmanageable.


  • 4.  Re: How can I stop qdaemon from mailing users?

    Posted Tue November 06, 2007 11:10 AM

    Originally posted by: SystemAdmin


    All of the print commands in AIX actually end up calling enq which supports the -o flag. In fact, the lp command does also support the -o flag, so you can actually use most of the AIX qprt flags with lp. In this case use

    lp -o -A0 -d queue filename
    For example to rotate a page you could use:
    $ echo "AAAA" | lp -o -z+ -d pcla


  • 5.  Re: How can I stop qdaemon from mailing users?

    Posted Mon April 14, 2008 09:54 AM

    Originally posted by: SystemAdmin


    hi all,

    I would also appreciate an answer in this topic because we are currently getting huge network traffic (dns request, because no sender is defined in our environment) and qdaemon sends emails to the sender if a queue is down.

    There's a possiblity in setting "recovery_type = sendmail nodody" -> this affects the qdaemon to send no mails if a queue is down.
    Anyone knows how to set this in general so there is no need in settings this parameter for each queue (~300)?

    Thanks for any suggestions!

    Jo