Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th October 2007, 22:50
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default [ISPConfig] Can't send and recieve emails

Hello,

I have installed ISPConfig and it seems like everything is working.

But I can't send (and receive) mails.

//edit: Update: now I actually CAN recieve mails (the problem was that I had added the line: home_maildir = Maildir/ in the main.cf, while ISPConfig has to manage it, so after deleting this line it works... Nevertheless, I can't send mails, although it works with the webmailer(!). Look at some of the newer posts if you want to see what has been done. thx

I tried:
telnet MYSERVER 25
220 MYSERVER ESMTP Postfix (Debian/GNU)
mail from:test@MYSERVER.tld
250 2.1.0 Ok
rcpt to:mail@domain.tld
554 5.7.1 <mail@domail.tld>: Relay access denied

I also cant recieve mails.

Here is postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = /etc/postfix/local-host-names
myhostname = server.example.de
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom


this is the main.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = server.example.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/local-host-names
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination

permit_mynetworks = yes
permit_sasl_authenticated = yes
reject_unauth_destination = yes

smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names
home_mailbox = Maildir/



The mail.err doesn't show up any errors...

Perhaps someone can help me? Would be really great!!

Thx,
name

Last edited by name; 9th October 2007 at 08:46.
Reply With Quote
Sponsored Links
  #2  
Old 7th October 2007, 23:34
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just testet the following:

telnet LOCALHOST(!) 25
helo localhost
.......

and send a mail just by connecting to the server via localhost instead of using the "gloabal" server-domainname.

This actually works and I get a mail with the correct sender (something@mydomain.tld).

Perhaps this is a clue?

thx,
name
Reply With Quote
  #3  
Old 8th October 2007, 17:54
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can the problem be, that my Servers IP is missing a Reverse DNS Entry?

Perhaps this would explain that it SENDS mails when connecting to "localhost" via telnet, but won't send mails (Relaya acces denied for any mail-adress I want to send a mail to) when connecting to the IP or Domain name?!


Hope someone can help me


thx,
name
Reply With Quote
  #4  
Old 8th October 2007, 18:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Quote:
554 5.7.1 <mail@domail.tld>: Relay access denied
Try an email client like Outlook or Thunderbird and make sure that you enable "Server requires authentication".
__________________
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
  #5  
Old 8th October 2007, 20:16
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

no I also can't send mails with thunderbird. It is just saying:
"The SMTP-Server isn't available or is refusing the connection"...

What I have tried so far:

Successfully sending a mail to mail@address.de via telnet localhost 25:
server:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 server.example.de ESMTP Postfix (Debian/GNU)
helo localhost
250 server.example.de
mail from:test@example.de
250 2.1.0 Ok
rcpt to:email@addresse.de
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject:testmail
test
.
250 2.0.0 Ok: queued as 8E97E2C234
quit
221 2.0.0 Bye
Connection closed by foreign host.


But when I try to connect to my address server.example.de nothing happens:
server:~# telnet server.example.de 25
Trying 0.0.0.0... (0.0.0.0 ist natürlich in Wirklichkeit die korrekte IP)
helo server.example.de

And it is just like halted....


Sending a mail from mail@address.de to web7test@server.example.de doesn't work and I get the following error MSG:
Reporting-MTA: dns; server.example.de
X-Postfix-Queue-ID: 25F252C235
X-Postfix-Sender: rfc822; email@addresse.de
Arrival-Date: Mon, 8 Oct 2007 17:32:07 +0200 (CEST)

Final-Recipient: rfc822; web7test@server.example.de
Original-Recipient: rfc822;web7test@server.example.de
Action: failed
Status: 5.4.6
Diagnostic-Code: X-Postfix; mail for server.example.de loops back to myself


Nevertheless i CAN connect to my Server via POP3 and IMAP, so when I place a "fake-mail-file" in the Maildir of mr. web7test in /var/www/web7/usr/web7user/Maildir/new/ it DOES show up in Thunderbird(!)


I even can't send mails to myself in my network:
server:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 server.example.de ESMTP Postfix (Debian/GNU)
helo localhost
250 server.example.de
mail from:test@example.de
250 2.1.0 Ok
rcpt to:web7user@server.example.de
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject:testmail
leider leider
.
250 2.0.0 Ok: queued as 0142C2C235
quit
221 2.0.0 Bye
Connection closed by foreign host.


Verifying to see if web7user exist is possitive:
mache ich ein verify erscheint folgendes:
vrfy web7test
252 2.0.0 web7test


Here is the maillog after sending a mail from myself via telnet localhost 25 to myself web7user@server.example.de:


