Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th March 2008, 20:07
diocassius diocassius is offline
Junior Member
 
Join Date: Mar 2008
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Problems Sending Mail Using Apache

Hello,

I apologize if this question has been addressed elsewhere within the forum. If it is, I can't find it.

I've been running Fedora Core 5 with ISPConfig for about a year and a half without any problems until now. I installed Fedora and ISPConfig a year and a half ago using the Perfect Setup tutorial on this site.

I've recently installed a PHP script on one of my domains - it works fine, with the exception being that it won't send mail from the HTTPd server. I've tried everything I know how to do (which is why I'm here writing this) and I can't get it to work. Originally, I was able to send mail using Apache via my first domain, but now this won't work either.

I've always kept Sendmail disabled and used SMTP to handle mail for PHP and CGI scripts. I always used "server1.hostname.com" (hostname=my domain - witheld for privacy reasons) as my sendmail "path" with my original domain, and it always worked until now.

Yeah, I've tried setting the sendmail path to /usr/sbin/sendmail.postfix with no luck...

Can anyone tell me where I'm going wrong, or at least give me a point in the right direction?

I can receive mail within my server (i.e. when a new user signs up, I'll receive an e-mail letting me know, but the user won't receive an e-mail giving them their login information, etc), but users can't receive automatically generated e-mail from the server.

By the way, I can send and receive e-mail using SMTP, POP3, and IMAP just fine. No matter what I try, I just can't get a CGI or PHP script to send out any mail. I've gone through Postfix's main.cf file with a fine tooth comb, and I can't see anything wrong with it. My mail logs indicated that the messages are being sent, but falling into a queue. I flushed out the mail queue using the sudo postsuper -d ALL command. There were only eleven messages in there. As I said, if I'm sending e-mail via Apache to an address on my server, I'm okay. If I send an e-mail via Apache to an outside address (i.e. hotmail or yahoo), it won't show up.

