postfix mail configuration

Hi,

I was trying to follow the linode library article on how to install postfix to use for mail, and now i have some strange errors.

It doesn't seem like the mail is being delivered, for when I do the mailx sales@example.com (replacing that with my actual email account, of course), it has some errors in the /var/log/mail.log (at least it looks like errors), and no /home/vmail/dovecot-deliver.log

Some of the seemingly looking errors from /var/log/mail.log are below:

Nov 26 01:24:13 mtgames postfix/cleanup[16332]: 600B3627B0: message-id=<20101126072413.600B3627B0@mtgames.org>

Nov 26 01:24:13 mtgames postfix/bounce[16337]: 44720627AF: sender non-delivery notification: 600B3627B0

Nov 26 01:24:13 mtgames postfix/qmgr[15599]: 600B3627B0: from=<>, size=1950, nrcpt=1 (queue active)

Nov 26 01:24:13 mtgames postfix/trivial-rewrite[16335]: warning: do not list domain mtgames.org in BOTH mydestination and virtualmailboxdomains

Nov 26 01:24:13 mtgames postfix/qmgr[15599]: 44720627AF: removed

Nov 26 01:24:13 mtgames postfix/trivial-rewrite[16335]: warning: do not list domain mtgames.org in BOTH mydestination and virtualmailboxdomains

Nov 26 01:24:13 mtgames postfix/trivial-rewrite[16335]: last message repeated 24 times

Nov 26 01:24:13 mtgames postfix/local[16336]: warning: alias database loop for postmaster

Nov 26 01:24:13 mtgames postfix/local[16336]: 600B3627B0: to=<postmaster@mtgames.org>, orig_to=<root@mtgames.org>, relay=local,

delay=0.02, delays=0/0/0/0.02, dsn=5.4.6, status=bounced (alias database loop for postmaster)

Nov 26 01:24:13 mtgames postfix/qmgr[15599]: 600B3627B0: removed

I hope someone here can help me with this matter.

Thanks,

-Michael.

19 Replies

Hi,

Just was wondering if anyone had seen this topic, and if so, if anyone had any ideas.

-Michael.

Nov 26 01:24:13 mtgames postfix/trivial-rewrite[16335]: warning: do not list domain mtgames.org in BOTH mydestination and virtual_mailbox_domains Nov 26 01:24:13 mtgames postfix/trivial-rewrite[16335]: last message repeated 24 times First thing to do is fix this.

Hi,

I seem to have fixed that particular problem, by removing mtgames.org from the domains table.

However, now I have a user webmaster@mtgames.org in the users table, but when I send an email to it, it bounces.

Anyone know why, even though I have the mtgames.org domain as my domain that you set up in the original configuration, it won't except the mail?

Also, I still have the errors about database loop for postmaster.

Thanks for any help,

-Michael.

@lilmike:

Anyone know why, even though I have the mtgames.org domain as my domain that you set up in the original configuration, it won't except the mail?
Michael, I just tried both webmaster and postmaster @mtgames.org and I did not get any errors. If it still isn't working as expected, take a look at your logs or turn up the level of logging to see what is going on.

Also, one of your MX records for mtgames does not have an A record.

Travis

Hi,

I got the email (kind of) working, but I've got a few problems here.

When I send email to webmaster@mtgames.org, support@mtgames.org, or email@mtgames.org, postfix returns it undeliverable.

Also, it doesn't seem that postfix opens up the default smtps port, as i tried setting my smtp port to 465, because it said that it won't accept cleartext over a non-ssl connection, but now it says connection to the server failed.

I tried using a nmap port scan on my linode, and indeed, 465 is not open.

I checked the sql table, and all the information seems to be there, it's just not getting to my email, like webmaster@mtgames.org, email@mtgames.org, and support@mtgames.org. All my other email addresses receive email fine, but just don't send email.

Hope someone can help me with this.

Thanks,

-Michael.

Check that the SMTPS line is not commented out in /etc/postfix/master.cf - remove the #.

#smtps     inet  n       -       -       -       -       smtpd

@pclissold:

Check that the SMTPS line is not commented out in /etc/postfix/master.cf - remove the #.

#smtps     inet  n       -       -       -       -       smtpd


Don't forget to uncomment the "-o" lines immediately after the smtps line either:

#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#  -o smtpd_peername_lookup=no

(Not sure if those are all from the default config - I may have added some myself)

Whoops – Stever is right -- it was too early in the morning here to be answering postfix questions. Only smtpdpeernamelookup=no is non-standard.

Hi,

I uncommented the lines, did a service postfix reload, and did a nmap port scan – 465 is now open.

