Pb with the Mail Server on Debian 9.3 (stretch) fresh install with ISPCONFIG 3.1.9

Discussion in 'Installation/Configuration' started by Yoann, Dec 21, 2017.

  1. Yoann

    Yoann New Member

    Hello :)

    First i want to thank you for being reading my thread and tell you than my english is bad. So apologize me.
    I thank you too for the amazing stuff you share each time!

    I've installed The Perfect Server - Debian 9 (Stretch) on an ovh server (fresh install) => https://www.howtoforge.com/tutorial...-9-stretch-apache-bind-dovecot-ispconfig-3-1/

    My only problem is than i can't send or receive email. I make some (a lot in fact) search but didnt find a solution. You have to know than i'm a newbie with server administration... I used many hours to find how i could add some external IPs in my conf, i finally found but it was a long way...

    My conf :
    Debian GNU/Linux 9.3
    ISPCONFIG 3.1.9

    Code:
    *****************************
    htf_report.txt
    *****************************
    
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.1.9
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.0.19-1
    
    ##### PORT CHECK #####
    
    [WARN] Port 25 (SMTP server) seems NOT to be listening
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    [WARN] Port 22 (SSH server) seems NOT to be listening
    [WARN] Port 25 (SMTP server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
      Apache 2 (PID 2945)
    [WARN] I could not determine which mail server is running.
    [INFO] I found the following pop3 server(s):
      Dovecot (PID 903)
    [INFO] I found the following imap server(s):
      Dovecot (PID 903)
    [INFO] I found the following ftp server(s):
      PureFTP (PID 1216)
    
    ##### LISTENING PORTS #####
    (only  ()
    Local  (Address)
    [anywhere]:5742  (1118/portsentry)
    [anywhere]:110  (903/dovecot)
    [anywhere]:111  (1118/portsentry)
    [anywhere]:79  (1118/portsentry)
    [anywhere]:15  (1118/portsentry)
    [anywhere]:143  (903/dovecot)
    [anywhere]:54320  (1118/portsentry)
    [anywhere]:2000  (1118/portsentry)
    [anywhere]:27665  (1118/portsentry)
    [anywhere]:1524  (1118/portsentry)
    [anywhere]:21  (1216/pure-ftpd)
    ***.***.***.***:53  (841/named)
    ***.***.***.***:53  (841/named)
    ***.***.***.***:53  (841/named)
    ***.***.***.***:53  (841/named)
    [localhost]:53  (841/named)
    [anywhere]:119  (1118/portsentry)
    [anywhere]:1080  (1118/portsentry)
    [anywhere]:2232  (941/sshd)
    [anywhere]:12345  (1118/portsentry)
    [localhost]:953  (841/named)
    [anywhere]:12346  (1118/portsentry)
    [anywhere]:635  (1118/portsentry)
    [anywhere]:49724  (1118/portsentry)
    [anywhere]:540  (1118/portsentry)
    [anywhere]:1  (1118/portsentry)
    [anywhere]:993  (903/dovecot)
    [anywhere]:20034  (1118/portsentry)
    [anywhere]:32771  (1118/portsentry)
    [anywhere]:995  (903/dovecot)
    [anywhere]:32772  (1118/portsentry)
    [anywhere]:40421  (1118/portsentry)
    [anywhere]:32773  (1118/portsentry)
    [anywhere]:32774  (1118/portsentry)
    [localhost]:10023  (1187/postgrey)
    [localhost]:10024  (1303/amavisd-new)
    [anywhere]:31337  (1118/portsentry)
    [localhost]:10026  (1303/amavisd-new)
    [anywhere]:6667  (1118/portsentry)
    [anywhere]:11  (1118/portsentry)
    [localhost]:11211  (869/memcached)
    [localhost]10  (903/dovecot)
    [localhost]43  (903/dovecot)
    *:*:*:*::*:80  (2945/apache2)
    *:*:*:*::*:8080  (2945/apache2)
    *:*:*:*::*:8081  (2945/apache2)
    *:*:*:*::*:21  (1216/pure-ftpd)
    *:*:*:*::*:53  (841/named)
    *:*:*:*::*:2232  (941/sshd)
    *:*:*:*::*:953  (841/named)
    *:*:*:*::*:443  (2945/apache2)
    *:*:*:*::*:993  (903/dovecot)
    *:*:*:*::*:995  (903/dovecot)
    *:*:*:*::*:10024  (1303/amavisd-new)
    *:*:*:*::*:3306  (7233/mysqld)
    *:*:*:*::*:10026  (1303/amavisd-new)
    
    
    ##### 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
    
    *****************************
    mail.log
    *****************************
    Dec 19 10:35:20 myServerName postfix/postfix-script[4823]: starting the Postfix mail system
    Dec 19 10:35:20 myServerName postfix/master[4825]: daemon started -- version 3.1.6, configuration /etc/postfix
    Dec 19 10:35:35 myServerName dovecot: master: Dovecot v2.2.27 (c0f36b0) starting up without any protocols (core dumps disabled)
    Dec 19 10:35:35 myServerName dovecot: ssl-params: Generating SSL parameters
    Dec 19 10:35:47 myServerName dovecot: ssl-params: SSL parameters regeneration completed
    Dec 19 10:35:50 myServerName dovecot: master: Warning: Killed with signal 15 (by pid=17129 uid=0 code=kill)
    Dec 19 10:35:51 myServerName dovecot: master: Dovecot v2.2.27 (c0f36b0) starting up for imap, lmtp, pop3 (core dumps disabled)
    Dec 19 10:39:56 myServerName postfix/postfix-script[17251]: fatal: cannot execute /usr/sbin/postconf!
    Dec 19 10:39:57 myServerName postfix/master[4825]: terminating on signal 15
    Dec 19 10:43:27 myServerName postgrey[20836]: Process Backgrounded
    Dec 19 10:43:27 myServerName postgrey[20836]: 2017/12/19-10:43:27 postgrey (type Net::Server::Multiplex) starting! pid(20836)
    Dec 19 10:43:27 myServerName postgrey[20836]: Resolved [localhost]:10023 to [127.0.0.1]:10023, IPv4
    Dec 19 10:43:27 myServerName postgrey[20836]: Binding to TCP port 10023 on host 127.0.0.1 with IPv4
    Dec 19 10:43:27 myServerName postgrey[20836]: Setting gid to "119 119"
    Dec 19 10:43:27 myServerName postgrey[20836]: Setting uid to "113"
    Dec 19 10:43:29 myServerName amavis[21482]: starting. /usr/sbin/amavisd-new at myServerName.ovh.net amavisd-new-2.10.1 (20141025), Unicode aware, LC_ALL="C", LANG="fr_FR.UTF-8"
    Dec 19 10:43:29 myServerName amavis[21487]: Net::Server: Group Not Defined.  Defaulting to EGID '120 120'
    Dec 19 10:43:29 myServerName amavis[21487]: Net::Server: User Not Defined.  Defaulting to EUID '114'
    Dec 19 10:43:29 myServerName amavis[21487]: Module Amavis::Conf  2.404
    Dec 19 10:43:29 myServerName amavis[21487]: Module Archive::Zip  1.59
    Dec 19 10:43:29 myServerName amavis[21487]: Module BerkeleyDB  0.55
    Dec 19 10:43:29 myServerName amavis[21487]: Module Compress::Raw::Zlib 2.069
    Dec 19 10:43:29 myServerName amavis[21487]: Module Compress::Zlib  2.069001
    Dec 19 10:43:29 myServerName amavis[21487]: Module Digest::MD5  2.54
    Dec 19 10:43:29 myServerName amavis[21487]: Module Encode  2.80_01
    Dec 19 10:43:29 myServerName amavis[21487]: Module File::Temp  0.2304
    Dec 19 10:43:29 myServerName amavis[21487]: Module IO::Socket::INET6  2.72
    Dec 19 10:43:29 myServerName amavis[21487]: Module IO::Socket::IP  0.37
    Dec 19 10:43:29 myServerName amavis[21487]: Module MIME::Entity  5.508
    Dec 19 10:43:29 myServerName amavis[21487]: Module MIME::parser  5.508
    Dec 19 10:43:29 myServerName amavis[21487]: Module MIME::Tools  5.508
    Dec 19 10:43:29 myServerName amavis[21487]: Module Mail::Header  2.18
    Dec 19 10:43:29 myServerName amavis[21487]: Module Mail::Internet  2.18
    Dec 19 10:43:29 myServerName amavis[21487]: Module Net::LibIDN  0.12
    Dec 19 10:43:29 myServerName amavis[21487]: Module Net::Server  2.008
    Dec 19 10:43:29 myServerName amavis[21487]: Module Scalar::Util  1.4202
    Dec 19 10:43:29 myServerName amavis[21487]: Module Socket  2.020_03
    Dec 19 10:43:29 myServerName amavis[21487]: Module Socket6  0.27
    Dec 19 10:43:29 myServerName amavis[21487]: Module Time::HiRes  1.9733
    Dec 19 10:43:29 myServerName amavis[21487]: Module Unix::Syslog  1.1
    Dec 19 10:43:29 myServerName amavis[21487]: Amavis::ZMQ code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: Amavis::DB code  loaded
    Dec 19 10:43:29 myServerName amavis[21487]: SQL base code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: SQL::Log code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: SQL::Quarantine  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: Lookup::SQL code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: Lookup::LDAP code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: AM.PDP-in proto code loaded
    Dec 19 10:43:29 myServerName amavis[21487]: SMTP-in proto code  loaded
    Dec 19 10:43:29 myServerName amavis[21487]: Courier proto code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: SMTP-out proto code  loaded
    Dec 19 10:43:29 myServerName amavis[21487]: Pipe-out proto code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: BSMTP-out proto code NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: Local-out proto code loaded
    Dec 19 10:43:29 myServerName amavis[21487]: OS_Fingerprint code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: ANTI-VIRUS code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: ANTI-SPAM code  NOT loaded
    Dec 19 10:43:29 myServerName amavis[21487]: ANTI-SPAM-EXT code  NOT loaded
    If someone could help me it will be great!

    Thanks

    Yoann
     
    Last edited: Dec 22, 2017
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if postfix is not started. Try to start postfix, if it does not start then check the mail.log file to find out why it fails.
     
  3. Yoann

    Yoann New Member

    Hello Till,

    I could not start postfix because I had errors in the /etc/postfix/main.cf file
    postfix: fatal: bad string length 0 <1: setgid_group =
    fatal: bad string length 0 <1: mailq_path =
    fatal: bad string length 0 <1: newaliases_path =
    etc.

    Note that I had reconfigured postfix via the "dpkg-reconfigure postfix" command but that did not solve my problem.

    I read on another forum that these lines were not necessary. That we could leave only the line:
    inet_interfaces = loopback-only
    I had "inet_interfaces = all" but I changed to "loopback-only"

    After that I was able to start Postfix.
    And actually I did not have the warnings about SMTP ports after the test in the file htf_report.txt
    And I could send an email via the sendmail command.

    However via roundcube I still can't send or receive mail.
    When I try to send a mail via roundcube it stay on "sending" indefinitely

    What is strange is that I'm apparently the only one who have this problem after following this tutorial?
    I must have missed something ...

    If anyone has an idea I'm interested because I don't know what to do?
    Maybe i need to uncomment some line in /etc/postfix/main.cf to make roundcube work
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then your mail system will not work. Change it back to all.

    Your problems are not related to the tutorial indeed. I guess postfix was already installed on your system and it#s config was broken already. When you install ISPConfig, then it expects to find a 'fresh' postfix config and it just modifies the reqired lines but it does not replace the whole config, so when a config is broken before you install ISPConfig, then it will likely remain broken.

    To your roundcube problem: try to send an email with roundcube and then check the mail.log file to see which messages and errors got added for this sending attempt.
     
  5. Yoann

    Yoann New Member

    Hello again Till,

    About my installation, it was a fresh one. But actually I did not check, maybe in the distribution proposed by OVH there was already postfix installed ... I don't know. What I know is that on a previous tutorial and a server always preinstalled by ovh, I had the same problem with postfix.

    Actually in my log file there were some weird stuff like:
    postfix / smtp [1028]: connect to example.com [2606: 2800: 220: 1: 248: 1893: 25c8: 1946]: 25: Network Is Unreachable
    I understood that it was mail in the queue that the server was trying to send. So I empty the queue.

    I also had:
    postfix / smtpd [32629]: error: unsupported dictionary type: PATH = / bin
    postfix / smtpd [32629]: fatal: smtpd_client_event_limit_exceptions: no pattern after '!'

    It was a line I forgot to comment in main.cf
    Once commented, postfix stop and start, I can send mails via roundcube! : D

    But I still can't receive mail.

    Here are the output in log: error: open database /etc/aliases.db: No such file or directory
    postfix / smtpd [2066]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
    postfix / smtpd [2066]: connect from mail-wr0-f177.google.com [209.85.128.177]
    postfix / smtpd [2066]: NOQUEUE: reject: RCPT from mail-wr0-f177.google.com [209.85.128.177]: 454 4.7.1 <[email protected]>: Relay access denied;

    In main.cf I tried to uncomment: alias_database = hash: / etc / aliases and alias_maps = hash: / etc / aliases Always
    the same error message: error: open database /etc/aliases.db: No such file or directory

    I tried to uncomment instead: alias_database = dbm: / etc / aliases and alias_maps = dbm: / etc / aliases
    Error message: error: unsupported dictionary type: dbm

    So I'm getting closer to the problem. Why does aliases.db not exist and how can I create it? That is the question...

    Thank you
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    OVH is known to have some unclean base setups, so having problems with OVH servers is not unusual.

    Regarding /etc/aliases, I can't tell you why OVH removed it, it exists on a normal standard Debian 9. Try to add it like this:

    touch /etc/aliases
    postmap /etc/aliases

    Then restart postfix.

    Just in case that it helps you, here is a main.cf file from a clean and working debian system with ISPConfig (it's the file which hets created as result of the tutorial you used).

    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 = /usr/share/doc/postfix
    
    # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
    # fresh installs.
    compatibility_level = 2
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.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.
    
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    myhostname = server1.example.com
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = /etc/mailname
    mydestination = server1.example.com, localhost, localhost.localdomain
    relayhost = localhost:587
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains =
    virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uids.cf
    virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gids.cf
    sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_restriction_classes = greylisting
    greylisting = check_policy_service inet:127.0.0.1:10023
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf
    smtpd_tls_security_level = may
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
    smtpd_helo_required = yes
    smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
    smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re , permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = dovecot
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    owner_request_special = no
    smtp_tls_security_level = may
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_exclude_ciphers = RC4, aNULL
    smtp_tls_exclude_ciphers = RC4, aNULL
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    message_size_limit = 0
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
    
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    and here the master.cf file:

    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master" or
    # on-line: http://www.postfix.org/master.5.html).
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (no)    (never) (100)
    # ==========================================================================
    smtp      inet  n       -       y       -       -       smtpd
    #smtp      inet  n       -       y       -       1       postscreen
    #smtpd     pass  -       -       y       -       -       smtpd
    #dnsblog   unix  -       -       y       -       0       dnsblog
    #tlsproxy  unix  -       -       y       -       0       tlsproxy
    submission inet n       -       y       -       -       smtpd
      -o syslog_name=postfix/submission
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=
    #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps     inet  n       -       y       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=
    #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628       inet  n       -       y       -       -       qmqpd
    pickup    unix  n       -       y       60      1       pickup
    cleanup   unix  n       -       y       -       0       cleanup
    qmgr      unix  n       -       n       300     1       qmgr
    #qmgr     unix  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       y       1000?   1       tlsmgr
    rewrite   unix  -       -       y       -       -       trivial-rewrite
    bounce    unix  -       -       y       -       0       bounce
    defer     unix  -       -       y       -       0       bounce
    trace     unix  -       -       y       -       0       bounce
    verify    unix  -       -       y       -       1       verify
    flush     unix  n       -       y       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       y       -       -       smtp
    relay     unix  -       -       y       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       y       -       -       showq
    error     unix  -       -       y       -       -       error
    retry     unix  -       -       y       -       -       error
    discard   unix  -       -       y       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       y       -       -       lmtp
    anvil     unix  -       -       y       -       1       anvil
    scache    unix  -       -       y       -       1       scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    #
    # ====================================================================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    #  mailbox_transport = lmtp:inet:localhost
    #  virtual_transport = lmtp:inet:localhost
    #
    # ====================================================================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus     unix  -       n       n       -       -       pipe
    #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ====================================================================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix  -       n       n       -       -       pipe
    #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix  -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
                    -o smtp_bind_address=
    
    
    127.0.0.1:10025 inet n - n - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtp_send_xforward_command=yes
            -o disable_dns_lookups=yes
    
    
    127.0.0.1:10027 inet n - n - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtp_send_xforward_command=yes
                -o milter_default_action=accept
            -o milter_macro_daemon_name=ORIGINATING
            -o disable_dns_lookups=yes
    
     
  8. Yoann

    Yoann New Member

    So I did what you told me.
    touch / etc / aliases
    postmap / etc / aliases

    I had some warning:
    postmap: warning: / etc / aliases, line 2: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 3: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 6: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 7: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 8: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 9: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 10: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 11: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 12: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 13: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 14: record is in "key: value" format; is this an alias file?
    postmap: warning: / etc / aliases, line 15: record is in "key: value" format; is this an alias file?

    I restart postfix and tested to see if I received mails with a send from gmail.
    mail.log file after the test:
    no more error but still => NOQUEUE: reject: RCPT from mail-wm0-f49.google.com [74.125.82.49]: 454 4.7.1 <[email protected]>: Relay access denied;

    So I replaced the main.cf and master.cf files using the ones you posted
    And .... everything works: D

    Thank you so much Till :D
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Please note that you might have to replace 'server1.example.com' with the hostname of your server in main.cf, in case you did not do that yet. And regarding the aliases file, I've posted a wrong command (postmap). Try the command:

    newalises

    instead and then restart postfix.
     
  10. Yoann

    Yoann New Member

    I tried the command: newaliases / etc / aliases
    and I got the following message: newaliases: fatal: the alias initialization mode does not require any recipient

    For the host name I had not changed it ... and it worked. I do not understand how but ...
    So I changed it anyway.

    Thanks again Till
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Here is the content of my /etc/aliases file, it should be fine for your system without changes.

    Code:
    # See man 5 aliases for format
    postmaster:    root
    clamav: root
    ## mailman mailing list
    mailman:              "|/var/lib/mailman/mail/mailman post mailman"
    mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
    mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
    mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
    mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
    mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
    mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
    mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
    mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
    mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"
    
    with that file content, the 'newaliases' command works without an error. I thought an empty aliases file would be fine as well, but maybe I just was wrong there :)
     
  12. Yoann

    Yoann New Member

    I have the same content in my /etc/aliases file.
    Code:
    # See man 5 aliases for format
    postmaster:    root
    clamav: root
    
    ## mailman mailing list
    mailman:              "|/var/lib/mailman/mail/mailman post mailman"
    mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
    mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
    mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
    mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
    mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
    mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
    mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
    mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
    mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"
    
    So when I try the command: newaliases / etc / aliases
    I get the following message: newaliases: fatal: the alias initialization mode does not require any recipient

    Maybe I have something else different in my configuration...
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    The newaliases command needs no parameter. Just run: "newaliases".
     
  14. Yoann

    Yoann New Member

    ah! :S
    It's fine so, I didn't and don't have error message :D

    Thanks again :)
     

Share This Page