[Solved] Setting up E-mail on Ubuntu 12. (Postfix/Dovecot)

Ok so to start off, I am yet another linux n00b (relatively).

My issue is that I can't get any third party software (in my case thunderbird) to connect to the server.

I've been at this for about two weeks now off and on, and well, It's time to ask for more help lol

I've gone through this set of instructions.

https://library.linode.com/email/postfi … 0.19-mysql">https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql

I tried testing the ports as per some suggestions I've read.

Telnet and OpenSSH both worked for Imap and Pop3 via console (putty).

I have a firewall as per the "securing your server" guide, using iptables. (https://library.linode.com/email/postfi … 0.19-mysql">https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql)

Aaaaaand this is the long and short of it..

nonetforyou.com is the domain, if that can come in handy.

I will love forever anyone who can help me fix my mess. :)

Dave

Edits:

Make sure you have the correct ports enabled in your iptables firewall.

Some ISP providers block port 25. Add another port for receiving mail into your SMTP. The server will still need to listen on port 25 to receive from the outside world.

(Don't forget to modify your iptables and configs to allow for the ports)

smtpd pass - - - - - smtpd <--- This line needs to be enabled in post fix's config file.

You're welcome :)

18 Replies

How are you trying to connect via IMAP? SSL or no SSL? I see that you have IMAP listening on port 993 (IMAP with SSL) and not 143 (IMAP without SSL).

Is it possible that it's a config issue on your end in Thunderbird?

I'm trying to log in with SSL.

I downloaded Dreammail because it actually gives error reports, but requires me to use only Pop3

I now have username and password error.. which should not be the case anyways.

thisbetheaddress@xxxx.com as an example user name. It shows in the sql database as it's in there, but I suppose I could have fat fingered a key.. Though I doubt it, as I cut and pasted from a separate file to make sure what I had entered matched.

Ah well, I guess now I have to figure out how'n the antarctic I'm going to change that string of data lol

I'll keep this updated for the next "me" that comes along.

(I suppose I could give postfixadmin and phpmyadmin a try..)

Thanks so far, for the reply!

Truly appreciated!

[Derail from objective. Snipping.]

Well, I'm still at it. lol

The documentation has changed a bit since I first set it up. I went through much of the setup process again.

I think I've narrowed it down to this:

!include conf.d/*.conf

When trying to use doveadm per troubleshooting to see if it recognizes an email address, I get this.

root@whateverconsolestuff: doveadm user notreallythemail@xxxx.com

doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 2: No matches

I get the same thing if I use "doveadm user myuser"

Here are the first 4 lines.

Enable installed protocols

!include conf.d/*.conf

!include_try /usr/share/dovecot/protocols.d/*.protocol

protocols = imap pop3 lmtp

Guide link: https://www.linode.com/docs/email/email … g-packages">https://www.linode.com/docs/email/email-with-postfix-dovecot-and-mysql#installing-packages

Troubleshooting link: https://www.linode.com/docs/email/postf … redentials">https://www.linode.com/docs/email/postfix/troubleshooting-problems-with-postfix-dovecot-and-mysql/#verifying-your-login-credentials

Any thoughts out there, internets?

I should have some heavy metal going when I head bang. Not silence and a desk. lolisuckatlinux

Ps: If I remove all the peculiar \'s that appeared in the re-write, I get this stuff.

doveadm user myuser

doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf (<-- this doesn't work, btw.)

doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:9: sslcertfile has been replaced by sslcert = doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:10: sslkeyfile has been replaced by sslkey = doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:12: namespace private {} has been replaced by namespace { type=private }

doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 23: Unknown setting: globalscriptpath

-- Changing more things, including the location of the SSL stuff to the actual file location, which wasn't listed in documentation removed the :9 and :10 errors.

line 12, and 23, I don't know what to do with.

line 12: namespace private {

separator = .

prefix = INBOX.

inbox = yes

}

protocol lda {

Line 23: log_path = /home/vmail/dovecot-deliver.log

authsocketpath = /var/run/dovecot/auth-master

postmaster_address = postmaster@xxxx.com

mail_plugins = sieve

globalscriptpath = /home/vmail/globalsieverc

}

Thanks!

Dave

Still at it…

doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:34: auth_user has been replaced by service auth { user }

doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:36: passdb sql {} has been replaced by passdb { driver=sql }

doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:40: userdb static {} has been replaced by userdb { driver=static }

I have NO idea what these are supposed be to change to.

I do not know what the syntax is. I needa see it.

I've tried the dovecot doveadm -n or whatever for the new config file, which I can no longer remember, or find, because I'm looking for it… so that's not an option.

It's all completely useless until I can at least get past this syntax, and there's no example config files anywhere that I've looked.

HALP HALP HALP

And pressing onward… by commenting out a lot of error'd fields, I was able to run the command to get a new configuration file.

Dovecot seems to be working, but now I can't SMTP.. Like it's not there.

I'll try messing with the port 25 thing later when I have more time, but for now, it seems like it's more broken stuff.

Edit -- Yea that was that problem… Now for the next mess…

Nothing I send get's received.

Jul 30 20:23:56 hostname dovecot: lmtp(25642, contact@xxxx.com): Error: user thisistheaccount@xxxx.com: Initialization failed: Namespace 'INBOX.': mkdir(/home/vmail/xxxx.com/contact/Maildir) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: /home, dir owned by 0:0 mode=0755)

@Methlon:

Jul 30 20:23:56 hostname dovecot: lmtp(25642, contact@nonetforyou.com): Error: user thisistheaccount@nonetforyou.com: Initialization failed: Namespace 'INBOX.': mkdir(/home/vmail/nonetforyou.com/contact/Maildir) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: /home, dir owned by 0:0 mode=0755)

The directory has the wrong owner (owned by root).

Thanks for the reply :)

I'm still lost, though.

The only thing I can notice is that it's trying to go to /home/var instead of /var, which is owned by vmail as per linodes instructions.

/home itself, of course is going to be owned by the root user. /home is not specified in the config files…

(mail_location = maildir:/var/mail/vhosts/%d/%n)

I tried setting the ownership of /var and all that to root (through winscp, because I don't know how to console), but there was no change, so best I figure (in my ignorant to all this mind) is my problem lies with that.

I've no idea how to handle that. Unless your solution was simply too simple for to understand. lol

(I did try setting the config user to root, also. No change.)

Well… I'm working now. (At least pop 3. Imap still sucks, but I just won't use Imap.)

I have no idea what I did, but I did that, and then re-re-re-re-configure my email client (after making some port changes)

Last things I typed was this.

chgrp vmail /etc/dovecot/dovecot.conf

chmod g+r /etc/dovecot/dovecot.conf

So in summary, when installing postfix/dovecot, the first thing you want to do is generate the new config format before you start hitting the documentation.

Then you start going on the internet and shoving crap into your console until it works. lol

Hrm… guess I didn't fix it all.

Had one e-mail somewhere along the way that managed to come in while something worked before I guess I broke it lol.

Now, while I can send perfectly fine going out, I can't get anything from outside (like gmail or aol) to come in.

Error logs aren't showing me anything. (I had to delete them for being too large to load lol and then did not come back, so I nano'd in a blank so the files would exist.) Still empty.

I get this in reply.

<contact@nonetforyou.com>: host nonetforyou.com[23.239.26.130] refused to talk

to me: 421 4.3.2 All server ports are busy

I've port 25'd countless times.

Telnet works.

No idea where to go.

mailq also shows empty.

I'll keep trying, but if anyone out there has any bright ideas, holler.

This is getting a bit grueling now lol

Can you provide the output of:

tail -n 100 /var/log/maillog or /var/log/mail.log (not sure which one it's going to be on your configuration)

This ~should~ show where that e-mail's going and why (feel free to censor any of your IPs)

Thanks,

Dave.

I get nothing. Mine are formatted as mail.log

I'm thinking maybe I should just kinda uninstall and remove everything e-mail related and start over this weekend.

If it's already broken, how can I break it worse right? lol

Thanks,

Dave

You could definitely try that, I'm not really sure why this is happening.. Hm. Then again, I don't have a lot of experience with Postfix specifically. I've only used it a few times. I tend to go for Exim.

Let me know how it goes!

Thanks,

Dave.

Will do for sure.

I'd like to (once I get this resolved) have something handy so that my trouble can fix someone else's problem lol

Might even give Exim a shot, since I've only just now heard of it. ;)

Hey there,

I definitely agree and that's one of the perks of joining our forum and sharing your knowledge with others! If someone else runs into this issue, it's easy for them to take a peek at how you solved it :)

If you need any assistance moving forward just post here, we'll do our best!

Thanks,

Dave.

Well, got the logs working again.

I maybe kind of had not considered I had to reset the permissions properly.

I at least get this much… This is what occurs when outside e-mail tries to come in.

Thing is, I have no idea what to do about it lol

> Aug 9 16:35:40 methnode postfix/postscreen[1644]: PASS NEW [205.188.109.202]:56153

Aug 9 16:35:40 methnode postfix/postscreen[1644]: warning: cannot connect to service private/smtpd: No such file or directory

Aug 9 16:35:40 methnode postfix/postscreen[1644]: PASS NEW [205.188.109.202]:56153

Aug 9 16:35:40 methnode postfix/postscreen[1644]: DISCONNECT [205.188.109.202]:56153

Aug 9 16:35:41 methnode postfix/postscreen[1644]: CONNECT from [205.188.109.202]:56248 to [23.239.26.130]:25

Aug 9 16:35:41 methnode postfix/postscreen[1644]: PASS OLD [205.188.109.202]:56248

Aug 9 16:35:41 methnode postfix/postscreen[1644]: warning: cannot connect to service private/smtpd: No such file or director

I checked the 10-master.conf for dovecot, and the location and file it points to in the config Does exist..

I wonder what I broke..

~# telnet localhost smtp

Trying 127.0.0.1…

Connected to localhost.nonetforyou.com.

Escape character is '^]'.

421 4.3.2 All server ports are busy

Connection closed by foreign host.

Tried telnet for the laughs. I don't like the punchline. lol

Any ideas out there?

Thanks,

Dave

VICTORY! VICTORY!

smtpd pass - - - - - smtpd

This line needs to be un-commented out of postfix's master.cf

It was that stupidly simple lol

@Methlon:

VICTORY! VICTORY!

smtpd pass - - - - - smtpd

This line needs to be un-commented out of postfix's master.cf

It was that stupidly simple lol

Thanks for this, I've been beating my head against the wall for days due to this issue!!!!

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