Postfix Setup

Discussion in 'Server Operation' started by cebisch, Nov 12, 2014.

  1. cebisch

    cebisch New Member

    System:

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***
    [WARN] ip addresses from hostname differ from ifconfig output. Please check your ip settings.
    [INFO] No ISPConfig found.
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 5.4.4-14+deb7u12
    
    ##### PORT CHECK #####
    
    [WARN] Port 443 (Webserver SSL) seems NOT to be listening
    [WARN] Port 993 (IMAP server SSL) seems NOT to be listening
    [WARN] Port 995 (POP3 server SSL) seems NOT to be listening
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    [WARN] Port 21 (FTP server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connections you have to enable this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 1778)
    [INFO] I found the following mail server(s):
            Postfix (PID 2943)
    [INFO] I found the following pop3 server(s):
            Unknown process (zarafa-gateway) (PID 2868)
    [INFO] I found the following imap server(s):
            Unknown process (zarafa-gateway) (PID 2868)
    [WARN] I could not determine which ftp server is running.
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [localhost]:3306                (2539/mysqld)
    [anywhere]:236          (2777/zarafa-server)
    [anywhere]:237          (2777/zarafa-server)
    [anywhere]:110          (2868/zarafa-gateway)
    [anywhere]:143          (2868/zarafa-gateway)
    [anywhere]:111          (1646/rpcbind)
    [anywhere]:8080         (2900/zarafa-ical)
    [localhost]:2003                (2835/zarafa-dagent)
    [anywhere]:22           (2170/sshd)
    [anywhere]:25           (2943/master)
    [anywhere]:45950                (1677/rpc.statd)
    [localhost]11           (1646/rpcbind)
    *:*:*:*::*:80           (1778/apache2)
    *:*:*:*::*:22           (2170/sshd)
    *:*:*:*::*:25           (2943/master)
    *:*:*:*::*:49794                (1677/rpc.statd)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Postfix main.cf:
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = no
    
    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = zarafa.domain1.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination =  zarafa.donamin1.com
    relayhost =
    mynetworks = 192.168.10.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_mailbox_domains = domain1.com, domain2.com
    virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
    virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf, ldap:/etc/postfix/ldap-groups.cf
    virtual_transport = lmtp:127.0.0.1:2003
    
    ldap-users.cf:
    Code:
    server_host = samba.domain1.com
    search_base = ou=Users,dc=domain1,dc=com
    version = 3
    bind = yes
    bind_dn = cn=zarafa-connect,cn=users,dc=domain1,dc=com
    bind_pw = securepassword
    scope = sub
    query_filter = (&(objectClass=user)(mail=%s))
    result_attribute = mail
    
    ldap-aliases.cf:
    Code:
    server_host = samba.domain1.com
    search_base = ou=Users,dc=domain1,dc=com
    version = 3
    bind = yes
    bind_dn = cn=zarafa-connect,cn=users,dc=domain1,dc=com
    bind_pw = securepassword
    scope = sub
    query_filter = (&(objectClass=user)(otherMailbox=%s))
    result_format = %d
    result_attribute = mail
    

    The problem that i am facing is that postfix changes the email on the alias to the actual user email. Because of that I cannot determine what address the email was sent to. The same counts for the groups. The delivering of emails works flawless but it always shows up with the main email address of the user. I want postfix to test if the email is valid but not to rewrite the address.
     
  2. srijan

    srijan New Member HowtoForge Supporter

    Have you installed ISPConfig, which version??


    As the there is ISPConfig, which tutorial you followed to mend the server?
     
  3. cebisch

    cebisch New Member

    I don't have ISPConfig installed.
     

Share This Page