Unable to send or recieve emails.

Discussion in 'Installation/Configuration' started by Showa, Nov 1, 2011.

  1. Showa

    Showa Member HowtoForge Supporter

    Hello to you all,

    I have got a problem recieving and sending mails. I did search howtoforge and other sites for a solution, and tried to solve my problem.

    My ISP is blocking port 25. So I uncomment submission, put port 587 into my router pointing to my server, put TCP 587 into the firewall of ISPConfig 3 restarted the server as proposed in multiple threads. But without succes.

    Doing a portscan port 587 is open, 25 is closed. Telnetting to the port functions, but I am unable to sent and recieve mails. In the mail error log there is the remark: No route to host (port 25). Are there other settings I have to change?

    With kind regards,

    Ad.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit postfix master.cf file and remove the # in front of the submission line. Then restart postfix.
     
  3. eko_taas

    eko_taas New Member

    I have a same issue with ISP (blocking 25).

    How you plan to receive emails (or your ISP blocked only sending)? In my case sending possible via ISP's SMTP-server, so receiving (send by others*) is main issue...
     
  4. Showa

    Showa Member HowtoForge Supporter

    Thanks Till but editing the master file was the first thing I did.

    submission inet n - n - - smtpd
    -o smtpd_enforce_tls=yes
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject

    Or is editing only the first line sufficient?
    Do I have to put my domain name in main.cf?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The first line is sufficient

    Please be aware that enabling port 587 only means that you can send a email with a smtp client fom a external source to your server now and not that your server is able to send emails outside, as port 587 is only used for incoming messages. So please see also what eko_taas mentioned.

    If your provider offers a mail relay server, then you should use that mail relay server to send emails from your server. The details for the mail relay can be set under system > server config > email
     
    Last edited: Nov 1, 2011
  6. Showa

    Showa Member HowtoForge Supporter

    For sending my e-mail I am now using a relay server. Trying this functiones on gmail.

    For another account I have got the message:
    Action: failed
    Status: 5.6.1
    Diagnostic-Code: smtp;554 5.6.1 Body type not supported by Remote Host

    I'm still not able to recieve mail. I tried this with and without opening submission.

    With kind regards
    Ad.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You mean you sent a email from gmail to your server and it did not arrive? If port 25 is closed, you can not recieve emails from the internet as every external server will try to connect to your server on port 25. The submission port is only used as workarount to connect with a smtp client like thunderbird to your server directly and not for receiving external emails.

    To run a full mail server that receives mails directly from the internet, you need port 25 to be open from the internet to your server.
     
  8. Showa

    Showa Member HowtoForge Supporter

    No I could send mails using SquirrelMail and the mailboxes I created in ISPConfig to gmail but not to another e-mail adress. Then I got a message with the diagnostic code. I solved this problem by putting: smtp_never_send_ehlo=yes in main.cf

    If I understand you correctly I am unable to use for instance [email protected] or any other e-mailadress for my site if my ISP does block port 25.

    Momentary when I use the same ISP from a different IP-adress, mail to [email protected] is correctly redirected to the adresses I put in customrules. Using another ISP nothing happens. So this is due to blocking port 25?
     
  9. Showa

    Showa Member HowtoForge Supporter

    Still strugling with my e-mail. Never give up!

    My ISP is offering a way to bypass the closed port 25.

    According to them I have this in my MX and A records:

    mydomain.com MX 10 smpt.mydomain.com
    mydomain.com MX 20 mailrelay.planet.nl
    smpt.mydomain.nl A my ip-adress

    So I changed the first (existing) MX record from my.domain.com. mail priority 10 to mydomain.com. smpt.mydomain.com. priority 10

    and added: my.domain.com. mailrelay.planet.nl. priority 20

    and put in as A record smpt.mydomain.com. my ip-adress

    Still no succes. Sending no problem receiving non.
    Could this work, do I have to change something else in the settings, do I have to use mail instead of smpt?

    With kind regards Ad.
     
  10. falko

    falko Super Moderator ISPConfig Developer

    I think you have forgotten the trailing dots in your records. They should be as follows:

    Code:
    mydomain.com[COLOR="Red"].[/COLOR] MX 10 smpt.mydomain.com[COLOR="Red"].[/COLOR]
    mydomain.com[COLOR="Red"].[/COLOR] MX 20 mailrelay.planet.nl[COLOR="Red"].[/COLOR]
    smpt.mydomain.nl[COLOR="Red"].[/COLOR] A my ip-adress
     
  11. Showa

    Showa Member HowtoForge Supporter

    Hi Falko,

    No I did not forget the trailing dots. I put it in like this:

    I solved the problem by forwarding the e-mails at my domain host, but I would like to recieve the mails in squirrelmail on my server.
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Is it possible you made a typo somwhere? I see you use smpt.mydomain.com, but shouldn't it be smtp.mydomain.com?
     
  13. Showa

    Showa Member HowtoForge Supporter

    Hi Falko,

    Was a typo I made that before.

    Trying to send a mail got this result:


    The mail system

    <[email protected]>: host localhost[127.0.0.1] said: 550 Recipient
    <[email protected]> FAIL (in reply to RCPT TO command)

    <[email protected]>: host localhost[127.0.0.1] said: 550 Recipient
    <[email protected]> FAIL (in reply to RCPT TO command)
    Reporting-MTA: dns; email01.domeinbalie.nl
    X-Postfix-Queue-ID: DB7D55A009D
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Mon, 14 Nov 2011 13:22:25 +0100 (CET)

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.0.0
    Remote-MTA: dns; localhost
    Diagnostic-Code: smtp; 550 Recipient <[email protected]> FAIL

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.0.0
    Remote-MTA: dns; localhost
    Diagnostic-Code: smtp; 550 Recipient <[email protected]> FAIL

    Could I better surrender?

    Ad.
     
  14. falko

    falko Super Moderator ISPConfig Developer

    Is this for sending a mail to a remote server?

    What's in your mail log when you try to send a mail?
     
  15. Showa

    Showa Member HowtoForge Supporter

  16. falko

    falko Super Moderator ISPConfig Developer

    Did you check your mail log?

    Does the MX record of your domain point to the correct server?
     
  17. Showa

    Showa Member HowtoForge Supporter

    You mean the log in ispconfig? mail error or warn log?

    These are my records:
    A mydomain.com. my ip address
    A mail my ip address
    A smtp.mydomain.com. my ip address
    A www my ip address
    MX mydomain.com. smtp.mydomain.com. 10
    MX mydomain.com. mailrelay.planet.nl. 20
    MX mydomain.com. mail.mydomain.com. 10
    NS mydomain.com. dns0.domeinbalie.nl.
    NS mydomain.com. dns1.domeinbalie.nl.

    Let me know what you need from the logs.
     
  18. falko

    falko Super Moderator ISPConfig Developer

    Your MX settings seem to be ok.

    Take a look at the mail logs in the /var/log/ directory.
     
  19. Showa

    Showa Member HowtoForge Supporter

    Hi Falko,

    Here is (part) of my log. Momentary I am also unable to send mails, this was first no problem.

    Code:
    Nov 23 17:59:32 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 17:59:32 server1 dovecot: IMAP([email protected]): Disconnected: Logged out bytes=79/688
    Nov 23 18:00:01 server1 postfix/smtpd[6906]: connect from localhost.localdomain[127.0.0.1]
    Nov 23 18:00:01 server1 postfix/smtpd[6906]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Nov 23 18:00:01 server1 postfix/smtpd[6906]: disconnect from localhost.localdomain[127.0.0.1]
    Nov 23 18:00:01 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:00:01 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:04:33 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:04:33 server1 dovecot: IMAP([email protected]): Disconnected: Logged out bytes=79/688
    Nov 23 18:05:02 server1 postfix/smtpd[7146]: connect from localhost.localdomain[127.0.0.1]
    Nov 23 18:05:02 server1 postfix/smtpd[7146]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Nov 23 18:05:02 server1 postfix/smtpd[7146]: disconnect from localhost.localdomain[127.0.0.1]
    Nov 23 18:05:02 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:05:02 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:09:11 server1 postfix/qmgr[2630]: 6AEF5115BF5E: from=<[email protected]>, size=1522, nrcpt=1 (queue active)
    Nov 23 18:09:11 server1 postfix/qmgr[2630]: 3E87A115BF5C: from=<[email protected]>, size=1460, nrcpt=1 (queue active)
    Nov 23 18:09:11 server1 postfix/qmgr[2630]: 0F148115BF61: from=<[email protected]>, size=1435, nrcpt=2 (queue active)
    Nov 23 18:09:11 server1 postfix/smtp[7309]: connect to mx-vh.nl.clara.net[80.168.44.20]: No route to host (port 25)
    Nov 23 18:09:11 server1 postfix/smtp[7309]: 0F148115BF61: to=<[email protected]>, relay=none, delay=102049, delays=102049/0.02/0.07/0, dsn=4.4.1, status=deferred (connect to mx-vh.nl.clara.net[80.168.44.20]: No route to host)
    Nov 23 18:09:11 server1 postfix/smtp[7307]: 6AEF5115BF5E: to=<[email protected]>, relay=mailin.kpnmail.nl[213.75.3.30]:25, delay=188357, delays=188357/0.03/0.09/0, dsn=4.0.0, status=deferred (host mailin.kpnmail.nl[213.75.3.30] refused to talk to me: 421 4.0.0 Service temporary unavailable.)
    Nov 23 18:09:11 server1 postfix/smtp[7310]: 0F148115BF61: to=<[email protected]>, relay=mailin.kpnmail.nl[213.75.3.30]:25, delay=102049, delays=102049/0.03/0.08/0, dsn=4.0.0, status=deferred (host mailin.kpnmail.nl[213.75.3.30] refused to talk to me: 421 4.0.0 Service temporary unavailable.)
    Nov 23 18:09:14 server1 postfix/smtp[7308]: connect to mx-vh.nl.clara.net[80.168.44.20]: No route to host (port 25)
    Nov 23 18:09:14 server1 postfix/smtp[7308]: 3E87A115BF5C: to=<[email protected]>, relay=none, delay=189444, delays=189441/0.02/3.1/0, dsn=4.4.1, status=deferred (connect to mx-vh.nl.clara.net[80.168.44.20]: No route to host)
    Nov 23 18:09:36 server1 dovecot: auth-worker(default): mysql: Connected to localhost (dbispconfig)
    Nov 23 18:09:36 server1 dovecot: IMAP([email protected]): Disconnected: Logged out bytes=79/688
    Nov 23 18:09:36 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:10:01 server1 postfix/smtpd[7392]: connect from localhost.localdomain[127.0.0.1]
    Nov 23 18:10:01 server1 postfix/smtpd[7392]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Nov 23 18:10:01 server1 postfix/smtpd[7392]: disconnect from localhost.localdomain[127.0.0.1]
    Nov 23 18:10:01 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:10:01 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:14:38 server1 dovecot: IMAP([email protected]): Disconnected: Logged out bytes=79/688
    Nov 23 18:14:38 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:15:01 server1 postfix/smtpd[7609]: connect from localhost.localdomain[127.0.0.1]
    Nov 23 18:15:01 server1 postfix/smtpd[7609]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Nov 23 18:15:01 server1 postfix/smtpd[7609]: disconnect from localhost.localdomain[127.0.0.1]
    Nov 23 18:15:01 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:15:01 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:19:40 server1 dovecot: IMAP([email protected]): Disconnected: Logged out bytes=79/688
    Nov 23 18:19:40 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:20:01 server1 postfix/smtpd[7907]: connect from localhost.localdomain[127.0.0.1]
    Nov 23 18:20:01 server1 postfix/smtpd[7907]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Nov 23 18:20:01 server1 postfix/smtpd[7907]: disconnect from localhost.localdomain[127.0.0.1]
    Nov 23 18:20:01 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Nov 23 18:20:01 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secure
     
    Last edited: Nov 24, 2011
  20. falko

    falko Super Moderator ISPConfig Developer

    Please make sure that your server's network configuration is ok, that you have valid nameservers in /etc/resolv.conf, and that port 25 is not being blocked (e.g. by your ISP).
     

Share This Page