I have to wait until I get home to see if it works, but it seems to be fine so far.

Now I am trying to install squirrel mail on my linode for webmail, and i just have one error:

When I go to log in, it logs in fine, but it gives me this error in the left pain:

ERROR:

ERROR: Could not complete request.

Query: CREATE "Sent"

Reason Given: Unknown namespace.

I'm not sure if I should create a new topic for this, but I figured I'd post here to see if anyone knows.

Thanks,

-Michael.

Hi, my mail seems to be thoroughly broken.

I tried sending to webmaster@mtgames.org, webmaster@ai5hf.org, and many others with my hotmail account, and all got returned by hotmail, as if the mail server didn't even exist (at least that's what I think it looks like).

The reason I think this is because before, when I tried sending to something that didn't exist, it would say something like this is the mtgames mail server, that email address could not be delivered to.

It also won't let me send email over smtps, or smtp. I tried using clear text on smtp, and it said that is not available over a non-secured connection. So i tried a secure connection, and it said that the connection to the server has failed. I did a port scan of my system, and it sure seems like port 465 is open.

Can anyone else try sending email to webmaster@mtgames.org and see what happens?

Also (and this is odd), my squirrel mail can send emails from those accounts just fine.

This is all very strange.

Hope someone can help me with this matter.

Thanks,

-Michael.

P.S. Is there some kind of setting that would stop outside senders from sending email and just let senders from 127.0.0.1 in?

````
$ dig mtgames.org mx

; <<>> DiG 9.3.2 <<>> mtgames.org mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59423
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;mtgames.org. IN MX

;; ANSWER SECTION:
mtgames.org. 3600 IN MX 10 mtgames.org.

;; ADDITIONAL SECTION:
mtgames.org. 3600 IN A 72.14.189.72

;; Query time: 341 msec
;; SERVER: 205.133.7.2#53(205.133.7.2)
;; WHEN: Wed Dec 1 01:43:23 2010
;; MSG SIZE rcvd: 61

This looks OK.

$ telnet mtgames.org 25
Trying 72.14.189.72…
telnet: connect to address 72.14.189.72: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
````

But your SMTP server is not reachable from here - either it's not listening on a public interface, or you have a firewall blocking connections to it.

Well, I seem to have found something interesting.

I tried installing something, and it apparently decided it would like to overright lots of my postfix configuration files, and not dovecot, and not postfix/sasl/smtpd.conf, just so it could try and work, but still fail. heh.

Anyway, I've tried to fix all the places it messed up in trying to figure things out, and i think I've got most of them.

The only thing now is:

I tried connecting to send mail with an account that has been failing to send mail for a while, and I check the logs imeediately, and got this:

Dec1 02:23:25 mtgames postfix/smtpd[15396]: connect from ip72-219-42-29.br.br.cox.net[72.219.42.29]

Dec1 02:23:25 mtgames postfix/smtpd[15396]: setting up TLS connection from ip72-219-42-29.br.br.cox.net[72.219.42.29]

Dec1 02:23:25 mtgames postfix/smtpd[15396]: Anonymous TLS connection established from ip72-219-42-29.br.br.cox.net[72.219.42.29]: TLSv1 with cipher RC4-MD5 (128/128 bits)

Dec1 02:23:25 mtgames postfix/smtpd[15396]: warning: SASL: Connect to private/dovecot-auth failed: No such file or directory

Dec1 02:23:25 mtgames postfix/smtpd[15396]: fatal: no SASL authentication mechanisms

Dec1 02:23:26 mtgames postfix/master[14761]: warning: process /usr/lib/postfix/smtpd pid 15396 exit status 1

Dec1 02:23:26 mtgames postfix/master[14761]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling

and I get this with a netstat command (with some other switches):

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 14761/master

And this:

tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 14761/master

I can't see anything in iptables that would say that it was blocking ports 25 or 465, either.

Hope someone can help me with this matter.

-Michael.

@lilmike:

Dec1 02:23:25 mtgames postfix/smtpd[15396]: warning: SASL: Connect to private/dovecot-auth failed: No such file or directory

Dec1 02:23:25 mtgames postfix/smtpd[15396]: fatal: no SASL authentication mechanisms

You either haven't set up dovecot auth, or you have it's socket in a different place than postfix expects to find it.

In postfix's main.cf, look for "smtpdsaslpath", and make sure it points to the same location as what is in dovecot.conf.

For example (not that yours has to match this, but your two paths need to meet):
@main.cf:

#

Dovecot SASL

#

smtpdsasltype = dovecot

