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

    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

    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

    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

    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

    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 Well-Known Member HowtoForge Supporter

    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

    @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

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

    Attached Files:

  15. webhunter

    webhunter Member

    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 Well-Known Member HowtoForge Supporter

    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
  18. webhunter

    webhunter Member

  19. webhunter

    webhunter Member

    Thanks for your patience! Here we go. Setted up a new dedicated with Ubuntu 16.04. and ISPconfig 3.1.
    Code:
    (original = "O >", productive system = "P >")
    
    #### DIFF MAIN.CF ####
    
    No changes besides of hostnames and blacklist checks.
    
    
    
    #### DIFF MASTER.CF ####
    
    O > #submission inet n       -       y       -       -       smtpd
    
    P >  submission inet n       -       y       -       -       smtpd
    P >    -o syslog_name=postfix/submission
    P >    -o smtpd_tls_security_level=encrypt
    P >    -o smtpd_sasl_auth_enable=yes
    P >    -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    
    O >  #smtps     inet  n       -       y       -       -       smtpd
    
    P > smtps     inet  n       -       y       -       -       smtpd
    P >    -o syslog_name=postfix/smtps
    P >    -o smtpd_tls_wrappermode=yes
    P >    -o smtpd_sasl_auth_enable=yes
    P >    -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    
    
    
    
    #### DIFF DYNAMICMAPS.CF ####
    
    No changes
    
    
    
    
    #### DIFF NESTED_HEADER_CHECKS ####
    
    No changes
    
    
    
    
    #### DIFF HEADER_CHECKS ####
    
    O > empty file
    
    P > /GO WILD/  REDIRECT [email protected]
    
    
    
    
    #### DIFF TAG_AS_FOREIGN.RE ####
    
    No changes
    
    
    
    
    #### DIFF TAG_AS_ORIGINATING.RE ####
    
    No changes
    
    
    
    
    #### DIFF 50-USER ####
    
    O > nearly empty file, first 10 lines common
    
    P > use strict;
    P >
    P > #
    P > # Place your configuration directives here.  They will override those in
    P > # earlier files.
    P > #
    P > # See /usr/share/doc/amavisd-new/ for documentation and examples of
    P > # the directives you can use in this file
    P > #
    P >
    P > @bypass_virus_checks_maps = (
    P >    \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
    P >
    P > @bypass_spam_checks_maps = (
    P >    \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
    P >
    P > #
    P > # Database connection settings
    P > #
    P >
    P > @lookup_sql_dsn =
    P >    ( ['DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306', 'ispconfig', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'] );
    P >
    P > # @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
    P > #$sql_select_policy = 'SELECT "Y" as local FROM mail_domain WHERE CONCAT("@",domain) IN (%k)';
    P > # $banned_files_quarantine_method = 'sql';
    P > # $spam_quarantine_method         = 'sql';
    P >
    P > #
    P > # SQL Select statements
    P > #
    P >
    P > $sql_select_policy =
    P >    'SELECT *,spamfilter_users.id'.
    P >    ' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
    P >    ' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';
    P >
    P >
    P > $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
    P >     ' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k)) AND (spamfilter_wblist.active="y")' .
    P >     ' ORDER BY spamfilter_wblist.priority DESC';
    P >
    P > #
    P > # Quarantine settings
    P > #
    P >
    P > $final_virus_destiny = D_BOUNCE;
    P > $final_spam_destiny = D_DISCARD;
    P > $final_banned_destiny = D_BOUNCE;
    P > $final_bad_header_destiny = D_PASS;
    P >
    P > # Default settings, we st this very high to not filter aut emails accidently
    P > $sa_spam_subject_tag = '***SPAM*** ';
    P > $sa_tag_level_deflt  = 20.0;  # add spam info headers if at, or above that level
    P > $sa_tag2_level_deflt = 60.0; # add 'spam detected' headers at that level
    P > $sa_kill_level_deflt = 60.0; # triggers spam evasive actions
    P > $sa_dsn_cutoff_level = 100;   # spam level beyond which a DSN is not sent
    P >
    P > #
    P > # Disable spam and virus notifications for the admin user.
    P > # Can be overridden by the policies in mysql
    P > #
    P >
    P > $virus_admin = undef;
    P > $spam_admin = undef;
    P >
    P >
    P > #
    P > # Enable Logging
    P > #
    P >
    P > $DO_SYSLOG = 1;
    P > $LOGFILE = "/var/log/amavis.log";  # (defaults to empty, no log)
    P >
    P > # Set the log_level to 5 for debugging
    P > $log_level = 0;                # (defaults to 0)
    P >
    P > $inet_socket_port = [10024,10026];
    P >
    P > # :* = send to incoming Port + 1
    P > $forward_method = 'smtp:127.0.0.1:*';
    P > $notify_method = 'smtp:127.0.0.1:*';
    P > $interface_policy{'10026'} = 'ORIGINATING';
    P > $policy_bank{'ORIGINATING'} = {
    P >   originating => 1,
    P >   smtpd_discard_ehlo_keywords => ['8BITMIME'],
    P > };
    P >
    P > # IP-Addresses for internal networks => load policy MYNETS
    P > # - requires -o smtp_send_xforward_command=yes in postfix master.cf
    P > @mynetworks = qw(0.0.0.0/8 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 [::1] [FE80::]/10 [FEC0::]/10);
    P >
    P > # Allow SMTP access from IPs in @inet_acl to amvisd SMTP Port
    P > @inet_acl = qw( 127.0.0.1 [::1] 192.168.0.0/16 );
    P >
    P > # DKIM
    P > $enable_dkim_verification = 1;
    P > $enable_dkim_signing = 1; # load DKIM signing code
    P > $signed_header_fields{'received'} = 0;  # turn off signing of Received
    P > @dkim_signature_options_bysender_maps = (
    P > { '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
    P >
    P > #------------ Do not modify anything below this line -------------
    P > 1;  # insure a defined return
    
    For me, nothing looks suspicious. o_O
     
  20. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Did you setup some BCC / always BBC?
    Are you sure, that the addresse really exists in the database?
    Check your regexp map /etc/postfix/body_check
     

Share This Page