New E-mail adresses are no longer added (after update of OS and ISPCONFIG 3)

Discussion in 'ISPConfig 3 Priority Support' started by webhunter, Oct 8, 2017.

  1. webhunter

    webhunter Member HowtoForge Supporter

    Hi, guys!
    My server was running smooth almost a year now. Today I updated the OS (Uuntu 16.04) and ISPCONFIG from 3.1 to 3.1.7p1.
    After that, I recognized, that no more new E-Mail adresses were created. In the ISPCONFIG-panel all seemed okay but sending a mail to a newly added address gave a 5.1.1 error:
    Code:
    Reporting-MTA: dns; mx1.mydomain.de
    X-Postfix-Queue-ID: 7D6493BC2415
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Sun,  8 Oct 2017 21:45:59 +0200 (CEST)
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.1.1
    Diagnostic-Code: X-Postfix; unknown user: "newuser"
    
    So, I logged in to this E-mail account through roundcube and sent an E-mail to [email protected]. All worked fine.
    I checked for running postfix/dovecot/mysql services. All fine.
    I executed
    Code:
    /usr/local/ispconfig/server/server.sh
    
    in case something is wrong with the cron, rebootet twice. No E-mails can received by this new added address; the directories for storing the mails were created.
    All other E-Mail addresses are working fine.
    What's going on?

    Thanks for your hints!

    Forgot the part of /var/log/mail.log:
    Code:
    Oct  8 23:26:26 mx1 postfix/smtpd[19341]: connect from p54A8xxxx.dip0.t-ipconnect.de[84.168.xxx.xxx]
    Oct  8 23:26:27 mx1 postfix/smtpd[19341]: NOQUEUE: filter: RCPT from p54A8xxxx.dip0.t-ipconnect.de[84.168.xxx.xxx]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<WORKSTATIONPC>
    Oct  8 23:26:27 mx1 postfix/smtpd[19341]: 483D23BC0B6B: client=p54A8xxxx.dip0.t-ipconnect.de[84.168.xxx.xxx], sasl_method=LOGIN, [email protected]
    Oct  8 23:26:27 mx1 postfix/cleanup[20736]: 483D23BC0B6B: message-id=<[email protected]>
    Oct  8 23:26:27 mx1 postfix/qmgr[19311]: 483D23BC0B6B: from=<[email protected]>, size=10041, nrcpt=1 (queue active)
    Oct  8 23:26:27 mx1 postfix/smtpd[20775]: connect from localhost[127.0.0.1]
    Oct  8 23:26:27 mx1 postfix/smtpd[20775]: D8D773BC2474: client=localhost[127.0.0.1]
    Oct  8 23:26:27 mx1 postfix/cleanup[20736]: D8D773BC2474: message-id=<[email protected]>
    Oct  8 23:26:27 mx1 postfix/smtpd[20775]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
    Oct  8 23:26:27 mx1 postfix/qmgr[19311]: D8D773BC2474: from=<[email protected]>, size=11139, nrcpt=1 (queue active)
    Oct  8 23:26:27 mx1 amavis[2002]: (02002-15) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [84.168.xxx.xxx]:39080 [84.168.xxx.xxx] <[email protected]> -> <[email protected]>  , Queue-ID: 483D23BC0B6B, Message-ID: <[email protected]>, mail_id: XlPF3k7ix0UZ, Hits: 0.216, size: 10041, queued_as: D8D773BC2474, dkim_new=default:privateemail.de, 348 ms
    Oct  8 23:26:27 mx1 postfix/smtp[20737]: 483D23BC0B6B: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.69, delays=0.34/0/0/0.35, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as D8D773BC2474)
    Oct  8 23:26:27 mx1 postfix/qmgr[19311]: 483D23BC0B6B: removed
    Oct  8 23:26:27 mx1 postfix/local[20776]: D8D773BC2474: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.1, delays=0.05/0/0/0.05, dsn=5.1.1, status=bounced (unknown user: "newuser")
    Oct  8 23:26:27 mx1 postfix/cleanup[20736]: F249B3BC2476: message-id=<[email protected]>
    Oct  8 23:26:28 mx1 postfix/bounce[20777]: D8D773BC2474: sender non-delivery notification: F249B3BC2476
    Oct  8 23:26:28 mx1 postfix/qmgr[19311]: F249B3BC2476: from=<>, size=13110, nrcpt=1 (queue active)
    Oct  8 23:26:28 mx1 postfix/qmgr[19311]: D8D773BC2474: removed
    Oct  8 23:26:28 mx1 dovecot: lda([email protected]): sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
    Oct  8 23:26:28 mx1 postfix/pipe[20742]: F249B3BC2476: to=<[email protected]>, relay=dovecot, delay=0.13, delays=0.03/0/0/0.09, dsn=2.0.0, status=sent (delivered via dovecot service)
    Oct  8 23:26:28 mx1 postfix/qmgr[19311]: F249B3BC2476: removed
    
     
    Last edited: Oct 8, 2017
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the domain mydomain.de is not treated as virtual domain and postfix searches for a matching SSH user for the mail account. This happens if mydomain.de is listed somewhere in postfix main.cf e.g. in the mydomain or myhostname settings or when mydomain.de is the hostname of the server.
     
  3. webhunter

    webhunter Member HowtoForge Supporter

    Hi Till,
    thanks for your reply.
    I wonder why "[email protected]" is (still) working than.... It effects only new created ones.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    That's a good question indeed. Do you have mydomain.de in postfix main.cf or /etc/mailname ?
     
  5. webhunter

    webhunter Member HowtoForge Supporter

    Yes, I do.
    hostname: mx1.mydomain.de
    main.cf: myhostname and mydestination = mx1.mydomain.de

    But I didn't changed them after the updates. Other E-mail-addresses are (still) working.
     
    Last edited: Oct 9, 2017
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    That's ok as it is a subdomain, only the exact mydomain.de would cause an issue.

    Please run the command:

    grep -R mydomain.de /etc/postfix/

    maybe there is something in a aliases file for mydomain.de that causes this behavior.
     
  7. webhunter

    webhunter Member HowtoForge Supporter

    Code:
    mx1:/etc/postfix# grep -R mydomain.de /etc/postfix/
    /etc/postfix/main.cf:myhostname = mx1.mydomain.de
    /etc/postfix/main.cf:mydestination = mx1.mydomain.de, localhost, localhost.localdomain
    /etc/postfix/header_checks:/GO WILD/  REDIRECT [email protected]
    /etc/postfix/main.cf~:myhostname = mx1.mydomain.de
    /etc/postfix/main.cf~:mydestination = mx1.mydomain.de, localhost, localhost.localdomain
    /etc/postfix/main.cf~3:myhostname = ds100.mydomain.de
    /etc/postfix/main.cf~3:mydestination = mx1.mydomain.de, localhost, localhost.localdomain
    /etc/postfix/main.cf~2:myhostname = ds100.mydomain.de
    /etc/postfix/main.cf~2:mydestination = mx1.mydomain.de, localhost, localhost.localdomain
    /etc/postfix/body_checks:/*CASINO/  REDIRECT [email protected]
    /etc/postfix/body_checks:/FREISPIEL*/  REDIRECT [email protected]
    /etc/postfix/body_checks:/MEGA*BONUS/  REDIRECT [email protected]
    /etc/postfix/body_checks:/BONUSFABRIK/  REDIRECT [email protected]
    /etc/postfix/body_checks:/SUPERGAMINATOR/  REDIRECT [email protected]
    /etc/postfix/body_checks:/BONUSSPIEL/  REDIRECT [email protected]
    /etc/postfix/body_checks:/*MONEY/  REDIRECT [email protected]
    /etc/postfix/body_checks:/GRATISSPIN*/  DISCARD [email protected]
    mx1:/etc/postfix#
    
    That's it... :/
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This looks fine so far. Please compare the working mailbox in ISPConfig with the not working one, especially the checkboxes about receiving at the end of the form. Is the new mailbox setup in the exact same way with same settings?
     
  9. webhunter

    webhunter Member HowtoForge Supporter

    Yes!
    Nothing is deactivated. Greylisting is off. Status of E-mail-address: "active". Limits: none ("0") and the dirs for storing the E-mails are created. wtf... :D
     
    Last edited: Oct 9, 2017
  10. till

    till Super Moderator Staff Member ISPConfig Developer

  11. till

    till Super Moderator Staff Member ISPConfig Developer

    One more question, did you do any dist upgrades since you added the last mailbox (e.g. from Ubuntu 14.04 to 16.04) or did you switch from MySQL to MariaDB or vice versa?
     
  12. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    to=<[email protected]>
    to=<[email protected]>, orig_to=<[email protected]>

    Something is rewriteing the mails when they are sent from amavis to postfix.

    You can increase the debug-level for postfix and run amavis with debug-output (stop amavis and use amvisd-new debug)
     
  13. webhunter

    webhunter Member HowtoForge Supporter

    @till : Nope, the installation os was 16.04. I only updated the os at first and than ISPCONFIG. Since then, new E-mail addresses aren't working.
    @florian030 : I'll try that. Thank you.
     
  14. webhunter

    webhunter Member HowtoForge Supporter

    Here comes the part of mail.log with postfix enabled -v option:
     

    Attached Files:

  15. webhunter

    webhunter Member HowtoForge Supporter

    Okay,... I appended two files:
    "startup.txt" - the startup output of amavisd-new debug and
    "execute.txt" - what's going on after sending an E-mail to [email protected].
     

    Attached Files:

  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Really strange, neither the postfix log nor the amavis log shws the actual reason why postfix is doing this rewrite.
     
  17. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    Is your /etc/mailname set up correctly?
    What happens if you disable all milters and amavis step by step?

    If you have the possibility, create a virtual machine / test system and compare ( diff ) files in /etc/postfix and the amavis 50-user file.
    postfix folder > header_checks, tag_as_foreign.re, tag_as_originating.re, dynamicmaps.cf, main.cf, master.cf, nested_header_checks
     
    Last edited: Oct 12, 2017

Share This Page