LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-23-2009, 03:56 PM   #1
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Rep: Reputation: 15
Unhappy Postfix not working


I'm running Ubuntu Hardy Heron ...

I followed this tutorial to setup mail and also used some info from a few others: http://jonsview.com/2008/07/14/setti...ix-and-courier

Here is the output of my testing:

$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 verticalweb ESMTP Sendmail 8.14.2/8.14.2/Debian-2build1; Thu, 23 Apr 2009 15:51:07 -0500; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]

ehlo localhost
250-verticalweb Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP

MAIL FROM: <myemail@mydomain.com>
250 2.1.0 <myemail@mydomain.com>... Sender ok

RCPT TO: <anotheremail@ofmine.com>
250 2.1.5 <anotheremail@ofmine.com>... Recipient ok

data
354 Enter mail, end with "." on a line by itself

test
.
421 4.3.0 collect: Cannot write ./dfn3NKp75U016905 (bfcommit, uid=0, gid=121): No such file or directory
Connection closed by foreign host.

I'm not sure how relevant this is, but I tailed /var/log/mail.info:

Apr 23 15:54:29 verticalweb sm-mta[16905]: n3NKp75U016905: SYSERR(root): collect: Cannot write ./dfn3NKp75U016905 (bfcommit, uid=0, gid=121): No such file or directory
Apr 23 15:54:29 verticalweb sm-mta[16905]: n3NKp75U016905: from=<myemail@domain.com>, size=5, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]


Okay, so it seems to be a permissions issue or something. Or, maybe there is something else that I'm missing. Who can help?!

Last edited by tdnnash25; 04-23-2009 at 04:01 PM.
 
Old 04-23-2009, 06:55 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You're running sendmail, not postfix.
 
Old 04-24-2009, 06:42 AM   #3
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Berhanie View Post
You're running sendmail, not postfix.
So how can I fix this? I want to be able to send/receive...
 
Old 04-24-2009, 08:33 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
I don't know the answer, but hopefully someone who uses ubuntu can step in now and tell us
the proper way to switch MTAs. Or, you can read the ubuntu documentation.
 
Old 04-24-2009, 11:36 AM   #5
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
Code:
sudo aptitude install postfix
sudo aptitude remove sendmail 
sudo invoke-rc.d postfix start
Or do it through Synaptic / your package manager of choice.
 
Old 04-24-2009, 12:29 PM   #6
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
still not working

Quote:
Originally Posted by archangel_617b View Post
Code:
sudo aptitude install postfix
sudo aptitude remove sendmail 
sudo invoke-rc.d postfix start
Or do it through Synaptic / your package manager of choice.
Okay, I went through the Ubuntu Server Guide doc to setup mail. I even did what you suggested. But when I try to test, I still get an error message. Is there a different way to test to see if outgoing mail is working? Just not sure if this is the way to do it or not...




tdash@verticalweb:/home/tommy$ sudo aptitude remove sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
The following packages have been kept back:
linux-image-server linux-server ntfs-3g
0 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
tdash@verticalweb:/home/tommy$ sudo invoke-rc.d postfix start
* Starting Postfix Mail Transport Agent postfix [ OK ]
tdash@verticalweb:/home/tommy$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 verticalweb ESMTP Sendmail 8.14.2/8.14.2/Debian-2build1; Fri, 24 Apr 2009 12:23:41 -0500; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
ehlo localhost
250-verticalweb Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
MAIL FROM: <tdash@localhost>
250 2.1.0 <tdash@localhost>... Sender ok
RCPT TO: <tdnnash25@gmail.com>
250 2.1.5 <tdnnash25@gmail.com>... Recipient ok
data
354 Enter mail, end with "." on a line by itself
test
.
421 4.3.0 collect: Cannot write ./dfn3OHNf2E024152 (bfcommit, uid=0, gid=121): No such file or directory
Connection closed by foreign host.
 
Old 04-24-2009, 12:38 PM   #7
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
Either sendmail is still installed. This is how you should be able to tell it isn't:
Code:
aptitude show sendmail
Package: sendmail
State: not installed
Version: 8.14.2-2build1
If it still says installed, you need to uninstall it still.

