Can't send emails [edit: not related to Migration Tool]

Discussion in 'Plugins/Modules/Addons' started by axxies, Jun 12, 2016.

  1. axxies

    axxies Member

    I bought the Migration Tool yesterday and successfully migrated the old server to a new today. However, something must have gone wrong because now I can't send emails with the new server. I get "SMTP Error (550): Failed to add recipient.".

    I have set this Debian 8 (Jessie) using the Perfect Server setup, then run the ISPconfig Migration Tool. Both the old and the new server is running ISPconfig3.

    Any ideas what could be wrong?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact error messages from mail log file.
     
  3. axxies

    axxies Member

    Latest test from /var/log/mail.log :
    Test setup: login into webmail on the host. Send an email from a local email address to a remote email address.

    <snip>

    Jun 14 13:31:51 <myhost> dovecot: imap-login: Login: user=<my-sender-email>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2285, secured, session=<Px8PBz01VgB/AAAB>
    Jun 14 13:31:51 <myhost> dovecot: imap(<my-sender-email>): Disconnected: Logged out in=44 out=562
    Jun 14 13:32:35 <myhost> postfix/smtpd[2332]: connect from localhost[127.0.0.1]
    Jun 14 13:32:35 <myhost> postfix/smtpd[2332]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <my-receiver-email>: Recipient address rejected: <receiver-domain>; from=<my-sender-email> to=<my-receiver-email> proto=ESMTP helo=<myhost>.startdedicated.net>
    Jun 14 13:32:36 <myhost> postfix/smtpd[2332]: disconnect from localhost[127.0.0.1]
    Jun 14 13:32:43 <myhost> dovecot: imap-login: Login: user=<my-sender-email>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2341, secured, session=<sKIsCj01YAB/AAAB>
    Jun 14 13:32:43 <myhost> dovecot: imap(<my-sender-email>): Disconnected: Logged out in=173 out=3068

    </snip>
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the /etc/postfix/master.cf file.
     
  5. axxies

    axxies Member

    All of it or the things that was changed during the installation of the server? Here is what was changed:

    <snip>
    ==============================
    smtp inet n - - - - smtpd
    #smtp inet n - - - 1 postscreen
    #smtpd pass - - - - - smtpd
    #dnsblog unix - - - - 0 dnsblog
    #tlsproxy unix - - - - 0 tlsproxy
    submission inet n - - - - smtpd
    -o syslog_name=postfix/submission
    -o smtpd_tls_security_level=encrypt
    -o smtpd_sasl_auth_enable=yes
    # -o smtpd_reject_unlisted_recipient=no
    # -o smtpd_client_restrictions=$mua_client_restrictions
    # -o smtpd_helo_restrictions=$mua_helo_restrictions
    # -o smtpd_sender_restrictions=$mua_sender_restrictions
    # -o smtpd_recipient_restrictions=
    # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    -o smtpd_client_restrictions=permit_sasl_authenticated d,reject
    # -o milter_macro_daemon_name=ORIGINATING
    smtps inet n - - - - smtpd
    -o syslog_name=postfix/smtps
    -o smtpd_tls_wrappermode=yes
    -o smtpd_sasl_auth_enable=yes
    # -o smtpd_reject_unlisted_recipient=no
    # -o smtpd_client_restrictions=$mua_client_restrictions
    # -o smtpd_helo_restrictions=$mua_helo_restrictions
    # -o smtpd_sender_restrictions=$mua_sender_restrictions
    # -o smtpd_recipient_restrictions=
    # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    -o smtpd_client_restrictions=permit_sasl_authenticated d,reject
    # -o milter_macro_daemon_name=ORIGINATING


    </snip>
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the complete and exact file that you have on your server.
     
  7. axxies

    axxies Member

    I was not able to upload files with a .cf extension, so please disregard the current extension .txt .
     

    Attached Files:

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check line 27 and 39, both have a typo. the correct lines are (copied from perfect server tutorial):

    -o smtpd_client_restrictions=permit_sasl_authenticated,reject

    That's a setup issue and not related to the migration tool.
     
  9. axxies

    axxies Member

    Oh. Ok. Well, I tested it and copied it from the guide for the Perfect Server, restarted the postfix service, but the problem remains. Is this info stored somewhere else too?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the complete modified master.cf file.
     
  11. axxies

    axxies Member

    Ok
     

    Attached Files:

  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The file looks ok now. Login to your webmail client with a mailbox of your server and send an email from within this webmail client to the same address that you used for webmail login. Wait 1 minute, then check /var/log/mail.log and post the lines that got added for this email sending attempt and check in webmail if the email arrived in the mailbox.
     
  13. axxies

    axxies Member

    Message received, so that worked.
    Contents of /var/log/mail.log:

    <snip>
    Jun 15 09:50:10 [my-host] amavis[1979]: (01979-03) Passed CLEAN {RelayedInternal}, LOCAL [127.0.0.1]:60663 <[my-send-receive-email]> -> <[my-send-receive-email]>, Queue-ID: 64DFF60013E1, Message-ID: <6b9e88b317fc0c41dec9ae8ca5b2e595@[my-send-receive-email-domain]>, mail_id: Muo4g6AAIdhI, Hits: -, size: 1173, queued_as: 900C560014B0, 138 ms
    Jun 15 09:50:10 [my-host] postfix/smtp[18848]: 64DFF60013E1: to=<[my-send-receive-email]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.25, delays=0.11/0/0/0.14, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 900C560014B0)
    Jun 15 09:50:10 [my-host] postfix/qmgr[1977]: 64DFF60013E1: removed
    Jun 15 09:50:10 [my-host] postfix/pickup[14148]: D0A096001C01: uid=5000 from=<[my-send-receive-email]>
    Jun 15 09:50:10 [my-host] postfix/cleanup[18847]: D0A096001C01: message-id=<6b9e88b317fc0c41dec9ae8ca5b2e595@[my-send-receive-email-domain]>
    Jun 15 09:50:10 [my-host] dovecot: lda([my-send-receive-email]): sieve: msgid=<6b9e88b317fc0c41dec9ae8ca5b2e595@[my-send-receive-email-domain]>: forwarded to <alla@[my-send-receive-email-domain]>
    Jun 15 09:50:10 [my-host] postfix/qmgr[1977]: D0A096001C01: from=<[my-send-receive-email]>, size=1838, nrcpt=1 (queue active)
    Jun 15 09:50:10 [my-host] postfix/smtpd[18841]: disconnect from localhost[127.0.0.1]
    Jun 15 09:50:10 [my-host] dovecot: imap([my-send-receive-email]): Disconnected: Logged out in=1055 out=570
    Jun 15 09:50:10 [my-host] dovecot: lda([my-send-receive-email]): sieve: msgid=<6b9e88b317fc0c41dec9ae8ca5b2e595@[my-send-receive-email-domain]>: stored mail into mailbox 'INBOX'
    Jun 15 09:50:10 [my-host] postfix/pipe[18855]: 900C560014B0: to=<[my-send-receive-email]>, relay=dovecot, delay=0.39, delays=0.07/0/0/0.32, dsn=2.0.0, status=sent (delivered via dovecot service)
    Jun 15 09:50:10 [my-host] postfix/qmgr[1977]: 900C560014B0: removed
    Jun 15 09:50:10 [my-host] postfix/smtpd[18854]: F251460013E1: client=localhost[127.0.0.1]
    Jun 15 09:50:10 [my-host] postfix/cleanup[18847]: F251460013E1: message-id=<6b9e88b317fc0c41dec9ae8ca5b2e595@[my-send-receive-email-domain]>
    Jun 15 09:50:11 [my-host] postfix/smtpd[18854]: disconnect from localhost[127.0.0.1]
    Jun 15 09:50:11 [my-host] postfix/qmgr[1977]: F251460013E1: from=<[my-send-receive-email]>, size=2259, nrcpt=1 (queue active)
    Jun 15 09:50:11 [my-host] amavis[1978]: (01978-04) Passed CLEAN {RelayedInbound}, [127.0.0.1] <[my-send-receive-email]> -> <alla@[my-send-receive-email-domain]>, Message-ID: <6b9e88b317fc0c41dec9ae8ca5b2e595@[my-send-receive-email-domain]>, mail_id: 7k_M5QcNva4a, Hits: -, size: 1838, queued_as: F251460013E1, 97 ms
    Jun 15 09:50:11 [my-host] postfix/smtp[18848]: D0A096001C01: to=<alla@[my-send-receive-email-domain]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.26, delays=0.16/0/0/0.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as F251460013E1)
    Jun 15 09:50:11 [my-host] postfix/qmgr[1977]: D0A096001C01: removed
    Jun 15 09:50:11 [my-host] postfix/pickup[14148]: 203CE6001C01: uid=5000 from=<[my-send-receive-email]>
    Jun 15 09:50:11 [my-host] postfix/cleanup[18847]: 203CE6001C01: message-id=<6b9e88b317fc0c41dec9ae8ca5b2e595@[my-send-receive-email-domain]>

    </snip>
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the mail system is working properly then. How exactly can you reproduce the original issue now after the changes in master.cf?
     
  15. axxies

    axxies Member

    By sending an email to an external domain. It results in this:

    <snip>
    Jun 15 09:45:01 [my-sender-host] postfix/smtpd[18657]: connect from localhost[127.0.0.1]
    Jun 15 09:45:01 [my-sender-host] postfix/smtpd[18657]: lost connection after CONNECT from localhost[127.0.0.1]
    Jun 15 09:45:01 [my-sender-host] postfix/smtpd[18657]: disconnect from localhost[127.0.0.1]
    Jun 15 09:45:02 [my-sender-host] postfix/smtpd[18657]: connect from localhost[127.0.0.1]
    Jun 15 09:45:02 [my-sender-host] postfix/smtpd[18657]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[my-receiver-email]>: Recipient address rejected: [my-receiver-email-domain]; from=<[my-sender-email]> to=<[my-receiver-email]> proto=ESMTP helo=<[my-sender-host].startdedicated.net>
    Jun 15 09:45:02 [my-sender-host] postfix/smtpd[18657]: disconnect from localhost[127.0.0.1]
    Jun 15 09:45:26 [my-sender-host] dovecot: imap-login: Login: user=<[my-sender-email]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=18688, secured, session=<TYkr+001UwB/AAAB>
    Jun 15 09:45:26 [my-sender-host] dovecot: imap([my-sender-email]): Disconnected: Logged out in=173 out=3068

    </snip>
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Check that inet_interfaces and inet_protocols in postfix main.cf is set to "all":

    inet_interfaces = all
    inet_protocols = all

    Then check the /etc/hosts file. The line for:

    127.0.0.1 shall just contain localhost and localhost.localdomain, it may not contain the server hostname.
     
  17. axxies

    axxies Member

    Regarding the /etc/hosts file: there are four IP addresses at this server. How should this be reflected in the hosts file? All pointing to the same hostname?

    In main.cf , inet_interfaces was set to 127.0.0.1 . It didn't help though to change it to all.

    (Thank you for all your assistance so far! It's much appreciated!)
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Just the line 127.0.0.1 matters here.

    This must help as this setting disabled external sending. ensure that postfix has been restarted properly and that it is set to "all" now.
     
  19. axxies

    axxies Member

    I am afraid that the problem still remains. It is still "550 5.1.1 <[my-receiver-email]>: Recipient address rejected"
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact log lines. Btw, did you try to send to another address, as this message can also indicate that the recipient server rejected your email which means that the issue is on their side and not your server.
     

Share This Page