Cant send mail using exim/sendmail

Hi,

i cannot send mail from the site ..

this is my hosts file in /etc/hosts

127.0.0.1 localhost localhost.localdomain site.org

127.0.0.1 site.org

the mail works sometimes .. and most of the time it throws "Could not execute mail delivery program '/usr/sbin/sendmail -t -i' " .

Any idea what is happening?? i did exim restart

regards,

sheshadri

4 Replies

Not knowing anything about exim, some ideas:

1. Is /usr/bin/sendmail linked to exim? If you have fooled around with installing different MTAs, it may not be.

2. What do your mail logs say?

3. Can you successfully invoke /usr/sbin/sendmail from the command line? Like so:

$ /usr/sbin/sendmail -t -i
To: me@example.net
From: me@myexamplelinode.com
Subject: a test

this is a test
^D

4. If #3 works, can you also do it as the user that is having trouble sending mail (e.g., on Debian/Ubuntu, Apache runs as the www-data user)?

5. Your hosts file almost certainly has nothing to do with things.

Hi,

Thanks for the reply.

Yes , sendmail is linked to exim(Wrapper) . Iam able to send mails using sendmail -t -i < mail.txt

Like i said the mails work sometimes(for all the users). And suddenly it stops . I have to restart httpd,exim to make it work . and most of the times the exim crashes and i ahve to manually start again .

I was thinking on cron restarting all the services every hour or so .. But that doesnt sound right.

@Sheshadri:

I have to restart httpd,exim to make it work . and most of the times the exim crashes and i ahve to manually start again .
What's happening to the rest of your server – are you sure you're not just OOMing with a misconfigured apache or my.cnf ? Exim is generally rock stable.

What distribution are you using? http://library.linode.com/email-guides/exim/ is helpful if you're using a debian based distro.

What program are using to test exim4?

echo "Body" | mail -s "Subject" you@domain.com

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct