Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jun 04, 2010 10:34 am 
Offline
Senior Newbie

Joined: Mon Nov 30, 2009 5:50 pm
Posts: 5
Hi All,

I'm in an absolute mess with my Ubuntu web server. I tried to get mail going a few days ago, but it wouldn't work. So I tried installing Postfix, Sendmail, Exim, and a few others that I can't even think of at the moment.

All I want is the ability for Drupal to send mail.

Now, I can’t figure out what’s installed, whether one program is interfering with another, etc… Worse again, I read somewhere yesterday that removing the Postfix package removes Mysql! I’m fairly sure that this isn’t true, but it still makes me nervous.

I’m in a complete mess – not only can I not diagnose the problem, I can’t figure out which problem to diagnose. I think the original problem might have had to do with a wrong hostname….but I’m not sure.

Anyway, if anyone can help me get back to scratch, I’d love to be able to start over and get this thing working.

Thanks for the help,

Terry


Top
   
 Post subject:
PostPosted: Fri Jun 04, 2010 10:43 am 
Offline
Junior Member

Joined: Thu Jun 03, 2010 4:44 pm
Posts: 35
What OS are you running? Please paste the result of the following SSH commands:

Code:
$ tail -25 /var/log/mail.log
$ tail -25 /var/log/mail.err


Top
   
 Post subject: OS
PostPosted: Fri Jun 04, 2010 10:49 am 
Offline
Senior Newbie

Joined: Mon Nov 30, 2009 5:50 pm
Posts: 5
Right. OS.

Ubuntu 10


sudo: unable to resolve host saltcod
Jun 1 20:25:37 saltcod postfix/smtpd[21941]: lost connection after RCPT from 111-240-144-160.dynamic.hinet.net[111.240.144.160]
Jun 1 20:25:37 saltcod postfix/smtpd[21941]: disconnect from 111-240-144-160.dynamic.hinet.net[111.240.144.160]
Jun 1 20:28:57 saltcod postfix/anvil[21943]: statistics: max connection rate 1/60s for (smtp:111.240.144.160) at Jun 1 20:25:36
Jun 1 20:28:57 saltcod postfix/anvil[21943]: statistics: max connection count 1 for (smtp:111.240.144.160) at Jun 1 20:25:36
Jun 1 20:28:57 saltcod postfix/anvil[21943]: statistics: max cache size 1 at Jun 1 20:25:36
Jun 3 20:26:11 saltcod postfix/smtpd[26531]: connect from 111-240-139-208.dynamic.hinet.net[111.240.139.208]
Jun 3 20:26:12 saltcod postfix/smtpd[26531]: NOQUEUE: reject: RCPT from 111-240-139-208.dynamic.hinet.net[111.240.139.208]: 554 5.7.1 <candy59839@yahoo.com.tw>: Relay access denied; from=<michael78694@MyMainServer.com> to=<candy59839@yahoo.com.tw> proto=SMTP helo=<www.MyMainServer.com>
Jun 3 20:26:12 saltcod postfix/smtpd[26531]: lost connection after RCPT from 111-240-139-208.dynamic.hinet.net[111.240.139.208]
Jun 3 20:26:12 saltcod postfix/smtpd[26531]: disconnect from 111-240-139-208.dynamic.hinet.net[111.240.139.208]
Jun 3 20:29:32 saltcod postfix/anvil[26534]: statistics: max connection rate 1/60s for (smtp:111.240.139.208) at Jun 3 20:26:11
Jun 3 20:29:32 saltcod postfix/anvil[26534]: statistics: max connection count 1 for (smtp:111.240.139.208) at Jun 3 20:26:11
Jun 3 20:29:32 saltcod postfix/anvil[26534]: statistics: max cache size 1 at Jun 3 20:26:11
Jun 4 10:37:11 saltcod postfix/pickup[29708]: A1FAE8A72: uid=1000 from=<saltcod>
Jun 4 10:37:11 saltcod postfix/cleanup[29730]: A1FAE8A72: message-id=<20100604143711.A1FAE8A72@saltcod.members.linode.com>
Jun 4 10:37:11 saltcod postfix/qmgr[2358]: A1FAE8A72: from=<saltcod@waterstreetgm.org>, size=424, nrcpt=1 (queue active)
Jun 4 10:37:11 saltcod postfix/local[29732]: A1FAE8A72: to=<root@waterstreetgm.org>, orig_to=<root>, relay=local, delay=0.08, delays=0.07/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Jun 4 10:37:11 saltcod postfix/qmgr[2358]: A1FAE8A72: removed
Jun 4 10:37:46 saltcod postfix/smtpd[29769]: connect from localhost[127.0.0.1]
Jun 4 10:39:07 saltcod postfix/smtpd[29769]: lost connection after UNKNOWN from localhost[127.0.0.1]
Jun 4 10:39:07 saltcod postfix/smtpd[29769]: disconnect from localhost[127.0.0.1]
Jun 4 10:46:42 saltcod postfix/pickup[29708]: 3493F8A72: uid=1000 from=<saltcod>
Jun 4 10:46:42 saltcod postfix/cleanup[29799]: 3493F8A72: message-id=<20100604144642.3493F8A72@saltcod.members.linode.com>
Jun 4 10:46:42 saltcod postfix/qmgr[2358]: 3493F8A72: from=<saltcod@waterstreetgm.org>, size=424, nrcpt=1 (queue active)
Jun 4 10:46:42 saltcod postfix/local[29801]: 3493F8A72: to=<root@waterstreetgm.org>, orig_to=<root>, relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Jun 4 10:46:42 saltcod postfix/qmgr[2358]: 3493F8A72: removed




