Solved

Squirrelmail fails to connect to sendmail (or vice versa)

Posted on 2006-11-10
9
1,117 Views
Last Modified: 2013-12-17
I have been using sendmail on RHES for some time, and recently configured it for use with procmail and spamassassin, so  junk mail is way down :)  However now Squirrelmail doesn't work.  It passes the config test, and users can log into their inbox and view files that were stored in /home/user/mail, but can't send or receive mail.  
I can see their mail in /var/spool/mail/user, but when I select "Check Mail" in the Squirrelmail window for that user, nothing happens, and there are no errors in the maillog.  When trying to send mail from Squirrelmail, users get this error:
Email delivery error
Server replied: 127 Can't execute command '/usr/sbin/sendmail -i -t -fuser@mydomain.com'.
Again,  the mail log only shows:
# imapd[pid_number]: imap service init from 127.0.0.1
How do I fix this?
0
Comment
Question by:sara_bellum
  • 5
  • 2
9 Comments
 

Author Comment

by:sara_bellum
ID: 17924471
I removed .procmailrc from the folders of users who use IMAP/squirrelmail, and their mail is now delivered to /home/user/mail from /var/spool/mail, with /etc/procmailrc still directing their mail thru spamassassin.
However users still cannot send mail from squirrelmail.  I've telneted into the imap server on port 143 and checked the inbox, all seems ok (TLS is not running).
If there's a lock file somewhere I couldn't find it.  Checked ps -ef |grep sendmail and all looks ok:
smmsp     6551     1  0 Nov08 ?        00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root      6554     1  0 Nov08 ?        00:00:00 sendmail: accepting connections
0
 

Author Comment

by:sara_bellum
ID: 17928612
The reason squirrelmail can't connect to sendmail may be that sendmail is being held up by another process.  I was experimenting with a script a few days ago (I know I should never do this for a server connected to the Internet) and since then my mail log has been showing lots of these errors:
myserver sendmail[27339]: kA9KiI3k009140: to=<yourname@example.com>                                          , ctladdr=<apache@myserver.mydomain.com> (48/48), delay=3+12:13:09, xdelay=00:00:00, mailer=esmtp, pri=7860345, relay=example.com., dsn=4.0.0, stat=Deferred: Connection timed out with example.com.
At one point I also caught this while checking for sendmail pids:
root     27252 27251  0 23:45 ?        00:00:00 sendmail: ./kA9Kcgcj009062 example.com.: user open
How do I get rid of this problem?
0
 
LVL 26

Expert Comment

by:jar3817
ID: 17931381
"I was experimenting with a script a few days ago..."

What did this script do? What exactly did you change to implement procmail and spamassassin? If you undo all the changes you made, does the system function as it did before you started?  
0
 

Author Comment

by:sara_bellum
ID: 17932626
It's a form-to-mail script, where your html form input is sent to your email address:
<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "yourname@example.com", "Feedback Form Results", $message, "From: $email" );
header( "Location: http://yoursite@yourdomain.com/thanks.htm" );
?>
The apache maillog entries may be unrelated to the squirrelmail problem, since squirrelmail is now running correctly, after tweaking php.ini and httpd.conf.  Probably in the course of trying to secure my server after recent attacks (which include the above), I got the error.  Now if I can stop apache from sending these unsolicited emails, I can close this out, thanks.


0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 26

Expert Comment

by:jar3817
ID: 17938438
"Now if I can stop apache from sending these unsolicited emails, I can close this out, thanks."

What do you mean stop apache from sending unsolicited emails? You're receiving email from spammers from your form-to-mail or are they able to relay spam to outside addresses using apache?
0
 

Author Comment

by:sara_bellum
ID: 17941285
The form to mail is no longer posted, I took it offline (outside of web root) as soon as I saw the problem.  
However sendmail is still trying to deliver mail from apache, four times every hour:
Nov 14 01:47:25 myserver sendmail[29392]: kA9Ke4Z1009118: to=<yourname@example.com>, ctladdr=<apache@myserver.mydomain.com> (48/48), delay=4+14:07:15, xdelay=00:00:00, mailer=esmtp, pri=10200343, relay=example.com., dsn=4.0.0, stat=Deferred: Connection timed out with example.com.
To stop this from running I added this line to /etc/mail/access:
example.com      55O Error message
and hashed it to access.db, restarted sendmail, but no difference (I thought this was supposed to tell sendmail not to use example.com as a relay, but the rule either isn't recognized or it isn't relevant to the problem)
I also thought that sendmail gives up trying to deliver mail after 3 days or so, but this has been going on since 9 Nov - six days.  
0
 

Author Comment

by:sara_bellum
ID: 17942724
I received 4 'returned mail' notifications in my inbox, all addressed to 'yourname@example.com', confirming original message received 9 Nov, and 'could not deliver for the past  5 days.' These must have been in /var/spool/mqueue all along, and all I had to do was delete them from there.  I removed a bunch of old files from that queue, so I'll be checking it more often for errors.  Since the error does not appear in my maillog for the past couple of hours, I'm assuming that was the problem.
If you have something important to add or correct I'll award points.  Otherwise, I'll request closeout.  
0
 
LVL 1

Accepted Solution

by:
kodiakbear earned 0 total points
ID: 17984176
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Automapping, a wonderful feature with Exchange 2010 (SP2 onwards I believe), allows additional/Shared mailboxes that a user has access to be automatically mapped on Outlook client, simplifying the process by adding them while Outlook launches. Ho…
Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now