In a mess with Postfix, Sendmail, Exim, etc

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

9 Replies

What OS are you running? Please paste the result of the following SSH commands:

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

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= 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=, 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= 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=, 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!

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

You can correct the "sudo: unable to resolve host saltcod" error by adding "saltcod" to your "/etc/hosts" file. For example:

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?

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

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.

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

@saltcod:

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!

@saltcod:

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

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