And there's nothing in /var/log/mail.err -- which I assume is bad!

Thanks!


Top
   
 Post subject: sudo....
PostPosted: Fri Jun 04, 2010 10:55 am 
Offline
Senior Newbie

Joined: Mon Nov 30, 2009 5:50 pm
Posts: 5
I assume the message at the top (sudo unable to resolve host) has to do with my hostname or hosts issue. I've tried to figure that one out too!

/etc/hosts contains:


127.0.0.1 localhost
74.207.228.220 waterstreetgm.org

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


While /etc/hostname contains only:

saltcod


Top
   
 Post subject:
PostPosted: Fri Jun 04, 2010 11:41 am 
Offline
Junior Member

Joined: Thu Jun 03, 2010 4:44 pm
Posts: 35
You can correct the "sudo: unable to resolve host saltcod" error by adding "saltcod" to your "/etc/hosts" file. For example:
Code:
127.0.0.1 localhost saltcod
74.207.228.220 waterstreetgm.org

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


I don't see anything in your mail.log directly related to sending email from a web application. It looks like your SMTP service is open to the public, and some are attempting to use your server as a relay server (which those emails are being rejected). I can see that some local mail has been delivered. Try sending an email from Drupal, run "tail -25 /var/log/mail.log" immediately after and paste the results here again. Exactly what email address are you attempting to send to?


Top
   
 Post subject:
PostPosted: Fri Jun 04, 2010 11:50 am 
Offline
Senior Newbie

Joined: Mon Nov 30, 2009 5:50 pm
Posts: 5
hi Brian,

So. I'm an idiot. I posted the log file contents from the Linode that I did have mail working through. Sorry about that. The one I posted does indeed work.

On teh one that doesn't work, when I try the tail command, I get nothing at all -- no output, no error.

I've tried running it as sudo and as my normal user.

Thanks for looking

Terry


Top
   
 Post subject:
PostPosted: Fri Jun 04, 2010 12:02 pm 
Offline
Junior Member

Joined: Thu Jun 03, 2010 4:44 pm
Posts: 35
I'd recommend removing all of the mail transport agent programs you've installed so far other than postfix ("apt-get remove {InsertPackageName}"). You can find all installed packages with "dpkg -l" and you may be able to narrow them down with "dpkg -l | grep mail".

After you have done this, reconfigure postfix with "dpkg-reconfigure postfix".

If you have not already, read https://help.ubuntu.com/community/Postfix. Continue to post any questions you may have.


Top
   
 Post subject:
PostPosted: Fri Jun 04, 2010 12:58 pm 
Offline
Senior Newbie

Joined: Mon Nov 30, 2009 5:50 pm
Posts: 5
Well, it worked. Somehow


I tried removing the postfix, sendmail, etc, etc packages as instructed, but they wouldn't go away - even as root. in the end, an apt-get install postfix was all that was required.

This is precisely the thing that makes me very nervous about hosting my own web server! The seeming inexplicablity of things like this!

Thanks a lot for your help

Terry


Top
   
 Post subject:
PostPosted: Fri Jun 04, 2010 1:44 pm 
Offline
Junior Member

Joined: Thu Jun 03, 2010 4:44 pm
Posts: 35
saltcod wrote:
This is precisely the thing that makes me very nervous about hosting my own web server! The seeming inexplicablity of things like this!

There is a learning curve to managing your own web server. I am always available for freelance if you need someone to manage it for you. :D

I'm glad you got things running!


Top
   
 Post subject: Re: sudo....
PostPosted: Fri Jun 04, 2010 5:47 pm 
Offline
Senior Member

Joined: Tue Feb 19, 2008 10:55 am
Posts: 164
saltcod wrote:
I assume the message at the top (sudo unable to resolve host) has to do with my hostname or hosts issue. I've tried to figure that one out too!

/etc/hosts contains:


127.0.0.1 localhost
74.207.228.220 waterstreetgm.org

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


While /etc/hostname contains only:

saltcod


/etc/hosts should look like:
127.0.0.1 localhost
74.207.228.220 waterstreetgm.org saltcod

test before and after the change with the commands
hostname
hostname -f


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group