# Postdrop and Sendmail Hangs

## menion

Hey, I can't find any help for this online.  I have a couple of Gentoo servers running.  For the most part they run ok.  However, every now and again I have one that begins having Postfix issues.   Cron jobs end up hanging, and worse stuff happens.  Ultimately I have to kill dozens of sendmail|postdrop processess.  It has taken down systems after 6 months or so of accumulation before.

The processess hang in S state.  

On some boxes, switching TO mailwrapper seemed to help.  However, I can't really be 100% sure.   

Any advice is very welcome.

Cron is gone, the processes are out on their own, stuck in S state.  strace shows 

```

server root # ps axf

......

11580 ?        S      0:00 /usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t

11581 ?        S      0:00  \_ /usr/sbin/postdrop -r

......

server root # strace -p 11580

Process 11580 attached - interrupt to quit

read(0,  <unfinished ...>

Process 11580 detached

server root # strace -p 11581

Process 11581 attached - interrupt to quit

read(0,  <unfinished ...>

Process 11581 detached

```

----------

## SavageMindz

I have this same problem, killed one of my boxes today for the 3 time this week. Thing is I want the email to be sent out but the sendmail process hangs. This happens on 2 machines I have here, one running postfix the other sendmail, both running vixie-cron.

Haven't found a solution yet.   :Sad: 

Savage

----------

## SavageMindz

I have a workaround although would still like to see a proper solution.

Just disable mail from cron making the MAILTO line ="" in the crontab file.

```
MAILTO=""
```

Then for each file you want the output to do something like this

```
*/5 * * * * root command | sendmail -f sender recipient
```

Not the most elegant but gets the job done for now.   :Wink: 

Savage

----------

## menion

Savage,

  Thanks for the reply.  That is about the only solution that I can imagine.  I installed mailx support yesterday, I tend to have better luck with it than sendmail.

  I would be nice to find out the cause, however, I will just keep working around.   =) I am glad to see I am not the only person with the problem.

Sincerely,

  Joshua

----------

