#1  
Old 17th October 2007, 22:14
mickeb mickeb is offline
Junior Member
 
Join Date: Oct 2007
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Default Relay SMTP problem

Hi i have worked 5 hours to get this work...

I have Outlook. I want send mail from it. IMAP connection is OK but Sending mail it get a error: Coulnt not connect to host.

I have:
1. Added ports in Firewall (SMTP SSL port: 465) And checked if port 25 was addded.
I have run netstat

Quote:
#Netstat -anp | grep 465
No results found

Quote:
# netstat -anp | grep 25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 31561/master
tcp6 0 0 :::25 :::* LISTEN 31561/masterunix 2 [ ACC ] STREAM LISTENING 6243 2582/acpid /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 61225 31561/master public/flush
unix 2 [ ACC ] STREAM LISTENING 61251 31561/master private/discard
unix 2 [ ACC ] STREAM LISTENING 61255 31561/master private/local
unix 2 [ ACC ] STREAM LISTENING 61259 31561/master private/virtual
unix 2 [ ACC ] STREAM LISTENING 6025 2474/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 6277 2587/authdaemond /var/run/courier/authdaemon/socket.tmp
unix 3 [ ] STREAM CONNECTED 61258 31561/master
unix 3 [ ] STREAM CONNECTED 61257 31561/master
unix 3 [ ] STREAM CONNECTED 61254 31561/master
unix 3 [ ] STREAM CONNECTED 61253 31561/master
unix 3 [ ] STREAM CONNECTED 61250 31561/master
unix 3 [ ] STREAM CONNECTED 60025 31272/couriertls
unix 2 [ ] DGRAM 6288 2596/courierlogger
unix 2 [ ] DGRAM 6262 2586/courierlogger
and i did this also:
Quote:
# netstat -anp | grep smtp
unix 2 [ ACC ] STREAM LISTENING 61235 31561/master private/smtp
unix 2 [ ACC ] STREAM LISTENING 61287 31561/master private/bsmtp

shoudlnt SMTP be listning similar like apache?
If i do
Quote:
# netstat -anp | grep apache
tcp6 0 0 :::80 :::* LISTEN 15103/apache2
tcp6 0 0 :::443 :::* LISTEN 15103/apache2
I found by searching the forum how you could add 465port SMTP SSL but i dont know exactly how to do this in the master.cf file, or is it other file if you use debian etch?

Quote:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
But there is a problem i tried to remove the # but postfix made a error in mail.err
Quote:
Mail.err
Oct 17 19:55:17 server1 postfix/master[28292]: fatal: /etc/postfix/master.cf: line 18: bad transport type: smtpd_sasl_auth_enable=yes
Oct 17 19:59:04 server1 postfix/master[29433]: fatal: /etc/postfix/master.cf: line 18: missing "transport type" field
so i added # back.

I made a external TELNET test on port 25, 465 and it returned could not find host.

I made a NMAP test also and it didnt find 25, 465 port open, even though i opened them in the ISPCONFIG->management ->services->firewall:
Quote:
Name Port Type Active
FTP 21 tcp yes
SSH 22 tcp yes
SMTP 25 tcp yes
DNS 53 tcp yes
DNS 53 udp yes
WWW 80 tcp yes
ISPConfig 81 tcp yes
POP3 110 tcp yes
SSL (www) 443 tcp yes
Webmin 10000 tcp yes
POP SSL 995 tcp yes
IMAP 143 tcp yes
IMAP SSL 993 tcp yes
SMTP SSL 465 tcp yes
Hehe how do i solve this anyone got or had similuar problems?

Humble regards Mike
Reply With Quote
Sponsored Links
  #2  
Old 18th October 2007, 03:34
mickeb mickeb is offline
Junior Member
 
Join Date: Oct 2007
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Default Nmap result

21/tcp open ftp
22/tcp open ssh
53/tcp open domain
80/tcp open http
81/tcp open hosts2-ns
110/tcp open pop3
143/tcp open imap
443/tcp open https
993/tcp open imaps
995/tcp open pop3s