smtpdsaslpath = private/auth

@dovecot.conf:

auth default {

socket listen {

client {

path = /var/spool/postfix/private/auth

mode = 0660

user = postfix

group = postfix

Hi,

Ok, that seems to have been (at least) part of the problem.

I changed the line in /etc/postfix/main.cf to private/auth, instead of private/dovecot-auth.

Now, telneting to mtgames.org 25 seems to work.

Yet, there is still one last problem it seems (there may be more, but I'm not at home to test sending emial yet):

When you telnet mtgames.org 465, it connects, but just sits there.

Now, looking in the logs, it seems there is yet another problem:

Dec1 11:13:07 mtgames postfix/smtpd[1645]: connect from li59-247.members.linode.com[97.107.129.247]

Dec1 11:13:07 mtgames postfix/smtpd[1645]: setting up TLS connection from li59-247.members.linode.com[97.107.129.247]

Dec1 11:13:22 mtgames postfix/smtpd[1645]: SSL_accept error from li59-247.members.linode.com[97.107.129.247]: -1

Dec1 11:13:22 mtgames postfix/smtpd[1645]: warning: TLS library problem: 1645: error:140760FC:SSL routines:SSL23GETCLIENTHELLO:unknown protocol:s23srvr.c:578:

Dec1 11:13:22 mtgames postfix/smtpd[1645]: lost connection after CONNECT from li59-247.members.linode.com[97.107.129.247]

Dec1 11:13:22 mtgames postfix/smtpd[1645]: disconnect from li59-247.members.linode.com[97.107.129.247]

Thanks for any help,

-Michael.

@lilmike:

When you telnet mtgames.org 465, it connects, but just sits there.
That is as it should be. The smtps port is configured to work only with tls/ssl, which telnet does not know how to deal with.

Hi,

Well, we seem to be getting somewhere.

It doesn't hang anymore, and it seems to connect just fine.

However, now it still refuses to send mail (although now it receives it, phew!).

Here are some errors when I try sending mail:

Dec1 17:41:26 mtgames postfix/smtpd[17046]: connect from ip72-219-42-29.br.br.cox.net[72.219.42.29]

Dec1 17:41:26 mtgames postfix/smtpd[17046]: setting up TLS connection from ip72-219-42-29.br.br.cox.net[72.219.42.29]

Dec1 17:41:26 mtgames postfix/smtpd[17046]: Anonymous TLS connection established from ip72-219-42-29.br.br.cox.net[72.219.42.29]: TLSv1 with cipher RC4-MD5 (128/128 bits)

Dec1 17:41:26 mtgames postfix/smtpd[17046]: NOQUEUE: reject: RCPT from ip72-219-42-29.br.br.cox.net[72.219.42.29]: 554 5.7.1 : Client host rejected: Access denied; from=<webmaster@ai5hf.org> to=<webmaster@mtgames.org> proto=ESMTP helo= Dec1 17:41:26 mtgames postfix/smtpd[17046]: disconnect from ip72-219-42-29.br.br.cox.net[72.219.42.29]

I wonder what 554 means, for some reason it seems to not like the email or something.

Hope someone can help.

Thanks,

-Michael.

A copy of the email is below:

The body of the email says:

hi!

Then my signature (which I won't disclose here since it contains my contact info (other than email address, as y'all already know some of them :)).

Edit: It isn't sending on two of my email accounts, so it's not just this one.

@lilmike:

Dec1 17:41:26 mtgames postfix/smtpd[17046]: NOQUEUE: reject: RCPT from ip72-219-42-29.br.br.cox.net[72.219.42.29]: 554 5.7.1 : Client host rejected: Access denied; from=<webmaster@ai5hf.org> to=<webmaster@mtgames.org> proto=ESMTP helo=

Have you set up your mail client to supply the correct account and password when you try to send the mail? It looks like you are not even trying to authenticate.

I'm pretty sure my mail client is trying to authenticate, but there is something in that main.cf file about noanonymous.

And when I connect, it does say anonymous tls or something like that.

I wonder, does anyone know what settings I should use for the smtp server for my mail client?

I currently use port 465, require secure checked, clear text authentication, and I'm sure my password is right.

Thanks,

-Michael.

Hi,

I still can't seem to get my email client working with my current configuration.

Therefore, I would like to ask: Does anyone know the proper settings for the email client to get it to connect over ssl?

My current settings are:

Outgoing email: smtp.mtgames.org

username: my email address.

logon using: Cleartext authentication.

My server requires authentication: yes.

Smtp server port: 465.

Requires ssl: yes.

Thanks for any help,

-Michael.

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