Virtual users unknown

Discussion in 'Installation/Configuration' started by Gary Pearce, Feb 5, 2017.

  1. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Folks,
    Running ISPConfig 3.1dev on Centos 7.2
    Installed following the HowToForge tutorial without too much pain but am now having trouble with postfix and possibly sasl and who knows maybe even dovecot but first things first,

    I have set up a couple of domains and the web stuff works very smoothly, but having set up a virtual email domain and a virtual user postfix/pipe is telling me " status=bounced (user unknown)" for my virtual user. It is also unable to locate the user "
    mailman-loop " .

    I am also getting some SASL authentication complaints about my home IP address such as:
    Feb 5 17:26:16 Hugh2 postfix/smtpd[13019]: warning: unknown[123.456.789.012]: SASL PLAIN authentication failed:
    in clumps of 4 or 5 every 90 minutes or so.

    Rather than just dump every config file perhaps someone might suggest where we start with this.

    Many thanks

    Gary
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ensure that the failing domain is not listed anywhere in postfix main.cf, e.g. in myhostname or mydomain settings and that the domain is not in /etc/mailname file.
     
  3. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    OK,
    in /etc/postfix.main I have :

    mydestination = Hugh2DOTmydomainDOTcomDOTau, localhost, localhostDOTlocaldomain
    #### mydestination = localhost, localhost.localdomain
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
    # mail.$mydomain, wwwDOT$mydomain, ftpDOT$mydomain

    and mydomain is not set:

    # The mydomain parameter specifies the local internet domain name.
    # The default is to use $myhostname minus the first component
    # $mydomain is used as a default value for many other configuration
    # parameters.
    #
    #mydomain = domainDOTtld

    So the domain is in the "my destination" variable
    and also in the myhostname variable:
    myhostname = Hugh2DOTmydomainDOTcomDOTau
    mynetworks = 127.0.0.0/8 [::1]/128

    so should I change all iterations of mydomain and if so what should I alter them to ?
    localhost perhaps ?
    All suggestions gratefully received
    Gary

    PS Sorry about the DOTs, the forum software does not yet like me enough to include "links" :)
     
  4. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Oh and I do not have an /etc/mailname file (centos 7.2) - have I omitted a step or might it be called something else ?
     
  5. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Well the "virtual users unknown" went away when I fixed a typo on the DNS after I moved the machine to a different network, but sadly I am no closer to finding out whats up with the "SASL PLAIN authentication failed:" problem.

    My gut feel is I have done something totally dumb somewhere but I cannot spot it. Been back over every step of the relevant howtoforge but cannot spot it.

    I have posted the SASL question here:
    https://www.howtoforge.com/communit...ion-failed-centos-7-2-ispconfig-3-1dev.75533/
    in the hope that it helps once this problem gets solved.

    Cheers
     
  6. ahrasis

    ahrasis Member

    Is Hugh2DOTmydomainDOTcomDOTau is the one having proble with the postfix?

    If so remove it from mydestination = Hugh2DOTmydomainDOTcomDOTau, localhost, localhostDOTlocaldomain. Just like this: mydestination = localhost, localhostDOTlocaldomain
     
  7. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Many thanks for your response ahrasis,

    Yup Hugh2 is the machine that is refusing to cooperate !

    as per Til's (and your) instructions I altered it thus:
    mydestination = localhost, localhostDOTlocaldomain
    and restarted postfix
    but that appears to have made no difference.
    mydomain is not set at all so I am not certain what that would default to in this case.
    from what I can see the mail name file is a debian thing and not a centos thing.

    I am currently DOTTING the log file at debug level in order to post to see if there are any hints there.
    Cheers
     
  8. ahrasis

    ahrasis Member

    You may need to share your error log after you have done that for us to find out if there some other things you need to do.
     
  9. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    on that case right now ahrasis.
     
  10. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Getting desperate !
    Switched on debug in postfix.cf and got the following :
    pls ignore the commas where you expect full stops, they are there in order to enable me to post this:


    connect from XX-XXX-236-219.static,tpgi,com,au[XX.XXX.236.219]

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: smtp_stream_setup: maxtime=300 enable_deadline=0

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_hostname: XX-XXX-236-219.static.tpgi.com.au ~? 127.0.0.0/8

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_hostaddr: XX.XXX.236.219 ~? 127.0.0.0/8

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_hostname: XX-XXX-236-219.static.tpgi.com.au ~? [::1]/128

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_hostaddr: XX.XXX.236.219 ~? [::1]/128

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_list_match: XX-XXX-236-219,static,tpgi,com,au: no match

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_list_match: XX.XXX.236.219: no match

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: auto_clnt_open: connected to private/anvil

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: send attr request = connect

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: send attr ident = smtp:XX.XXX,236.219
    <continued below>
     
  11. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: private/anvil: wanted attribute: status

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute name: status

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute value: 0

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: private/anvil: wanted attribute: count

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute name: count

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute value: 1

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: private/anvil: wanted attribute: rate

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute name: rate

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute value: 1

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: private/anvil: wanted attribute: (list terminator)

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute name: (end)

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static,tpgi,com.au[XX,XXX,236,219]: 220 Hugh2.mydomain.com.au ESMTP Postfix

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: xsasl_dovecot_server_create: SASL service=smtp, realm=(null)

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: name_mask: noanonymous

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: xsasl_dovecot_server_mech_filter: keep mechanism: PLAIN

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: watchdog_pat: 0x7f1467babd90

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: < XX-XXX-236-219,static,tpgi,com.au[XX,XXX,236.219]: EHLO [192.168.0.111]
    <dynamic IP address of my laptop on its remote network>
    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_list_match: XX-XXX-236-219,static,tpgi,com.au: no match

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_list_match: XX,XXX,236.219: no match

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static,tpgi,com,au[XX,XXX,236,219]: 250-Hugh2.mydomain.com.au

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,static,tpgi,com,au[XX.XXX.236.219]: 250-PIPELINING

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static.tpgi.com.au[XX,XXX,236,219]: 250-SIZE 10240000

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,static,tpgi,com,au[XX.XXX,236,219]: 250-VRFY

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,static,tpgi,com,au[XX.XXX,236.219]: 250-ETRN

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-2XXX-236-219,static,tpgi,com,au[XX.XXX.236.219]: 250-STARTTLS

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,static,tpgi.com.au[XX.XXX,236,219]: 250-AUTH PLAIN

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,stati,.tpgi,com,au[XX.XXX.236.219]: 250-AUTH=PLAIN

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > 6XX-XXX-236-219,static,tpgi,com.au[XX.XXX.236.219]: 250-ENHANCEDSTATUSCODES

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static,tpgi,com,au[6XX.XXX.236.219]: 250-8BITMIME

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,static,tpgi,com,au[XX.XXX,236.219]: 250 DSN
     
  12. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: watchdog_pat: 0x7f1467babd90

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: < XX-XXX-236-219.static,tpgi,com.au[6XX.2XXX.236.219]: STARTTLS

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static,tpgi,com,au[XX.XXX.236.219]: 220 2.0.0 Ready to start TLS

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: auto_clnt_open: connected to private/tlsmgr

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: send attr request = seed

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: send attr size = 32

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: private/tlsmgr: wanted attribute: status

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute name: status

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute value: 0

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: private/tlsmgr: wanted attribute: seed

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute name: seed

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute value: mYQgyNbsGR9gZxo7KXFYUQVzUxlmMaVWeesxymDMnI8=

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: private/tlsmgr: wanted attribute: (list terminator)

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: input attribute name: (end)

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: xsasl_dovecot_server_create: SASL service=smtp, realm=(null)

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: name_mask: noanonymous

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: xsasl_dovecot_server_mech_filter: keep mechanism: PLAIN

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: watchdog_pat: 0x7f1467babd90

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: < XX-XXX-236-219.static.tpgi.com.au[XX.XXX,236,219]: EHLO [192.168.0.111]
    < its my laptop address on my remote network again>
    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_list_match: XX-XXX-236-219,static,tpgi,com.au: no match

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: match_list_match: XX,XXX,236.219: no match

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,static,tpgi.com.au[XX,XXX.236.219]: 250-Hugh2.mydomain.com.au

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219,static,tpgi,com.au[XX,XXX,236,219]: 250-PIPELINING

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static,tpgi,com,au[60.242.236.219]: 250-SIZE 10240000

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static.tpgi,com,au[XX.XXX,236,219]: 250-VRFY

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static,tpgi,com,au[XX.XXX.236.219]: 250-ETRN

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: > XX-XXX-236-219.static.tpgi,com,au[XX.XXX,236,219]: 250-AUTH PLAIN

    SORRY about that being in 3 parts. Apparently there is a 10k limit to file size.

    The Apple mail client then attempted to check out IMAP with the following results:

    Feb 11 17:54:28 Hugh2 dovecot: imap-login: Login: user=<gary>, method=PLAIN, rip=XX.XXX,236,219, lip=192.168.0.42, mpid=41112, TLS, session=<SlXWrjtIuAA88uzb>

    Feb 11 17:54:28 Hugh2 dovecot: imap(gary): Error: user gary: Initialization failed: Namespace '': Mail storage autodetection failed with home=/home/gary
    <home/gary does not sound right to me>
    Feb 11 17:54:28 Hugh2 dovecot: imap(gary): Error: Invalid user settings. Refer to server log for more information.

    Feb 11 17:54:28 Hugh2 dovecot: imap-login: Login: user=<gary>, method=PLAIN, rip=XX.XXX.236,219, lip=192.168.0.42, mpid=41116, TLS, session=<TwuKrztIvAA88uzb>

    Feb 11 17:54:28 Hugh2 dovecot: imap(gary): Error: user gary: Initialization failed: Namespace '': Mail storage autodetection failed with home=/home/gary

    Feb 11 17:54:28 Hugh2 dovecot: imap(gary): Error: Invalid user settings. Refer to server log for more information.

    Feb 11 17:54:29 Hugh2 dovecot: imap-login: Login: user=<gary>, method=PLAIN, rip=XX.XXX,236,219, lip=192.168.0.42, mpid=41118, TLS, session=</RSPrztIvgA88uzb>

    SO there we have it.

    If I were to guess I'd say its looking for validation in the wrong place for both IMAP and smtp but I have no idea why :-(
     
  13. ahrasis

    ahrasis Member

    Sorry, but what is the error log in your mail log after you tried logging in.
    For postfix, to check if you have anymore postfix error, just run "postfix check".

    Please use quote or code for the posted error.
     
  14. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Not sure I entirely understand what you are saying :
    " what is the error log in your mail log after you tried logging in"

    postfix check returns nothing and terminates with a zero return code:

    [[email protected] log]# postfix check
    [[email protected] log]# echo $?
    0
     
  15. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Ahhh unless you mean the non-debug version of the log which looks like:

    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: xsasl_dovecot_server_create: SASL service=smtp, realm=(null)
    Feb 12 13:40:50 Hugh2 postfix/smtpd[58717]: xsasl_dovecot_server_create: SASL service=smtp, realm=(null)
    Feb 12 13:40:55 Hugh2 postfix/smtpd[58717]: warning: XX-XX-236-219.static.tpgi.com.au[XX.XXX.236.219]: SASL PLAIN authentication failed:
    Feb 12 13:40:59 Hugh2 postfix/smtpd[58717]: warning: XX-XXX-236-219.static.tpgi.com.au[XX.XXX.236.219]: SASL PLAIN authentication failed:
     
  16. ahrasis

    ahrasis Member

    Last edited: Feb 12, 2017
  17. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Many thanks

    Centos mail log is /var/log/maillog
    Thats where the messages above came from, but after I turned on debug which is why there was so much stuff.

    both sasl variables you mention are in main.cf:
    [[email protected] log]# postconf -n | grep smtpd_sasl_typ
    smtpd_sasl_type = dovecot

    [[email protected] log]# postconf -n | grep smtpd_sasl_path
    smtpd_sasl_path = /var/spool/postfix/private/auth

    [[email protected] log]# ls -l /var/spool/postfix/private/auth
    srw-rw-rw- 1 postfix postfix 0 Feb 12 16:25 /var/spool/postfix/private/auth

    Your dovecot debug suggestion however provided a few hints:

    Feb 12 17:25:00 Hugh2 postfix/smtpd[5774]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: Connection refused
    Feb 12 17:25:00 Hugh2 postfix/smtpd[5774]: fatal: no SASL authentication mechanisms
    Feb 12 17:25:01 Hugh2 postfix/master[2303]: warning: process /usr/libexec/postfix/smtpd pid 5774 exit status 1
    Feb 12 17:25:01 Hugh2 postfix/master[2303]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

    but its read write for everybody:
    srw-rw-rw- 1 postfix postfix 0 Feb 12 16:25 /var/spool/postfix/private/auth

    Interestingly the postfix/dovecot tutorial here:
    https://www.howtoforge.com/postfix-...private-auth-failed-no-such-file-or-directory
    says I should have a section in my dovecot.conf file (which I seem to have in etc/dovecot.conf AND /etc/dovecot/dovecot.conf - although they contain different stuff) which says:

    [...]
    client {
    path = /var/spool/postfix/private/auth
    mode = 0660
    user = postfix
    group = postfix
    }
    [...]

    but I have:

    service auth {

    unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix

    }
    curious, but at last at least a small hint ......

    Oh, but removing the local host name from myhostname and mydomain seems to have stopped my email client from even getting to smtp - but I can get back to that.

    Cheers
     
  18. ahrasis

    ahrasis Member

    Note that you were supposed to remove your domain from mydestination only and not myhostname as well. Restore your domain back to myhostname if you removed it earlier.

    As you are using Centos, the above config could be correct. But as suggested by easyorange in the same page, do try:
    Code:
    chown postfix:postfix /var/spool/postfix/private/auth
    chmod 666 /var/spool/postfix/private/auth
    And, in /etc/dovecot/conf.d/10-master.conf (or /usr/local/etc/dovecot/conf.d/10-master.conf) try to set the config like this:
    Code:
      unix_listener auth-userdb {
      mode = 0666
      user = postfix
      group = postfix
      }
    
      # Postfix smtp-auth
      unix_listener /var/spool/postfix/private/auth {
        mode = 0666
      }
    Then, restart dovecot.
     
    Last edited: Feb 12, 2017
  19. Gary Pearce

    Gary Pearce New Member HowtoForge Supporter

    Hi ahrasis,

    permissions and ownership on /var/spool/postfix/private/auth
    are OK

    already had the unix_listener auth-userdb paragraph.

    uncommented unix_listener thus:
    Code:
     # Postfix smtp-auth
      unix_listener /var/spool/postfix/private/auth {
        mode = 0666
        user = postfix
        group = postfix
      }
    
    With debug switched on the error message I am getting is

    Code:
    connect from localhost[127.0.0.1]
    Feb 13 18:06:32 Hugh2 postfix/smtpd[38777]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: Connection refused
    Feb 13 18:06:32 Hugh2 postfix/smtpd[38777]: fatal: no SASL authentication mechanisms
    
    The file exists:
    Code:
    [[email protected] gary]# ls -l /var/spool/postfix/private/auth
    srw-rw-rw- 1 postfix postfix 0 Feb 12 16:25 /var/spool/postfix/private/auth
    
    From memory this file should be created by dovecot so I tried removing it but dovecot refused to create it.

    I think this is the crux of the problem.

    Any further suggestions ?

    Cheers
     
  20. ahrasis

    ahrasis Member

    This is my final attempt to help. Can you check your postfix main.cf and check for something like this:
    Code:
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    ...
    smtpd_tls_CAfile = if any
    If there is, post the output of this:
    Code:
    ls -l /etc/postfix/smtpd.cert
    ls -l /etc/postfix/smtpd.key
    This should be symlinked to your ISPC SSL.

    Then check for ssl_cert and ssl_key in dovecot dovecot.conf and check if it refers to the same cert and key above, like this:
    Code:
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    ...
    ssl_ca = if any 
    Lastly, check also if you can access phpmyadmin using roundcubeuser and roundcubepassword.
     

Share This Page