The only thing I can think of that has changed in recent months is that I changed my static IP address since I installed Fedora. Believe me, it wasn't my choice. I bought a block of five additional IP's, and my provider decided to keep them all in order - so they deleted my original IP against my wishes (after telling me that my original IP wouldn't change).

I KNOW I'm missing something really simple here. I've been wracking my brain and losing sleep over this for days...

Any help you could give me with this would be greatly appreciated...

Last edited by diocassius; 6th March 2008 at 12:19.
Reply With Quote
Sponsored Links
  #2  
Old 6th March 2008, 19:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

Run
Code:
tail -f /var/log/maillog
and then let Apache send an email. What do you see in the tail output?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 6th March 2008, 20:38
diocassius diocassius is offline
Junior Member
 
Join Date: Mar 2008
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Falko,

Thanks for replying. I'm Mike, long time listener, first time caller...

Here's the information you asked for:

[root@server1 ~]# tail -f /var/log/maillog
Mar 6 13:23:02 server1 postfix/smtpd[1528]: E461A130196: client=server1.hostname.com[127.0.0.1], sasl_sender=web33_user@server1.damnage.com
Mar 6 13:23:02 server1 postfix/cleanup[1510]: E461A130196: message-id=<20080306 1823.m26IN2Uk001574@server1.hostname.com>
Mar 6 13:23:02 server1 postfix/qmgr[17320]: E461A130196: from=<web33_user@server1.hostname.com>, size=746, nrcpt=1 (queue active)
Mar 6 13:23:02 server1 sendmail[1574]: m26IN2Uk001574: to=admispconfig@localhost.localdomain, ctladdr=web33_user (10045/10013), delay=00:00:00, xdelay=00:00:00 , mailer=relay, pri=30117, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent ( Ok: queued as E461A130196)
Mar 6 13:23:02 server1 postfix/smtpd[1528]: disconnect from server1.hostname.com [127.0.0.1]
Mar 6 13:23:03 server1 postfix/local[1511]: E461A130196: to=<admispconfig@server1.hostname.com>, relay=local, delay=1, status=sent (delivered to command: /usr/b in/procmail -f-)
Mar 6 13:23:03 server1 postfix/qmgr[17320]: E461A130196: removed
Mar 6 13:23:05 server1 postfix/smtpd[1504]: disconnect from abo-160-19-68.rns.modulonet.fr[85.68.19.160]
Mar 6 13:23:11 server1 postfix/local[1529]: 5C62513017D: to=<web13_user@server1.hostname.com>, orig_to=<michael@hostname.com>, relay=local, delay=10, status=sent (delivered to command: /usr/bin/procmail -f-)
Mar 6 13:23:11 server1 postfix/qmgr[17320]: 5C62513017D: removed
Mar 6 13:26:25 server1 postfix/anvil[1507]: statistics: max connection rate 1/60s for (smtp:195.74.85.136) at Mar 6 13:22:02
Mar 6 13:26:25 server1 postfix/anvil[1507]: statistics: max connection count 1 for (smtp:195.74.85.136) at Mar 6 13:22:02
Mar 6 13:26:25 server1 postfix/anvil[1507]: statistics: max cache size 3 at Mar 6 13:22:58
Mar 6 13:26:35 server1 sendmail[1692]: m26IQZmA001692: from=apache, size=193, class=0, nrcpts=1, msgid=<200803061826.m26IQZmA001692@server1.hostnam e.com>, relay=apache@localhost
Mar 6 13:26:35 server1 postfix/smtpd[1693]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
Mar 6 13:26:35 server1 postfix/smtpd[1693]: connect from server1.hostname.com[127.0.0.1]
Mar 6 13:26:35 server1 postfix/smtpd[1693]: setting up TLS connection from server1.hostname.com[127.0.0.1]
Mar 6 13:26:35 server1 sendmail[1692]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar 6 13:26:35 server1 postfix/smtpd[1693]: TLS connection established from server1.hostname.com[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Mar 6 13:26:35 server1 postfix/trivial-rewrite[1697]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
Mar 6 13:26:36 server1 postfix/cleanup[1698]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
Mar 6 13:26:36 server1 postfix/smtpd[1693]: 065EA13017D: client=server1.hostname.com[127.0.0.1], sasl_sender=apache@server1.hostanme.com
Mar 6 13:26:36 server1 postfix/cleanup[1698]: 065EA13017D: message-id=<200803061826.m26IQZmA001692@server1.hostname.c om>
Mar 6 13:26:36 server1 postfix/qmgr[17320]: 065EA13017D: from=<apache@server1.hostname.com>, size=731, nrcpt=1 (queue active)
Mar 6 13:26:36 server1 sendmail[1692]: m26IQZmA001692: to=mike@hostname.com, ctladdr=apache (48/48), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30193, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 065EA13017D)
Mar 6 13:26:36 server1 postfix/smtpd[1693]: disconnect from server1.hostname.com[127.0.0.1]
Mar 6 13:26:36 server1 sendmail[1700]: m26IQaPL001700: from=apache, size=195, class=0, nrcpts=1, msgid=<200803061826.m26IQaPL001700@server1.hostnam e.com>, relay=apache@localhost
Mar 6 13:26:36 server1 postfix/smtpd[1693]: connect from server1.hostname.com[127.0.0.1]
Mar 6 13:26:36 server1 postfix/smtpd[1693]: setting up TLS connection from server1.hostname.com[127.0.0.1]
Mar 6 13:26:36 server1 postfix/smtpd[1693]: TLS connection established from server1.hostname.com[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Mar 6 13:26:36 server1 sendmail[1700]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar 6 13:26:36 server1 postfix/smtpd[1693]: 5F307130196: client=server1.hostname.com[127.0.0.1], sasl_sender=apache@server1.hostname.com
Mar 6 13:26:36 server1 postfix/cleanup[1698]: 5F307130196: message-id=<200803061826.m26IQaPL001700@server1.hostname.c om>
Mar 6 13:26:36 server1 postfix/qmgr[17320]: 5F307130196: from=<apache@server1.hostname.com>, size=735, nrcpt=1 (queue active)
Mar 6 13:26:36 server1 sendmail[1700]: m26IQaPL001700: to=diocassius@msn.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30195, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 5F307130196)
Mar 6 13:26:36 server1 sendmail[1707]: m26IQaej001707: from=web13_3452, size=116, class=0, nrcpts=1, msgid=<200803061826.m26IQaej001707@server1.hostnam e.com>, relay=web33_user@localhost
Mar 6 13:26:36 server1 postfix/smtpd[1693]: disconnect from server1.hostname.com[127.0.0.1]
Mar 6 13:26:36 server1 postfix/smtpd[1693]: connect from server1.hostname.com[127.0.0.1]
Mar 6 13:26:36 server1 postfix/smtpd[1693]: setting up TLS connection from server1.hostname.com[127.0.0.1]
Mar 6 13:26:37 server1 postfix/smtpd[1693]: TLS connection established from server1.hostname.com[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Mar 6 13:26:37 server1 sendmail[1707]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar 6 13:26:37 server1 postfix/smtpd[1693]: 0CEC4130197: client=server1.hostname.com[127.0.0.1], sasl_sender=web33_user@server1.hostname.com
Mar 6 13:26:37 server1 postfix/cleanup[1698]: 0CEC4130197: message-id=<200803061826.m26IQaej001707@server1.hostname.c om>
Mar 6 13:26:37 server1 postfix/qmgr[17320]: 0CEC4130197: from=<web33_user@server1.hostname.com>, size=745, nrcpt=1 (queue active)
Mar 6 13:26:37 server1 sendmail[1707]: m26IQaej001707: to=admispconfig@localhost.localdomain, ctladdr=web13_3452 (10045/10013), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30116, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 0CEC4130197)
Mar 6 13:26:37 server1 postfix/smtpd[1693]: disconnect from server1.hostname.com[127.0.0.1]
Mar 6 13:26:37 server1 postfix/local[1719]: 0CEC4130197: to=<admispconfig@server1.hostname.com>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
Mar 6 13:26:37 server1 postfix/qmgr[17320]: 0CEC4130197: removed
Mar 6 13:26:38 server1 postfix/smtp[1718]: 5F307130196: to=<diocassius@msn.com>, relay=mx4.hotmail.com[65.54.245.104], delay=2, status=sent (250 <200803061826.m26IQaPL001700@server1.hostname.co m> Queued mail for delivery)
Mar 6 13:26:38 server1 postfix/qmgr[17320]: 5F307130196: removed
Mar 6 13:26:45 server1 postfix/local[1699]: 065EA13017D: to=<web33_user@server1.hostname.com>, orig_to=<mike@hostname.com>, relay=local, delay=9, status=sent (delivered to command: /usr/bin/procmail -f-)
Mar 6 13:26:45 server1 postfix/qmgr[17320]: 065EA13017D: removed



Please note that I've replaced my own user name in ISPConfig with "user", and my machine and domain name with "hostname" for privacy and security reasons.

I gotta run, or else I'll be late for work. Any help would be greatly appreciated.

Thank you...
Reply With Quote
  #4  
Old 7th March 2008, 16:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

Please run
Code:
postmap /etc/postfix/virtusertable
and restart Postfix.

Do you get these problems with MSN addresses only, or with all addresses?
Please check if your server is blacklisted: http://www.mxtoolbox.com/blacklists.aspx
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 10th March 2008, 05:17
diocassius diocassius is offline
Junior Member
 
Join Date: Mar 2008
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
 
Default Thank you...

Thank you, Falko. Your knowledge is only exceeded by your generousity. It worked. I guess I should've seen it sooner, but when you work ten hours a day, six days a week, sometimes the fun stuff (like playing with servers) gets shuffled back.

Again, thank you...

~Mike
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 14:33
procmail can't write Hellbound General 27 8th June 2009 21:51
Postfix reject connections gabrix Server Operation 27 25th January 2007 08:37
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 12:16
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 11:47


All times are GMT +2. The time now is 15:00.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.