Cant send mail using exim/sendmail
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
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.
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 program are using to test exim4?
echo "Body" | mail -s "Subject" you@domain.com