http://qs1969.pair.com?node_id=126419

PyroX has asked for the wisdom of the Perl Monks concerning the following question:

Ok guys, I have 2 linux machines, I want my perl script on one machine to email me a message. Ok, no problem. Did that. I want sendmail to take this message and send it to the other linux machine, which is set up to relay from this machine, still ok, the perl script told sendmail to use ther other machine as its mail server. NOW HERE IS WHERE IS ALL FALLS APART.

I am watching the log on the 2nd machine, it accepts the message to be relayed, but then queued it. Every time! stat=queued.

I realize this is a perl area, and this problem involves sendmail, but does anyone know what is going wrong? I checked several times, sendmail is started with -bd -q so it is running and is supposed to be forking a child to send the queued messages, but it never does. It is not sending the mail on.

ALSO, is there some way that I can force it to send all queued messages?

THANKS IN ADVANCE

Replies are listed 'Best First'.
Re: sendmail *grumble*
by perigeeV (Hermit) on Nov 20, 2001 at 04:37 UTC

    sendmail -q

    from the command line causes it to process the queue once, then exit. Add the -v switch to make sendmail chattier while it does it. Normally a sendmail daemon only queues under difficulty, it should process the mail immediately without queuing unless it has been configured to do so. You can add a time argument to -q:

    sendmail -q1h

    processes the queue every hour.

    Check out sendmail.org for further documentation. You may have to invoke the -d debugging switch to see what sendmail sees.

Re: sendmail *grumble*
by BigJoe (Curate) on Nov 20, 2001 at 19:49 UTC
    PyroX, when you run your script do you see a child sendmail process recieve the mail? If so does it go away after a few seconds? If it doesn't that would signify that something is keeping the connection open. You may want to look at the script that is sending the mail or at the local server. There is a setting in the sendmail.cf (about line 303 depending on what is compiled into it) that looks like this:
    O SuperSafe=True
    If you change it to false it will not queue your mail. It will start relaying it as soon as it starts recieving it. You will probably not want to do this if the machine is on a public network.

    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.
Re: sendmail *relief*
by PyroX (Pilgrim) on Nov 21, 2001 at 04:27 UTC
    Thanks guys, you both helped me get this worked out quickly.