Or else, it's still running. Try just rebooting your system to get rid of any leftover processes.

- Arch
 
Old 04-24-2009, 01:01 PM   #8
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
output of aptitude show sendmail

Quote:
Originally Posted by archangel_617b View Post
Either sendmail is still installed. This is how you should be able to tell it isn't:
Code:
aptitude show sendmail
Package: sendmail
State: not installed
Version: 8.14.2-2build1
If it still says installed, you need to uninstall it still.

Or else, it's still running. Try just rebooting your system to get rid of any leftover processes.

- Arch

Thanks for your input. Here is the output of that command


tdash@verticalweb:/home/tommy$ sudo aptitude show sendmail
Package: sendmail
State: not installed
Version: 8.14.2-2build1
Priority: extra
Section: universe/mail
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Uncompressed Size: 254k
Depends: sendmail-base, sendmail-bin, sendmail-cf, sensible-mda
Suggests: rmail, sendmail-doc
Replaces: sendmail-tls


I will reboot the server soon and post my results.
 
Old 04-24-2009, 01:38 PM   #9
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
it works now

After rebooting the server, I can now send mail from telnet ... Now I just need to figure out how to make sure users can have an account in an email client, etc.

I also need to make sure that pop3/incoming mail works. Any tips as I dive into this?
 
Old 04-24-2009, 02:45 PM   #10
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
Install Dovecot and then point Thunderbird at your mailserver. Should work just fine.

- Arch
 
Old 04-24-2009, 04:20 PM   #11
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
hmmm, not working

Quote:
Originally Posted by archangel_617b View Post
Install Dovecot and then point Thunderbird at your mailserver. Should work just fine.

- Arch
Ok, I installed Dovecot and setup my account in Thunderbird.

Currently I have my mail server in thunderbird set to the IP address of my server. The thunderbird server settings are set to "TLS if available". When I click "Get Mail" in Thunderbird, it prompts me to view a Security Certificate from the server, but it warns me that it has expired. I continue anyway ... then I get another popup dialog box right after that that says "You have attempted to establish a connection with "IP address" (has my public IP). However, the security certificate presented belongs to "servername" (has my server name). It is possible, though unlikely, that someone may be trying to intercept your communication with this web site. If you suspect the certificate shown does not belong to "IP address", please cancel the connection and notify the site administrator". I click on OK and it seems to proceed to connect to the server and it tells me that I do not have any messages. However, there is at least 1 email in my account at /var/spool/mail/"user"

I probably don't have something configured right, but not sure what that may be.

Many thanks in advance!
 
Old 04-24-2009, 04:57 PM   #12
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
figured out my problem

I figured out my problem ...

I had to change the maildir location to /var/spool/mail/%u
 
Old 04-24-2009, 05:05 PM   #13
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
I'm getting relay access denied errors now.

I have a user on my server called "test" and I tried to send an email from my GMAIL account to test@mydomain.com and got a returned error message about relay access denied ...

dns to my server works ... I can telnet on port 25 and 110 - any ideas what I need to do in order to make this work? Now the goal is to get people on the Internet to be able to email my users on the box ... so test@myserver.com will get email when checking email via Thunderbird or client of their choice
 
Old 04-24-2009, 05:17 PM   #14
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I would guess your setting of "mydestination" in postfix's main.cf does not include mydomain.com

Can you should postconf -n?
 
Old 04-25-2009, 07:49 AM   #15
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
worked

Quote:
Originally Posted by billymayday View Post
I would guess your setting of "mydestination" in postfix's main.cf does not include mydomain.com

Can you should postconf -n?

Thanks, this was the problem ... I did have mail.mydomain.com, but I added mydomain.com and this resolved the problem.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix TLS working fine but SSL over port 25 not working bob808 Linux - Server 10 07-25-2009 09:20 PM
Help! postfix is not working importboy03 Linux - Software 17 01-03-2009 12:31 PM
Postfix not working rjcrews Debian 3 05-03-2006 09:08 AM
Postfix Not working fredws Mandriva 3 03-16-2005 09:53 PM
vacation not working with postfix jmcollin92 Linux - Software 5 09-21-2004 11:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration