HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Sending Mail Via Postfix Woes (http://www.howtoforge.com/forums/showthread.php?t=58239)

Wsbs9GC 12th August 2012 11:56

Sending Mail Via Postfix Woes
 
Hello there. I recently installed ubuntu and ispconfig3 following one of those "perfect server" guides. Everything appeared to go smoothly. However, when connecting to my email accounts on the server through thunderbird, I can receive email but cannot send email. I can send and receive email via the webmail webpage. Postfix is operating on port 587 as I'm on comcast and that's what they require for outgoing mail. The error that I get in /var/log/mail.log:
Quote:

Aug 12 05:40:01 www postfix/smtpd[27096]: connect from localhost.localdomain[127.0.0.1]
Aug 12 05:40:01 www dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 12 05:40:01 www dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 12 05:40:01 www postfix/smtpd[27096]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Aug 12 05:40:01 www postfix/smtpd[27096]: disconnect from localhost.localdomain[127.0.0.1]
Aug 12 05:45:01 www dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 12 05:45:01 www postfix/smtpd[27164]: connect from localhost.localdomain[127.0.0.1]
Aug 12 05:45:01 www dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 12 05:45:01 www postfix/smtpd[27164]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Aug 12 05:45:01 www postfix/smtpd[27164]: disconnect from localhost.localdomain[127.0.0.1]
and the error that I get in thunderbird:
Quote:

Sending of message failed.
The message could not be sent because the connection to SMTP server mail.domain.com [yes, this has my real domain not a dummy] was lost in the middle of the transaction. Try again or contact your network administrator.
I imagine that it's a misconfiguration of dovecot or postfix but as I'm new to linux and system administration, I have no clue regarding how to fix the issue or how to go about troubleshooting the issue.

Any advice on the issue is greatly appreciated.

Sir Henry 13th August 2012 16:25

Is this a server on the internet or your home PC?

You are not showing any log lines that would be related to an incoming SMTP connection from an external host. On the other hand, are you sure that the name 'mail.domain.com' (replace with your name) gets mapped to your server? You said you can receive mail but there are no connections from outside in your log snippet.

Wsbs9GC 14th August 2012 01:06

This is a server on my home LAN. I was running thunderbird from another machine in my LAN. As far as relevant log lines, what log should I post the contents of (or at least a cat | tail )? I'm new to linux and server administration and started this as a hobby so any guidance is greatly appreciated. My mynetworks parameter in /etc/postfix/main.cf which I believe might be relevant is
Quote:

mynetworks = 127.0.0.0/8 [::1]/128
I have tried adding 192.168.1.0/24 to this variable thinking that perhaps no auth attempts were made because they never made it to the auth daemon due to being blocked by this parameter and noticed no difference. I have since reverted my addendum.

What else can I try and what logs should I be looking at?

Sir Henry 14th August 2012 10:26

Well, 127.0.0.1 is the localhost address, and 192.168.1.x is your network. In your log there is no login attempt from a 192.168.1.x address.

What is the address you are trying to connect to from the client PC?

Wsbs9GC 14th August 2012 10:28

The LAN IP of my server is 192.168.1.9 and the LAN IP of the machine which I'm running thunderbird on is 192.168.1.7.

Edit: I think it's also important to know that I am accessing my server through the MX record of my domain, not the lan address of the server machine.

Sir Henry 14th August 2012 10:40

Yes that is important, because it might not resolve correctly. Have you tried to replace the host name with the IP address?

Wsbs9GC 14th August 2012 10:57

I just tried your advice and I couldn't log into my email account on the server because it didn't recognize my account name and password combination.

The output of sudo cat /var/log/mail.log | tail -n 30 after attempting to connect:
Quote:

Aug 14 04:45:02 www dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 14 04:45:02 www postfix/smtpd[14025]: connect from localhost.localdomain[127.0.0.1]
Aug 14 04:45:02 www dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 14 04:45:02 www postfix/smtpd[14025]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Aug 14 04:45:02 www postfix/smtpd[14025]: disconnect from localhost.localdomain[127.0.0.1]
Aug 14 04:46:34 www dovecot: auth-worker: mysql(localhost): Connected to database dbispconfig
Aug 14 04:46:34 www dovecot: imap-login: Login: user=<nicholas@mail.quantumcooler.net>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.9, mpid=14056, TLS
Aug 14 04:48:11 www dovecot: imap-login: Aborted login (no auth attempts): rip=192.168.1.7, lip=192.168.1.9
Aug 14 04:48:11 www dovecot: imap-login: Aborted login (no auth attempts): rip=192.168.1.7, lip=192.168.1.9
Aug 14 04:48:11 www dovecot: pop3-login: Aborted login (no auth attempts): rip=192.168.1.7, lip=192.168.1.9
Aug 14 04:48:12 www dovecot: pop3-login: Aborted login (no auth attempts): rip=192.168.1.7, lip=192.168.1.9
Aug 14 04:48:21 www postfix/smtpd[14070]: connect from unknown[192.168.1.7]
Aug 14 04:48:21 www postfix/smtpd[14074]: connect from unknown[192.168.1.7]
Aug 14 04:48:21 www postfix/smtpd[14070]: improper command pipelining after EHLO from unknown[192.168.1.7]: QUIT\r\n
Aug 14 04:48:21 www postfix/smtpd[14070]: disconnect from unknown[192.168.1.7]
Aug 14 04:48:21 www postfix/smtpd[14074]: improper command pipelining after EHLO from unknown[192.168.1.7]: QUIT\r\n
Aug 14 04:48:21 www postfix/smtpd[14074]: disconnect from unknown[192.168.1.7]
Aug 14 04:48:29 www dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.7, lip=192.168.1.9, TLS: SSL_read() failed: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca: SSL alert number 48
Aug 14 04:48:46 www dovecot: auth-worker: mysql(localhost): Connected to database dbispconfig
Aug 14 04:49:00 www dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<nicholas>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, TLS
Aug 14 04:49:26 www dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<nicholas@192.168.1.9>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, TLS
Aug 14 04:49:41 www dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<nicholas>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, TLS
Aug 14 04:49:47 www dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<nicholas@192.168.1.9>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, TLS
Aug 14 04:50:02 www dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 14 04:50:02 www postfix/smtpd[14114]: connect from localhost.localdomain[127.0.0.1]
Aug 14 04:50:02 www dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 14 04:50:02 www postfix/smtpd[14114]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Aug 14 04:50:02 www postfix/smtpd[14114]: disconnect from localhost.localdomain[127.0.0.1]
Aug 14 04:50:12 www dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<nicholas>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, TLS
Aug 14 04:50:18 www dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<nicholas@192.168.1.9>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, TLS

Sir Henry 14th August 2012 18:09

I did not ask you to change your username, just the mail server address. And do not use SSL/TLS while you are still testing your connection.

Configure TB with :

User Name = nicholas@your.domain (exactly as set up in ISPConfig, do *not* use the IP address here!)
Server Name = 192.168.1.9
Connection Security = NONE
Authentication Method = Normal Password

Use the same settings for incoming and outgoing server!

Then receive and send mail and post your Postfix log again.

Wsbs9GC 14th August 2012 18:32

Whoops. I didn't realize I had changed my username. Thanks for pointing that out. I did as you have instructed and here are the results:

Thunderbird's error:
Quote:

Sending of message failed.
The message could not be sent because connecting to SMTP server 192.168.1.9 failed. The server may be unavailable or is refusing SMTP connections. Please verify that your SMTP server settings are correct and try again, or contact the server administrator.
cat /var/log/mail.log | tail -n 15:
Quote:

Aug 14 12:24:35 www dovecot: auth-worker: mysql(localhost): Connected to database dbispconfig
Aug 14 12:24:35 www dovecot: imap-login: Login: user=<nicholas@mail.quantumcooler.net>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.9, mpid=24480, TLS
Aug 14 12:25:01 www dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 14 12:25:01 www dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Aug 14 12:25:01 www postfix/smtpd[24505]: connect from localhost.localdomain[127.0.0.1]
Aug 14 12:25:01 www postfix/smtpd[24505]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Aug 14 12:25:01 www postfix/smtpd[24505]: disconnect from localhost.localdomain[127.0.0.1]
Aug 14 12:25:25 www dovecot: imap(nicholas@mail.quantumcooler.net): Disconnected: Logged out bytes=213/619
Aug 14 12:25:26 www dovecot: imap(nicholas@mail.quantumcooler.net): Disconnected: Logged out bytes=16976/32472
Aug 14 12:26:10 www dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.7, lip=192.168.1.9
Aug 14 12:26:34 www dovecot: imap-login: Login: user=<nicholas@mail.quantumcooler.net>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, mpid=24532
Aug 14 12:26:36 www dovecot: imap-login: Login: user=<nicholas@mail.quantumcooler.net>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, mpid=24534
Aug 14 12:26:39 www dovecot: imap-login: Login: user=<nicholas@mail.quantumcooler.net>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, mpid=24536
Aug 14 12:26:39 www dovecot: imap-login: Login: user=<nicholas@mail.quantumcooler.net>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, mpid=24538
Aug 14 12:26:39 www dovecot: imap-login: Login: user=<nicholas@mail.quantumcooler.net>, method=PLAIN, rip=192.168.1.7, lip=192.168.1.9, mpid=24540
The error from Thunderbird comes up immediately after trying to send an email. It appears to have received without error.

Sir Henry 14th August 2012 18:45

Ok, receiving seems to work but Postfix is most probably not listening on port 25. Can you post the output of 'postconf -n' please.


All times are GMT +2. The time now is 17:54.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.