why it dont show smtp?

Greetings Mike
Reply With Quote
  #3  
Old 18th October 2007, 16:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Comment out this part:
Code:
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
so that it looksl ike this:
Code:
smtps inet n - - - - smtpd
 -o smtpd_tls_wrappermode=yes
 -o smtpd_sasl_auth_enable=yes
 -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
Restart Postfix then.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 18th October 2007, 16:51
mickeb mickeb is offline
Junior Member
 
Join Date: Oct 2007
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes i did!

Thank you so much

regards mike
Reply With Quote
  #5  
Old 28th December 2007, 19:31
fsoyer fsoyer is offline
Junior Member
 
Join Date: Nov 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello all,
hello and thanks for work, Falko (and for so many answers on this forum, too !)

I have installed ISPConfig on an Etch with the http://www.howtoforge.com/perfect_setup_debian_etch, and it works fine.

Just this %!@#! smtp authentication....
After hours of research on the forum, I got it, so let me resume (hum hum, I'm afraid of not be able to do it short...) !

With this tuto, once the server has been set as MX for a domain, it receive mails for existing users (and aliases), and reject unknown recipients : good.
I had no real problem to use POP(S) and IMAP(S) for reading mails, just think to :
- check "Maildir" on ISPConfig admin/parameters/e-mail page, to avoid "chdir Maildir : not such file or directory" messages on server
- add right lines and ports in the ISPConfig firewall (admin->services->firewall) if enabled (respectively ports 25, 110, 995, 143 and/or 993).
I had no problem too for sending mail from the server itself.

The problem comes when I want to send mail through this server from a remote mail client (Evolution on my laptop).
First, no way to connect to the server with standard smtp. The first two hours of searchs and tests to find... that this is blocked by my ISP to avoid spams ! So the port 25 is used for MTA to MTA discuss (so it must be enabled on the server), but is used too for MUAs to MTA transfers, and that is blocked by ISPs (am I right ?).
Ok. After all, why not, spam is bad. Bouh.

So I try with SSL. The SMTPS port is 465, open it on firewall, blah blah blah.
Evolution is set to join the server with smtp on SSL, but first say "enable to connect to server". Finally, I noticed with a "nmap localhost" on server that Postfix was not listening on port 465, only 25.
The master.cf modification (smpts line) is the truth ! However, though the connect error is solved, nothing happened. Evolution is waiting and never ask for a password, and no messages on server except "postfix/smtpd[23942]: connect from xxxxx" then it fall in timeout.
Another hour to find that I had not commented out the option line of smtps (" -o smtpd_tls_wrappermode=yes") in master.cf !
Argh. But what a @!#?% !!!

So I can use ISPConfig installation and users as SMTP and Imaps/pops server. Pfooo !

Just note that the two last lines ("smtpd_sasl_auth_enable" and "smtpd_client_restrictions") are not necessary, since there are already in main.cf.

So, however some questions come to me :
1. Maybe the master.cf modification can be added to the Perfect setup, to avoid some other nightmares ?...
2. With Evolution I must check "use Maildir" on server in order to read mail. Is this necessary with others mail clients (Outlook, thunderbird...) ? And is Maildir format OK for this clients ? Not tested.
3. Which difference between TLS and SSL ? Evolution has this two options, but when I try "SMTP with TLS", it says "I/O error"... Some idea of why ? And how it works ?

Thanks again.
Reply With Quote
  #6  
Old 29th December 2007, 14:21
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Quote:
Originally Posted by fsoyer
2. With Evolution I must check "use Maildir" on server in order to read mail. Is this necessary with others mail clients (Outlook, thunderbird...) ? And is Maildir format OK for this clients ? Not tested.
Are you using IMAP? Because I can't remember enabling Maildir in any email client with POP3.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relay access denied when using SMTP to external recipients Kamran Shah Installation/Configuration 111 14th May 2014 18:10
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
postfix smtp sasl auth problem hammer Installation/Configuration 1 13th July 2006 18:19


All times are GMT +2. The time now is 00:34.


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