Operating System - HP-UX
1827458 Members
5847 Online
109965 Solutions
New Discussion

sendmail keeping mails in queue

 
Sreejith Kaliyam
Regular Advisor

sendmail keeping mails in queue

Hi all,

I have some application sending mails to local host.I need to keep this in mailqueus only no need to send or relay these mails for some time. any idea??

Regards,
Anoop
7 REPLIES 7
Thayanidhi
Honored Contributor

Re: sendmail keeping mails in queue

I don't recommend to stop sendmail daemon. Some system events (eg. EMS) send mails to root.
Look at configuring your application not to send mails.

Regds
TT
Attitude (not aptitude) determines altitude.
Keith Bryson
Honored Contributor

Re: sendmail keeping mails in queue

Hi there

If you are sending mails to root@localhost, aren't these going to the root mail account on the Unix server instead of being sent/relayed?

Keith
Arse-cover at all costs
Sreejith Kaliyam
Regular Advisor

Re: sendmail keeping mails in queue

Hi keith,

Yes it is. Any idea how can I keep those mails in queue send to other than localhost?? since root@localhost is working EMS won't have any problems.

At the moment I modified DS macro to non existing host, so mails remain in queue as hostname lookup failure.

Any good way of doing it??

Regards,
Anoop
Bejoy C Alias
Respected Contributor

Re: sendmail keeping mails in queue

One way u can add the entry
'root: /path-to-file' in aliases database so the mails for root is appended to that file instead of sending to its actual mailbox. For reading these mails u can simply append this file to ur mailbox file.
Be Always Joy ......
Steven E. Protter
Exalted Contributor

Re: sendmail keeping mails in queue

tools:

sendmail -v -q

This will process the queue in verbose mode and give you a clue why the mail is not moving.

Most common cuases:

1) Bad host resolution. For full internet resolution you need to set /etc/nsswitch.conf to dns and make sure the machine gets valid host resolution answers from the name servers in /etc/resolv.conf

2) Relay issues. To avoid host resolution issues, many set the DS directive in sendmail.cf If you do that you must restart the sendmail daemon:

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

The DS directive must point to a valid sendmail server that permits, explicity the host with the DS directive to relay mail.

The error message from the sendmail -v -q command will be instructive as to what the next step should be.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Keith Bryson
Honored Contributor

Re: sendmail keeping mails in queue

The impression I am getting here chaps is that Neil wants the mailq to hold onto certain emails (don't deliver, but hold) but carry on processing others.

Keith
Arse-cover at all costs
Sreejith Kaliyam
Regular Advisor

Re: sendmail keeping mails in queue

Thanks stev for your reply,I believe keith understood my requirement 50%.I want to hold mails send to user@anydomain in queue while delivering user@localhost.

I could achieve this by modifying DS(smart relay)macro to unknown host, Which keeps all mails to queue.

I am not happy with my solution, any good thoughts??

Anoop