Operating System - HP-UX
1846966 Members
4048 Online
110257 Solutions
New Discussion

sendmail does not queue messages

 
Bolek Mynarski
Frequent Advisor

sendmail does not queue messages

Hi there,

I am in a peculiar position which requires me to send any messages generated by clients on my HPUX 11.00 boxes to one of our MS Exchange relay servers. If version of MS Exchange matters, I will submit it at a latter time. The problem is that if for whatever reason messages coming from UNIX are rejected by MS Exchange, they are not queued on my servers. I've been going through books on sendmail, sendmail.org and various news groups in search of this behaviour but I can't seem to find anything that would be of any help.

Here is an excerpt from my logs:

Jul 24 12:30:43 hpuxbox.com sendmail[18084]: MAA18084: to=sysadmin@domain.com,
delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=relay.domain.com,
stat=Service unavailable
Jul 24 12:30:43 hpuxbox.com sendmail[18084]: MAA18084: MAB18084: return to
sender: Service unavailable
Jul 24 12:30:43 hpuxbox.com sendmail[18084]: MAB18084: to=root, delay=00:00:00,
xdelay=00:00:00, mailer=local, stat=Sent

What worries me is the last line which says: "mailer=local,stat=Sent".

Now, I tried a similar thing with my Linux system and it correctly sends "relaying denied" message back to my system. After my sendmail sees 'relaying denied' versus 'service not available', it correctly queues undelivered messages.

Has anybody come across a behaviour like that and if so, what would be the remedy? I'd hate loosing my e-mail every time MS Exchange refusing re-laying (for whatever reason).

Thanks
It'snever too late to learn new things...
7 REPLIES 7
benoit Bruckert
Honored Contributor

Re: sendmail does not queue messages

HI,
What is the exact trouble :
You can't connect to your Exchange server ?
Or when you server is down (The MS one of course), mails are not queued ?

For the first question, it's more an Exchange issue than anything else (may be a masquerading issue of sendmail but that's old).

For the second question, the message in the log means that your message is sending back, but it doesn't say that it's not queued (log level of sendmail is probably not the same between your HP / and Linux).
To see if your mail is queued, try the command :
mailq, you should see yours queued messages.
But for sending these messaging after a delay, you have to run sendmail as deamon, if you don't do it, messages may stay in queue for a very long time (no running processes are managing them !).
SO the best way for you is to try the mailq and check that sendmail is always running...
If you are sure your messages are not queued will see what is the troubles....

hope that help
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Animesh Chakraborty
Honored Contributor

Re: sendmail does not queue messages

Sendmail without DNS:-

1.Edit /etc/mail/sendmail.cf file

2.Edit /etc/mail/sendmail.cw

3. Add aliase to /etc/hosts file:

xxx.xx.xx.xx hostname hostname.

note: the period (.) after hostname is required
4. Verify that /etc/mail/service.switch contains following
hosts files
aliases files
5. create /etc/nsswitch.conf
6. Verify macros :

# grep '^D' /etc/mail/sendmail.cf
Dj$w.eds.com
DS 10.204.2.23
DR
DH
DM
DnMAILER-DAEMON
DZ8.7.1
7. Verify /etc/rc.config.d/mailservs contain following:

export SENDMAIL_SERVER=1
8.8. Stop sendmail

/sbin/init.d/sendmail stop


9. Start sendmail

/sbin/init.d/sendmail.start
Did you take a backup?
Bolek Mynarski
Frequent Advisor

Re: sendmail does not queue messages

Hi benoit Bruckert,

Messages are not queued. That was the point of my messages. However, you said something I think I will do. I will increase the log level of my servers to see if that helps my situation....
It'snever too late to learn new things...
Bolek Mynarski
Frequent Advisor

Re: sendmail does not queue messages

Hi Animesh,

My sendmail is running as a daemon, macros are as follows:

Dj$w.mydomain.com
DSmyrelay.mydomain.com
DR
DH
DMmydomain.com
DnMAILER-DAEMON
DZ8.9.3

Again, messages are queued properly when rejected by my Linux mail server but are not queued if send to an Exchange Server after ES sends a message "service unavailable."

I think, what happens is that after MS Exchange sends "service unavailable", messages are returned to local accounts that generated those messages on my UNIX system. That's what I do not want to happen. I would like them to be queued in /var/spool/mqueue
until MS Exchange becomes available again....

Thanks.
It'snever too late to learn new things...
T G Manikandan
Honored Contributor

Re: sendmail does not queue messages

Just check that this line is not commented out in the /etc/mail/sendmail.cf file

------------------------------
QueueDirectory=/var/spool/mqueue
---------------------------
Restart sendmail and give it a try

Thanks
benoit Bruckert
Honored Contributor

Re: sendmail does not queue messages

Hummmm
That's interesting ....
The Service unavaible is a specific answer from your Exchange ?
did you try the same thing to your linux box (instead of Exchange) ?
Can you check timeout values ?
Another point :
Can you try to send a email with this command against your Exchange down :
sendmail -v user@exchnage
-v is the verbose mode....

May be your Exchange is saying that relaying is denied, or mailbox disable ???
Many questions, just to help you...
regards
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Bolek Mynarski
Frequent Advisor

Re: sendmail does not queue messages

Hi T.G.

This is my line:
O QueueDirectory=/var/spool/mqueue

There is no pound sign in front of the line (excep for O) so I assume it is not commented out...
It'snever too late to learn new things...