postfix mta basic setup demo

Upload: willyvs

Post on 02-Jun-2018

243 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Postfix MTA Basic Setup Demo

    1/22

    [1]

    INSTALLATIE VAN MAILSERVER POSTFIX

    (annex DOVECOT, )

  • 8/10/2019 Postfix MTA Basic Setup Demo

    2/22

    [2]

    2. Postfx nsta!!e"en

    Voorbereiding

    Controle of poort 25 (SMTP) vrij is:

    root@mail:~# nmap -sUT localhost

    Starting Nmap 6.00 ( http://nmap.org ) at 2014-09-08 04:15 CEST

    Nmap scan report for localhost (127.0.0.1)

    Host is up (0.00023s latency).

    Other addresses for localhost (not scanned): 127.0.0.1

    Not shown: 1991 closed ports

    PORT STATE SERVICE

    22/tcp open ssh

    25/tcp open smtp

    53/tcp open domain

    111/tcp open rpcbind389/tcp open ldap

    53/udp open domain

    67/udp open|filtered dhcps

    111/udp open rpcbind

    682/udp open|filtered xfr

    Nmap done: 1 IP address (1 host up) scanned in 1.30 seconds

    root@mail:~# fuser -n tcp 25

    25/tcp: 2535

    root@mail:~#ps aux |grep 2535

    101 2535 0.0 0.2 44736 1052 ? Ss 01:26 0:00/usr/sbin/exim4 -bd -q30m

    root 10313 0.0 0.1 7836 880 pts/0 S+ 04:17 0:00 grep 2535

    Blijb!!r is "#i$% MT& st!nd!!rd ge'nst!lleerd op de lo!le ebi!n$!*ine

    !t +ordt bevestigd dor :

    root@mail:~# telnet localhost 25

    Trying ::1...

    Connected to localhost.

    Escape character is '^]'.

    220 mail.mydomain.lab ESMTP Exim 4.80 Mon, 08 Sep 2014 04:17:47 +0200

    ,e-.e Postfi# / +ele versie0 (B!ports) 2.11.1-1~bpo70+1:

    Voeg in et!ptso-reslist de volgende regel toe

    deb http://http.debian.net/debian wheezy-backports main

    Voer een -pd!te v!n de p!etten!*e door

    Mail:~# apt-get update && apt-get upgrade

  • 8/10/2019 Postfix MTA Basic Setup Demo

    3/22

    [3]

    4nst!lleer de postfi# MT&

    root@mail:~# apt-get -t wheezy-backports install postfix

    Reading package lists... Done

    Building dependency tree

    Reading state information... Done

    The following extra packages will be installed:

    ssl-cert

    Suggested packages:

    postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin

    dovecot-common resolvconf postfix-cdb ufw postfix-doc openssl-blacklist

    The following packages will be REMOVED:exim4 exim4-base exim4-config exim4-daemon-light

    The following NEW packages will be installed:

    postfix ssl-cert0 upgraded, 2 newly installed, 4 to remove and 37 not upgraded.

    Need to get 1,715 kB of archives.

    After this operation, 35.8 kB of additional disk space will be used.

    Do you want to continue [Y/n]?

    Get:1 http://ftp.belnet.be/debian/ wheezy/main ssl-cert all 1.0.32 [19.5

    kB]

    Get:2 http://http.debian.net/debian/ wheezy-backports/main postfix amd64

    2.11.1- 1~bpo70+1 [1,695 kB]

    Fetched 1,715 kB in 21s (79.0 kB/s)

    Preconfiguring packages ...

    (Reading database ... 29602 files and directories currently installed.)

    Removing exim4 ...

    Selecting previously unselected package ssl-cert.

    (Reading database ... 29599 files and directories currently installed.)

    Unpacking ssl-cert (from .../ssl-cert_1.0.32_all.deb) ...

    Processing triggers for man-db ...

    dpkg: exim4-config: dependency problems, but removing anyway as you

    requested:

    exim4-base depends on exim4-config (>= 4.30) | exim4-config-2; however:

    Package exim4-config is to be removed.

    Package exim4-config-2 is not installed.

    Package exim4-config which provides exim4-config-2 is to be removed.

    exim4-base depends on exim4-config (>= 4.30) | exim4-config-2; however:

    Package exim4-config is to be removed.

    Package exim4-config-2 is not installed.

    Package exim4-config which provides exim4-config-2 is to be removed.

  • 8/10/2019 Postfix MTA Basic Setup Demo

    4/22

    [%]

    (Reading database ... 29608 files and directories currently installed.)

    Removing exim4-config ...

    dpkg: exim4-daemon-light: dependency problems, but removing anyway as you

    reques ted:

    bsd-mailx depends on default-mta | mail-transport-agent; however:

    Package default-mta is not installed.

    Package exim4-daemon-light which provides default-mta is to be removed.

    Package mail-transport-agent is not installed.

    Package exim4-daemon-light which provides mail-transport-agent is to be

    remove d.

    bsd-mailx depends on default-mta | mail-transport-agent; however:

    Package default-mta is not installed.

    Package exim4-daemon-light which provides default-mta is to be removed.

    Package mail-transport-agent is not installed.

    Package exim4-daemon-light which provides mail-transport-agent is to be

    remove d.

    Removing exim4-daemon-light ...

    [ ok ] Stopping MTA: exim4_listener.

    Processing triggers for man-db ...

    Selecting previously unselected package postfix.

    (Reading database ... 29547 files and directories currently installed.)

    Unpacking postfix (from .../postfix_2.11.1-1~bpo70+1_amd64.deb) ...Processing triggers for man-db ...

    Setting up ssl-cert (1.0.32) ...

    hostname: Name or service not known

    make-ssl-cert: Could not get FQDN, using "MAIL.mydomain.lab".

    make-ssl-cert: You may want to fix your /etc/hosts and/or DNS setup and run

    make-ssl-cert: make-ssl-cert generate-default-snakeoil --force-overwrite

    make-ssl-cert: again.

    Setting up postfix (2.11.1-1~bpo70+1) ...Adding group `postfix' (GID 110) ...Done.Adding system user `postfix' (UID 107) ...Adding new user `postfix' (UID 107) with group `postfix' ...

    Not creating home directory `/var/spool/postfix'.Creating /etc/postfix/dynamicmaps.cf

  • 8/10/2019 Postfix MTA Basic Setup Demo

    5/22

  • 8/10/2019 Postfix MTA Basic Setup Demo

    6/22

    [8]

    s$tpd9b!nner 7 $6*ostn!$e "SMTP $!il9n!$e (ebi!n;-e-e blijft st!!n it !n oo gedis!bled +orden door een n-l+!!rde

    $ee te geven

    Vo!%ene otes oe% -e toe

    inet9interf!es 7 !ll4nterf!e vi! +ele $!il !n verst--rd en ontv!ngen +orden

    Mail:~# postconf e inet_interfaces = all

    $!ilbo#9o$$!nd 7

    Mail:~# postconf e mailbox_command =

    ierbij !n je een o$$!ndo $eegegeven +!!r$ee de $!il $oet !fgeleverd +orden

    bij de ontv!nger v!n de $!il ef!-lt +ordt er niets $eegegeven $et de.e optie

    it beteent d!t *et proes voor *et !fleveren v!n de $!il (lo!l)? +ordt -itgevoerd $et *et

    -serid v!n de ontv!nger v!n de $!il "en -it.ondering *ierop is *et verst-ren v!n $!il n!!r

    de -ser root

    oord!t er een !li!s $oet $eegegeven +orden voor de.e -ser +ordt de $!il !fgeleverd

    $et *et -serid v!n de !li!s en vor$t dit d-s geen beveiligingsproblee$

    $6destin!tion 7 $6do$!inl!b? $!il$6do$!inl!b?lo!l*ost$6do$!inl!b?

    lo!l*ost

    Mail:~# postconf e mydestination = mydomain.lab,

    mail.mydomain.lab,localhost.mydomain.lab,localhost

    Voor de beste$$ingen $eegegeven n! @$6destin!tionA +orden de $!ils lo!!l

    !fge*!ndeld en !fgeleverd in de $!ildir v!n de beste$$eling door de lo!l de!$on

    $6do$!in 7 $6do$!inl!b

    Mail:~# postconf e mydomain = mydomain.lab

    e n!!$ +!!r$ee *et do$ein geend is in

  • 8/10/2019 Postfix MTA Basic Setup Demo

    7/22

    []

    Mail:~# postconf e myhostname = mail.mydomain.lab

    e f-ll6/>-!lified do$!in n!$e +!!r$ee de (MT&) server geend is in

  • 8/10/2019 Postfix MTA Basic Setup Demo

    8/22

    [G]

    $'&

    Proes d!t +!*t tot +!nneer er ino$ende $!ils !fgeleverd +orden in de $!ildrop/

    diretor6 en .e doorgeeft !!n de le!n-p de!$on

    0e!'e "o$essen 'o3en n a$te +- *et ontan%en an 3a!s

    M4

    Ver+ert HHn $!il per onnetie en geeft de.e door !!n de le!n-p/de!$on

    $!ean&

    Ver+ert ino$ende $!ils door de.e in de ino$ing >-e-e te pl!!tsen? d!!rn! +ordt de

    >-e-e/$!n!ger *ierv!n op de *oogte gebr!*t

    t"a! "e1"te

    e!$on die onder ontrole v!n de $!ster/ de!$on dr!!it? *ij *!ndelt een bep!!ld !!nt!lino$ende en -itg!!nde onneties !f I!nneer *et $!#i$!!l !!nt!l onneties bereit is?

    st!rt de $!ster een volgende trivi!l/re+rite de!$on

    3a!"o

    M!ils die ver+ert +erden door send$!il/de!$on $!!r nog niet door de pi-p/de!$on

    ver+ert +erden0 +orden in de $!ildrop/>-e-e gepl!!tst 4n de.e >-e-e -nnen oo $!ils

    gepl!!tst +orden !ls postfi# niet !tief is I!nneer postfi# +ordt opgest!rt +orden de.e

    $!ils verder ver+ert

    ost"o

    $!!t een file !!n in de $!ildrop/diretor6 en pl!!tst de $!il/in*o-d in de.e diretor6

    Eventuele Foutmelding bij het opstarten van postfix :

    Bij *et opst!rten v!n postfi# !n .i* een fo-t$elding voordoen in /var/log/mail.log

    $et betreing tot *et openen v!n de !li!ses/ d!t!b!se

    (Sep 21 2D:18:DD M!il postfi#s$tpd[3D21]: f!t!l: open d!t!b!se

    et!li!sesdb:

  • 8/10/2019 Postfix MTA Basic Setup Demo

    9/22

    [L]

    5es!&t: bij *et opst!rten v!n postfi# +orden 3 de!$ons opgest!rt? dit +ijst op de

    $od-l!ire str-t--r

    postfi# (!ls -ser root)

    pi-p (!ls -ser postfi#)

    >$gr (!ls -ser postfi#)

    /. 6e+"&'e"s aan3a'en

    Aan3a'en an e (7NIX) %e+"&'e"s en *o3e"e$to"es

    root@MAIL:~# adduser jan

    Adding user `jan' ...

    Adding new group `jan' (1001) ...

    Adding new user `jan' (1001) with group `jan' ...

    Creating home directory `/home/jan' ...

    Copying files from `/etc/skel' ...

    Enter new UNIX password:

    Retype new UNIX password:

    passwd: password updated successfully

    Changing the user information for jan

    Enter the new value, or press ENTER for the default

    Full Name []:

    Room Number []:

    Work Phone []:Home Phone []:

    Other []:

    Is the information correct? [Y/n] y

    root@MAIL:~# adduser piet

    Adding user `piet' ...

    Adding new group `piet' (1002) ...

    Adding new user `piet' (1002) with group `piet' ...

    The home directory `/home/piet' already exists. Not copying from

    `/etc/skel'.

    Enter new UNIX password:

    Retype new UNIX password:

    passwd: password updated successfullyChanging the user information for piet

    Enter the new value, or press ENTER for the default

    Full Name []:

    Room Number []:

    Work Phone []:

    Home Phone []:

    Other []:

    Is the information correct? [Y/n] y

    root@MAIL:~# adduser joris

    Adding user `joris' ...

    Adding new group `joris' (1003) ...

    Adding new user `joris' (1003) with group `joris' ...Creating home directory `/home/joris' ...

    Copying files from `/etc/skel' ...

  • 8/10/2019 Postfix MTA Basic Setup Demo

    10/22

    [1D]

    Enter new UNIX password:

    Retype new UNIX password:

    passwd: password updated successfully

    Changing the user information for joris

    Enter the new value, or press ENTER for the default

    Full Name []:

    Room Number []:Work Phone []:

    Home Phone []:

    Other []:

    Is the information correct? [Y/n] y

    root@MAIL:~# adduser korneel

    Adding user `korneel' ...

    Adding new group `korneel' (1004) ...

    Adding new user `korneel' (1004) with group `korneel' ...

    Creating home directory `/home/korneel' ...

    Copying files from `/etc/skel' ...

    Enter new UNIX password:

    Retype new UNIX password:

    passwd: password updated successfully

    Changing the user information for korneel

    Enter the new value, or press ENTER for the default

    Full Name []:

    Room Number []:

    Work Phone []:

    Home Phone []:

    Other []:

    Is the information correct? [Y/n] y

    root@MAIL:~#

    Belet de $!ilgebr-iers d!t .e -nnen inloggen op de server door een v!lse s*ell in te

    stellen in /etc/passwd.

    root@MAIL:~# nano /etc/passwd

    ....

    statd:x:102:65534::/var/lib/nfs:/bin/false

    user:x:1000:1000:user,,,:/home/user:/bin/bash

    bind:x:103:106::/var/cache/bind:/bin/false

    openldap:x:104:107:OpenLDAP Server Account,,,:/var/lib/ldap:/bin/falsemessagebus:x:105:108::/var/run/dbus:/bin/false

    sshd:x:106:65534::/var/run/sshd:/usr/sbin/nologin

    postfix:x:107:110::/var/spool/postfix:/bin/false

    jan:x:1001:1001:,,,:/home/jan:/bin/false

    piet:x:1002:1002:,,,:/home/piet:/bin/falsejoris:x:1003:1003:,,,:/home/joris: /bin/falsekorneel:x:1004:1004:,,,:/home/korneel: /bin/false

  • 8/10/2019 Postfix MTA Basic Setup Demo

    11/22

    [11]

    A!te"natef %e+"&'e"s aan3a'en n +at$* (ne1&se"s) 8 1at$* o&t99 (1o"t e *o3e"

    aan%e3aa't)

    root@MAIL:~# nano /etc/passwd

    root@MAIL:~# man newusers

    NEWUSERS(8) System Management Commands

    NEWUSERS(8)

    NAME

    newusers - update and create new users in batch

    SYNOPSIS

    newusers [options] [file]

    DESCRIPTION

    The newusers command reads a file (or the standard input by default)

    and uses this information to update a set of existing users or to

    create new users. Each line is in the same format as the standard

    password file (see passwd(5)) with the exceptions explained below:

    pw_name:pw_passwd:pw_uid:pw_gid:pw_gecos:pw_dir:pw_shell

    pw_name

    This is the name of the user.

    It can be the name of a new user or the name of an existing user

    (or an user created before by newusers). In case of an existing

    user, the user's information will be changed, otherwise a new

    user

    will be created.

    root@MAIL:~# nano postfixusers

    jan:jan:::::/bin/false

    piet:piet:::::/bin/false

    joris:joris:::::/bin/false

    korneel:korneel:::::/bin/false

    root@MAIL:~# newusers postfixusers

  • 8/10/2019 Postfix MTA Basic Setup Demo

    12/22

    [12]

    :. Testen an e ostfx MTA (te!net).

    M!! lo!!l een onnetie op poort 25 v!n de server (lo!l*ost) 1218D1) vi!

    een telnet/sessie en probeer een $!il te verst-ren n!!r gebr-ier piet

    root@MAIL:~# telnet localhost 25

    Trying ::1...

    Connected to localhost.

    Escape character is '^]'.

    220 Mail.mydomain.lab ESMTP Postfix (Debian/GNU)

    mail from:root@localhost

    250 2.1.0 Ok

    rcpt to:[email protected]

    451 4.3.0 : Temporary lookup failure

    et is d-idelij d!t de gebr-ier j!n door *et s6stee$ niet gevonden !n +orden !!ro$

    voer je *et o$$!ndo newaliases-it o$ de !li!ssen opnie-+ te inde#eren

    root@MAIL:~# newaliases

    *ttp:+++postfi#org!li!ses5*t$l

    Normally, the aliases(5)table is specified as a text file that servesas input to thepostalias(1)command. The result, an indexed file in dbmor dbformat, is used for fast lookup by the mail system. Execute the

    command newaliasesin order to rebuild the indexed file afterchanging the Postfix alias database.

    root@MAIL:~# telnet localhost 25

    Trying ::1...

    Connected to localhost.

    Escape character is '^]'.

    220 Mail.mydomain.lab ESMTP Postfix (Debian/GNU)

    mail from:[email protected]

    250 2.1.0 Ok

    rcpt to:[email protected] 2.1.5 Ok

    data

    354 End data with .

    subject:mail 1

    Eerste mail

    .

    250 2.0.0 Ok: queued as 1CC95A81

    Blijb!!r +ordt de gebr-ier piet n- +el *erend en de $!il o$t in de >-e-e tere*t

  • 8/10/2019 Postfix MTA Basic Setup Demo

    13/22

    [13]

    root@MAIL:~# telnet localhost 25

    Trying ::1...

    Connected to localhost.

    Escape character is '^]'.

    220 Mail.mydomain.lab ESMTP Postfix (Debian/GNU)

    ehlo s01250-s01.mydomain.lab

    250-PIPELINING

    250-SIZE 10240000

    250-VRFY

    250-ETRN

    250-ENHANCEDSTATUSCODES

    250-8BITMIME

    250 DSN

    mail from:root@localhost

    250 2.1.0 Ok

    rcpt to:[email protected]

    454 4.7.1 : Relay access denied

    "en gebr-ier piet in een !nder do$ein +ordt pro$pt ge+eigerd (Nie eerder

    @$6destin!tionA)

    root@MAIL:~# cd /home/piet/Maildir/new/

    root@MAIL:/home/piet/Maildir/new/#

    root@MAIL:/home/piet/Maildir/new/#cat

    1410147989.V809I6000bM841358.S01.mydomain.lab

    Return-Path: X-Original-To: [email protected]

    Delivered-To: [email protected]

    Received: from localhost (localhost [IPv6:::1])

    by s01.mydomain.lab (Postfix) with SMTP id 2841EA7D

    for ; Mon, 8 Sep 2014 05:45:55 +0200 (CEST)

    subject: mail 1

    Message-Id:

    Date: Mon, 8 Sep 2014 05:45:55 +0200 (CEST)

    From: [email protected]

    Eerste mail

    root@MAIL:/home/piet/Maildir/new/#

    &ls je in de *o$ediretor6 v!n de ge!ddresseerde piet /home/piet/Maildirg!!t

    ijen? .ie je d!t er een $!ilbo# +erd !!nge$!!t en d!t in de diretor6 new$!il is

    toegeo$en

    "le $!il +ordt !f.onderlij opgesl!gen in een testbest!nd

  • 8/10/2019 Postfix MTA Basic Setup Demo

    14/22

    [1%]

    ;. Ma! ontan%en 3et o$!il)

    poppers6ste$ s-pports POP3? TES (SSE)? !nd -ses t*e tr!dition!l =

  • 8/10/2019 Postfix MTA Basic Setup Demo

    15/22

    [15]

    Get:1 http://http.debian.net/debian/ wheezy-backports/main dovecot-core

    amd64

    1:2.2.9-1~bpo70+1 [3,474 kB]

    Get:2 http://http.debian.net/debian/ wheezy-backports/main dovecot-imapd

    amd64

    1:2.2.9-1~bpo70+1 [654 kB]

    Get:3 http://http.debian.net/debian/ wheezy-backports/main dovecot-pop3damd64

    1:2.2.9-1~bpo70+1 [526 kB]

    Fetched 4,655 kB in 14s (331 kB/s)

    Preconfiguring packages ...

    Selecting previously unselected package dovecot-core.

    (Reading database ... 29668 files and directories currently installed.)

    Unpacking dovecot-core (from .../dovecot-core_1%3a2.2.9-

    1~bpo70+1_amd64.deb)

    ...

    Selecting previously unselected package dovecot-imapd.

    Unpacking dovecot-imapd (from .../dovecot-imapd_1%3a2.2.9-

    1~bpo70+1_amd64.deb) ...

    Selecting previously unselected package dovecot-pop3d.

    Unpacking dovecot-pop3d (from .../dovecot-pop3d_1%3a2.2.9-

    1~bpo70+1_amd64.deb) ...

    Processing triggers for man-db ...

    Setting up dovecot-core (1:2.2.9-1~bpo70+1) ...

    Creating config file /etc/dovecot/dovecot.conf with new version

    Creating config file /etc/dovecot/dovecot-dict-sql.conf.ext with new

    version

    Creating config file /etc/dovecot/dovecot-sql.conf.ext with new version

    Creating config file /etc/dovecot/conf.d/10-auth.conf with new version

    Creating config file /etc/dovecot/conf.d/10-director.conf with new version

    Creating config file /etc/dovecot/conf.d/10-logging.conf with new version

    Creating config file /etc/dovecot/conf.d/10-mail.conf with new version

    Creating config file /etc/dovecot/conf.d/10-master.conf with new version

    Creating config file /etc/dovecot/conf.d/10-ssl.conf with new version

    Creating config file /etc/dovecot/conf.d/10-tcpwrapper.conf with new

    version

    Creating config file /etc/dovecot/conf.d/15-lda.conf with new version

    Creating config file /etc/dovecot/conf.d/15-mailboxes.conf with new version

    Creating config file /etc/dovecot/conf.d/90-acl.conf with new version

    Creating config file /etc/dovecot/conf.d/90-plugin.conf with new version

    Creating config file /etc/dovecot/conf.d/90-quota.conf with new version

    Creating config file /etc/dovecot/conf.d/auth-checkpassword.conf.ext with

    new version

  • 8/10/2019 Postfix MTA Basic Setup Demo

    16/22

    [18]

    Creating config file /etc/dovecot/conf.d/auth-deny.conf.ext with new

    version

    Creating config file /etc/dovecot/conf.d/auth-master.conf.ext with new

    version

    Creating config file /etc/dovecot/conf.d/auth-passwdfile.conf.ext with newversion

    Creating config file /etc/dovecot/conf.d/auth-sql.conf.ext with new version

    Creating config file /etc/dovecot/conf.d/auth-static.conf.ext with new

    version

    Creating config file /etc/dovecot/conf.d/auth-system.conf.ext with new

    version

    Creating config file /etc/dovecot/conf.d/auth-vpopmail.conf.ext with new

    version

    [ ok ] Starting IMAP/POP3 mail server: dovecot.

    Setting up dovecot-imapd (1:2.2.9-1~bpo70+1) ...

    Creating config file /etc/dovecot/conf.d/20-imap.conf with new version

    Setting up dovecot-pop3d (1:2.2.9-1~bpo70+1) ...

    Creating config file /etc/dovecot/conf.d/20-pop3.conf with new version

    Processing triggers for dovecot-core ...

    [ ok ] Restarting IMAP/POP3 mail server: dovecot.

    [ ok ] Starting IMAP/POP3 mail server: dovecot.

  • 8/10/2019 Postfix MTA Basic Setup Demo

    17/22

    [1]

    root@mail:~# nano /etc/dovecot/dovecot.conf

    KK oveot onfig-r!tion file

    K Most of t*e !t-!l onfig-r!tion gets inl-ded belo+ T*e filen!$es !re first sorted b6

    t*eir &SC44 v!l-e !nd p!rsed in t*!t order T*e DD/prefi#es in filen!$es !re intended to

    $!e it e!sier to -nderst!nd t*e ordering

    9n$!&e $onf..$onf

    ?. Ma! ontan%en 3et o!fgesloten .onder d-idelije fo-t$elding

  • 8/10/2019 Postfix MTA Basic Setup Demo

    18/22

    [1G]

    ,ij d!!ro$ *et s6stee$logboe n! o$ enige d-idelij*eid te rijgen o$trent de $ogelije

    oor.!!

    root@mail:~# tail -15 /var/log/syslog

    Sep 8 06:40:16 S01 dovecot: pop3-login: Login: user=, method=PLAIN,

    rip=::1, lip=::1, mpid=19155, secured,

    session=Sep 8 06:40:16 S01 dovecot: pop3(piet): Error: open(/var/mail/piet)failed: Permission denied (euid=1002(piet) egid=1002(piet) missing +w perm:/var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775)Sep 8 06:40:16 S01 dovecot: pop3(piet): Error: Failed to autocreatemailbox INBOX:

    Internal error occurred. Refer to server log for more information. [2014-09-08 06:40:16]

    Sep 8 06:40:16 S01 dovecot: pop3(piet): Error: Couldn't open INBOX:Internal error occurred. Refer to server log for more information. [2014-09-08 06:40:16]Sep 8 06:40:16 S01 dovecot: pop3(piet): Fatal: master: service(pop3):child 19155 killed with signal 11 (core dumps disabled)Sep 8 06:40:16 S01 kernel: [18831.273589] pop3[19155]: segfault at 60 ip

    00007fdf0f90f8a0 sp 00007fffdcd26698 error 4 in libdovecot-storage.so.0.0.0

    [7fdf0f841000+110000]

    root@mail:~#

    e fo-t$elding ver+ijst n!!r *et p!d voor de $!ilbo# /var/mail/piet. it o$t *ele$!!l

    niet overeen $et de ingestelde lo!tie in postfi#

    *ttp:+ii2doveotorgM!ilEo!tion

    *ttp:+ii2doveotorgB!siConfig-r!tion

    Mail Location

    Set the mail_locationin conf.d/10-mail.conf as determined by the instructions inFindMailLocation.

    ,ij *et onfig-r!tiebest!nd voor de $!illo!tie in doveot n!:

    root@mail:~# nano /etc/dovecot/conf.d/10-mail.conf

    ## Mailbox locations and namespaces##

    # Location for users' mailboxes. The default is empty, which means that

    Dovecot# tries to find the mailboxes automatically. This won't work if the user# doesn't yet have any mail, so you should explicitly tell Dovecot the full

  • 8/10/2019 Postfix MTA Basic Setup Demo

    19/22

    [1L]

    # location.## If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)# isn't enough. You'll also need to tell Dovecot where the other mailboxesare# kept. This is called the "root mail directory", and it must be the first

    # path given in the mail_location setting.#

    # There are a few special variables you can use, eg.:## %u - username# %n - user part in user@domain, same as %u if there's no domain# %d - domain part in user@domain, empty if there's no domain

    # %h - home directory## See doc/wiki/Variables.txt for full list. Some examples:#

    mail_location = maildir:~/Maildir# mail_location = mbox:~/mail:INBOX=/var/mail/%u# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n#

    # #

    # mail_location = mbox:~/mail:INBOX=/var/mail/%u

    erst!rt de doveot/servie n! de nodige !!np!ssingen:

    root@mail:~# service dovecot restart[ ok ] Restarting IMAP/POP3 mail server: dovecot.

    M!! opnie-+ de onnetie op poort 11D v!n de server (lo!l*ost) 1218D1) vi!

    een telnet/sessie en probeer $!il te ontv!ngen voor gebr-ier piet

    root@mail:~# telnet localhost 110Trying ::1...Connected to localhost.Escape character is '^]'.+OK Dovecot ready.user piet+OKpass piet

    +OK Logged in.list

    +OK 1 messages:1 427

    .retr 1+OK 427 octetsReturn-Path: X-Original-To: [email protected]

    Delivered-To: [email protected]: from localhost (localhost [IPv6:::1])

    by s01.mydomain.lab (Postfix) with SMTP id 2841EA7Dfor ; Mon, 8 Sep 2014 05:45:55 +0200 (CEST)

    subject: mail 1Message-Id:

  • 8/10/2019 Postfix MTA Basic Setup Demo

    20/22

    [2D]

    Date: Mon, 8 Sep 2014 05:45:55 +0200 (CEST)From: [email protected]

    eerste mail.

    Probeer n- *et.elfde op poort 1%3 (4M&P) en probeer de $!il te le.en voor gebr-ier piet

    root@mail:~# telnet localhost 143

    Trying ::1...Connected to localhost.Escape character is '^]'.* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE

    IDLE STARTTLS AUTH=PLAIN] Dovecot ready.a1 LOGIN piet pieta1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE

    IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS

    THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT

    CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE

    QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-

    STATUS SPECIAL-USE BINARY MOVE] Logged ina2 LIST "" "*"* LIST (\HasNoChildren) "." INBOXa2 OK List completed.

    a3 EXAMINE INBOX* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)* OK [PERMANENTFLAGS ()] Read-only mailbox.* 1 EXISTS

    * 0 RECENT* OK [UIDVALIDITY 1410152420] UIDs valid* OK [UIDNEXT 2] Predicted next UID* OK [NOMODSEQ] No permanent modsequencesa3 OK [READ-ONLY] Examine completed (0.000 secs).

    a4 FETCH 1 BODY[]* 1 FETCH (BODY[] {427}

    Return-Path: X-Original-To: [email protected]

    Delivered-To: [email protected]: from localhost (localhost [IPv6:::1])by s01.mydomain.lab (Postfix) with SMTP id 2841EA7Dfor ; Mon, 8 Sep 2014 05:45:55 +0200 (CEST)

    subject: mail 1Message-Id:

    Date: Mon, 8 Sep 2014 05:45:55 +0200 (CEST)From: [email protected]

    eerste mail

    )a4 OK Fetch completed.

    a5 LOGOUT* BYE Logging outa5 OK Logout completed.

  • 8/10/2019 Postfix MTA Basic Setup Demo

    21/22

    [21]

    Connection closed by foreign host.root@mail:~#

    @o1 to test an IMAP se"e" += &sn% te!net

    I*!t 6o- need:

    T*e *ost n!$e of t*e 4M&P server (for -se in t*e telnet o$$!nd)

    T*e 4M&P -ser n!$e (for -se in t*e EO;4< o$$!nd)

    T*e 4M&P -sers p!ss+ord (for -se in t*e EO;4< o$$!nd)

    En$"=ton

    Uor !dded se-rit6? 6o- !n enr6pt 6o-r 4M&P onnetion T*is re>-ires t*!t 6o-r

    server s-pports SSE or TES !nd t*!t 6o- *!ve !ess to !n SSETES lient progr!$?

    for e#!$ple OpenSSE? to -se inste!d of telnet

    &s t*e port/n-$ber nor$!ll6 is LL3? !n e#!$ple OpenSSE o$$!nd +o-ld be openssls9lient /onnet i$!pe#!$pleo$:LL3 />-iet (4f 6o- +o-ld lie to see t*e p-bli e6 of

    t*e server? !s +ell !s so$e ot*er enr6ption/rel!ted infor$!tion? o$it />-iet) T*e server

    s*o-ld t*en st!rt !n 4M&P session? displ!6ing ! greeting s-* !s t*e W O, oveot re!d6

    e#!$ple belo+

    . V"t&a!e o3enen

  • 8/10/2019 Postfix MTA Basic Setup Demo

    22/22

    [22]