Oct 8 19:04:31 server postfix/smtpd[3960]: connect from localhost.localdomain[127.0.0.1]
Oct 8 19:04:53 server postfix/smtpd[3960]: D6DE82C235: client=localhost.localdomain[127.0.0.1]
Oct 8 19:04:59 server postfix/cleanup[3967]: D6DE82C235: message-id=<20071008170453.D6DE82C235@server.example.de>
Oct 8 19:04:59 server postfix/qmgr[2505]: D6DE82C235: from=<test@example.de>, size=386, nrcpt=1 (queue active)
Oct 8 19:05:00 server postfix/smtp[3968]: D6DE82C235: to=<web7user@server.example.de>, relay=none, delay=17, delays=17/0.03/0.08/0, dsn=5.4.6, status=bounced (mail for server.web$
Oct 8 19:05:00 server postfix/cleanup[3967]: 077AB2C237: message-id=<20071008170500.077AB2C237@server.example.de>
Oct 8 19:05:00 server postfix/qmgr[2505]: 077AB2C237: from=<>, size=2254, nrcpt=1 (queue active)
Oct 8 19:05:00 server postfix/bounce[3970]: D6DE82C235: sender non-delivery notification: 077AB2C237
Oct 8 19:05:00 server postfix/qmgr[2505]: D6DE82C235: removed
Oct 8 19:05:00 server postfix/smtp[3968]: 077AB2C237: to=<web7test@server.example.de>, orig_to=<test@example.de>, relay=none, delay=0.04, delays=0.02/0/0.02/0, dsn=5.4.6, stat$
Oct 8 19:05:00 server postfix/qmgr[2505]: 077AB2C237: removed
Oct 8 19:05:06 server postfix/smtpd[3960]: disconnect from localhost.localdomain[127.0.0.1]


Actually I forgot to post my /etc/postfix/local-host-names last time:

###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
localhost.localdomain
www.example.de
example.de
#### MAKE MANUAL ENTRIES BELOW THIS LINE!



I have made a little change in the main.cf and just REMOVED the last line saying home_mailbox = Maildir/
because actually I want ISPConfig/Procmail to make all this with Maildir and now I can RECIEVE(!) Mails, but I cant send...


Thx for reading(!), as said the problem still is, that I can't SEND mails

Name

Last edited by name; 8th October 2007 at 20:30.
Reply With Quote
  #6  
Old 8th October 2007, 21:24
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok,

I hope this is the last "update" before everything works as it should

Because when I use the ISPConfig-Webmailer, it sends the mails as it should!!!


Nevertheless I cant get Thunderbird (and probably also Outlook, etc.) to work.

I have tried to send WITHOUT tls, WITH tls when its AVAILABLE, WITH tls and WITH ssl, everything brings up the same error-msg, that the SMTP either isn't available or refuses the connection.....

Perhaps this brings enough light into the darkness?

Hope so...

thx,
name
Reply With Quote
  #7  
Old 8th October 2007, 21:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,653 Times in 4,462 Posts
Default

Please post the output of the command:

iptables -L
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 8th October 2007, 21:34
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The output of "iptables -L":

server:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


There is really nothing, I don't think this is good?
Reply With Quote
  #9  
Old 9th October 2007, 16:05
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi again,

my it be, that although you can see there is no rule for the firewall, it is impossible to connect to the SMTP-Server of postfix from the OUTSIDE (you know, if it isn't a connection from localhost to localhost)?

Because as said, I even can't connect to server.example.de with telnet (wich isn't bad).
But if it is also impossible to get a connection to server.example.de's SMTP from e.g. Thunderbird, that would be a problem.

I don't know how to check it and I even don't know where to change the configs (of postfix) to accept "OUTSIDE" SMTP-Connections.


Perhaps someone can help me?

Thx
Reply With Quote
  #10  
Old 9th October 2007, 20:32
name name is offline
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Also it seems like noone can really help me and I don't want to "spam" too much, I have decided to give you a bit more info.


I now can login via telnet to my domain:

server:/var/log# telnet example.de smtp
Trying 87.239.137.4...
Connected to example.de.
Escape character is '^]'.
220 server.example.de ESMTP Postfix (Debian/GNU)
ehlo example.de
250-server.example.de
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
MIMENCODED-Username
334 UGFzc3dvcmQ6
MIMENCODED-Password
235 2.0.0 Authentication successful
mail from:tester@example.de
250 2.1.0 Ok
rcpt to:mymail@ddress.de
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject:Testmail
testtest
.
250 2.0.0 Ok: queued as 211AD2C237
quit
221 2.0.0 Bye
Connection closed by foreign host.

This mail does also arrive at my@ddress.de....

So why I can't connect to the SMTP via Thunderbord, Sylpheed Claws, etc...(!!!!!!!)???

Please please help

Does it just have something to do with the mail-clients setting or something else wrong?!


OK, i think the problem was, that thunderbird etc. was blocked by my pc :S

thx

Last edited by name; 9th October 2007 at 22:18.
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
Can Send Email, But Not Recieve mfdp10 Installation/Configuration 15 4th June 2007 10:18
Can Send Email, But Not Recieve; Relay access denied jazzgillum Installation/Configuration 21 31st May 2007 13:46
RoundCube Mail: Can't recieve or send ai_77 Installation/Configuration 8 27th February 2007 03:22
Can Send Email, But Not Recieve; Relay access denied googlah Installation/Configuration 14 30th August 2006 01:11
Cannot recieve emails med HOWTO-Related Questions 4 6th January 2006 11:02


All times are GMT +2. The time now is 20:01.


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