Mailserver not fully functional

Discussion in 'Installation/Configuration' started by momfer, Dec 10, 2009.

  1. momfer

    momfer New Member

    So we still have a problem with the mail functions on ISPConfig 3 on openSuSE 11.2 X86_64

    the scripts create the dirs in /var/vmail/mailfilters correctly (in our opinion)

    /srv/maildirs created , based on another thread in this form
    drwxr-xr-x 2 vmail vmail 4096 Dec 1 15:00 maildirs


    the logs:

    mail queue
    Code:
    -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
    482BE55B5 1139 Thu Dec 10 13:20:35 [email protected]
    (temporary failure. Command output: /usr/bin/maildrop: Cannot set my user or group id.)
    [email protected]
    

    Code:
    Dec 10 13:20:01 server2 postfix/smtpd[13910]: warning: connect to private/tlsmgr: No such file or directory
    Dec 10 13:20:02 server2 postfix/smtpd[13910]: warning: connect to private/tlsmgr: No such file or directory
    Dec 10 13:20:02 server2 postfix/smtpd[13910]: warning: problem talking to server private/tlsmgr: No such file or directory
    Dec 10 13:20:02 server2 postfix/smtpd[13910]: warning: no entropy for TLS key generation: disabling TLS support
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The directory /srv/maildirs are not a valid ispconfig mail directory. The home directory of the vmail user has to be /var/vmail. Please check the settings in /etc/passwd. I guess that you or any software you installed before has created a vmail user in your setup manually before you installed ispond´fig which messed up the mail setup in your system.
     
  3. momfer

    momfer New Member

    Hi Till,

    Thank you for the input.

    As stated, WE created /srv/maildirs by hand (trying to get the stuff working) so no harm done there!

    The scripts from ISPconfig create some stuff in /var/vmail:
    Code:
    server2:/var/vmail # ls -al
    total 16
    drwxr-xr-x  3 root  root  4096 Nov 30 17:08 .
    drwxr-xr-x 16 root  root  4096 Nov 30 17:08 ..
    -rw-------  1 vmail vmail 1382 Nov 30 17:08 .mailfilter
    drwxr-xr-x  3 root  root  4096 Dec 10 13:10 mailfilters
    
    and in /var/vmail/mailfilters:
    Code:
    server2:/var/vmail/mailfilters # ls -al
    total 12
    drwxr-xr-x 3 root  root 4096 Dec 10 13:10 .
    drwxr-xr-x 3 root  root 4096 Nov 30 17:08 ..
    drwxrwx--- 3 vmail root 4096 Dec 10 13:12 mytestdomain.nl
    
    No mail found in either of these directories.

    Appreciate any thoughts on this
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The mail directories are missing. The mailfilter directories have to be empty and they do not contain mails, they are just for additional filter rules.

    Post the output of:

    grep vmail /etc/passwd

    and the content of /var/cvmail/.mailfilter

    and make sure that you have not edited the mail path in the ispconfig server settings! The maildir path has to be: /var/vmail/[domain]/[localpart]
    and the homedir path has to be: /var/vmail

    and undo all manual chnges that you did like creating /srv/maildirs.
     
  5. momfer

    momfer New Member

    passwd
    Code:
    server2:/ # grep vmail /etc/passwd
    vmail:x:303:303:maildirs chef:/srv/maildirs:/bin/false
    /var/vmail/.mailfilter
    Code:
    #
    # Import variables
    #
    
    LOGNAME=tolower("$LOGNAME")
    EXTENSION="$1"
    RECIPIENT=tolower("$2")
    USER=tolower("$3")
    HOST=tolower("$4")
    SENDER="$5"
    DEFAULT="/var/vmail/$HOST/$USER/."
    
    # Workaround for broken tolower function in some current fedora releases
    
    if(!$USER)
    {
      USER=$3
    }
    if(!$HOST)
    {
      HOST=$4
    }
    
    if ( "$EXTENSION" ne "" )
    {
      DELIMITER="+"
    }
    
    if (!$SENDER)
    {
      SENDER = "<>"
    }
    
    #
    # Autocreate maildir, if not existant
    #
    
    `test -e /var/vmail/$HOST`
    if ( $RETURNCODE != 0 )
    {
      `mkdir /var/vmail/$HOST`
    }
    
    `test -e /var/vmail/$HOST/$USER`
    if ( $RETURNCODE != 0 )
    {
      `maildirmake /var/vmail/$HOST/$USER`
      `chmod -R 0700 /var/vmail/$HOST`
    }
    
    # Check if the user has a autoresponder enabled
    
    `test -f /var/vmail/mailfilters/$HOST/$USER/.autoresponder`
    if ( $RETURNCODE == 0 )
    {
      include "/var/vmail/mailfilters/$HOST/$USER/.autoresponder"
    }
    
    # Create a mailsize file
    `echo $SIZE >> /var/vmail/$HOST/$USER/ispconfig_mailsize`
    
    #
    # Test if the user has his own maildrop include,
    # if not available, check if $DEFAULT is set
    # (newer maildrop get's that from the DB and updates
    # it) and deliver or fail temporarily if not available
    #
    
    `test -f /var/vmail/mailfilters/$HOST/$USER/.mailfilter`
    if ( $RETURNCODE == 0 )
    {
      include "/var/vmail/mailfilters/$HOST/$USER/.mailfilter"
    }
    else
    {
      if ( "$DEFAULT" ne "" )
      {
        to "$DEFAULT"
      }
      else
      {
        EXITCODE=75
        exit
      }
    }
    
    checked Maildir Path: /var/vmail/[domain]/[localpart]

    checked Homedir Path: /var/vmail

    I suppose the setting in /etc/passwd is trouble ;) that made us create the /srv/maildirs directory in the first place.

    Thanks again!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The line in /etc/passwd is not from ispconfig. As I guessed in my last post, it was created by another software or person before ispconfig was installed and is not compatible with ispconfig.

    The vmail line must look like this:

    vmail:x:5000:5000::/home/vmail:/bin/sh

    Please correct this and then run:

    chown -R vmail:vmail /var/vmail

    and then recreate all mail domains and users.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    And the vmail user uid and gid have to match the uid and gid from the ispconfig server settings.
     
  8. momfer

    momfer New Member

    Just to be absolutely shure:

    Should it be /home/vmail (as stated) or /var/vmail (my best guess) in the passwd file?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You are right. Should be /var/vmail for all currenmt versions, I copied the line from a old install and the path has been changed since then to /var/vmail
     

Share This Page