[root@SAKURA_VPS postfix]# cd /etc/postfix
[root@SAKURA_VPS postfix]# vi main.cf
~ 省略 ~
# 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 = domain.tld mydomain = prog.xxxxxx.com ← ここに自分のドメインを設定します。
~ 省略 ~
# RECEIVING MAIL
# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost #inet_interfaces = localhost ← 「inet_interfaces = localhost」をコメントアウトします。 inet_interfaces = all ← 追加します。
~ 省略 ~
# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain. On a mail domain
# gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains – those domains are
# specified elsewhere (see VIRTUAL_README).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# STANDARD_CONFIGURATION_README).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section “REJECTING MAIL FOR UNKNOWN LOCAL USERS”.
#
# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user’s home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user. Specify
# “Maildir/” for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox home_mailbox = Maildir/ ← 今回は Maildir 形式にします。
# The mail_spool_directory parameter specifies the directory where
# UNIX-style mailboxes are kept. The default setting depends on the
# system type.
#
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail
# 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
# 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 mailboxes are
# 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
#
# <doc/wiki/MailLocation.txt>
#
#mail_location = mail_location = mailder:~/Maildir
Dovecot の自動起動設定と起動
設定が完了したら Dovecot の自動起動の設定と起動をします。
[root@SAKURA_VPS conf.d]# systemctl enable dovecot.service
Created symlink from /etc/systemd/system/multi-user.target.wants/dovecot.service to /usr/lib/systemd/system/dovecot.service.
[root@SAKURA_VPS conf.d]# systemctl start dovecot.service
[root@SAKURA_VPS conf.d]# systemctl status dovecot.service ● dovecot.service – Dovecot IMAP/POP3 email server
Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
Active: active (running) since 日 2017-12-10 08:00:45 JST; 4s ago
Process: 26673 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
Main PID: 26683 (dovecot)
CGroup: /system.slice/dovecot.service
tq26683 /usr/sbin/dovecot -F
tq26691 dovecot/anvil
tq26692 dovecot/log
mq26694 dovecot/config
12月 10 08:00:45 xxxx.vs.sakura.ne.jp systemd[1]: Starting Dovecot IMAP/POP3 email server…
12月 10 08:00:45 xxxx.vs.sakura.ne.jp systemd[1]: Started Dovecot IMAP/POP3 email server.
12月 10 08:00:45 xxxx.vs.sakura.ne.jp dovecot[26683]: master: Dovecot v2.2.10 starting up …)
Hint: Some lines were ellipsized, use -l to show in full.
[root@SAKURA_VPS conf.d]#
From xxxxxxxxx@gmail.com Sun Dec 10 10:18:56 2017
Return-Path: <xxxxxxxxx@gmail.com>
X-Original-To: root@prog.xxxxxx.com
Delivered-To: root@prog.xxxxxx.com
Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48])
by xxxxxxxxxx.vs.sakura.ne.jp (Postfix) with ESMTP id 26D9B1F225E4
for <root@prog.xxxxxx.com>; Sun, 10 Dec 2017 10:18:56 +0900 (JST)
Received: by mail-it0-f48.google.com with SMTP id f190so9570012ita.5
for <root@prog.xxxxxx.com>; Sat, 09 Dec 2017 17:18:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=mime-version:from:date:message-id:subject:to;
bh=d629STY1j5GlbWE/551tWrhT+h1apa/aW+5XBvZ5sNU=;
b=ZzuoXNuaa4VGESyJkfJcHpkxf1php5gY+0rxmMuDzsc9rhK5RRtr1aYaB/8YE9sKvq
yuXWG6ZN+kjQ6HlauS2m7REXqBtp0Q8+LSN0DqjYAzd9ZK3ONbHdqx7xlmAEECD92iog
dhaMx3IXpPxBw0KcM00MgU80aBr0F8D0U892ZoBfuJMSNrqSHpsHoWmrhhw3gdyjoPAP
aC+ak/TI4r/if9oEV/RRZmBe6VZvJd5Al7U+UegzhY6RsZtM2h8Ow3vvL6oKW8cpkMQj
X/2OpHKUhX669b4ZaH9bhlfwm2SSNV/Mmxl3DM1umzYDMxhXDs8o4XOpITQbz0iIzJqv
TWfA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=d629STY1j5GlbWE/551tWrhT+h1apa/aW+5XBvZ5sNU=;
b=M5wPb4XCrRpab2cn1t+siQXPnZD7XgwIpqdVGC5xkpRso2sPDiLfwnwfq/cjM4aoCe
xBPs/iowuLUkqwXTT11hpuu6qh+T0n2GAS2IJU3spSzS0pFnytIvUPp4PV/5ySjnso0N
dPum5S0rsL/TIze6/Fwn1oVcejcAitlbOxO505m3HAhVGT9GA4FrmpzytdnbjmjrpBBy
oexfCMTfekBils+shpqwb05OQ1cP36bMyXCF/ViV69hCWgnuGFJzkT0DUPBka+ZoORPx
++Lpuh8PFXBAk258Uhu9M17mFpr4P42bSMc+oHPpfQWistbGIHKvwXEsA7o4kIQFJpKS
bl5g==
X-Gm-Message-State: AKGB3mK5w4FB+HrahGHvR6JtERE42naBeQB054wgpCCEsJSmVj2bIMCD
7EK81zVWG0OJL2DHcdlNrIfizB4HhAR1i+aLe9o=
X-Google-Smtp-Source: AGs4zMZPWsQxSkT8zHqHmksrHytN5j00F8+7TdhU+BBeleZ0Om/FcpnjSTFc/9ZaW8TKx3C+79oksLbbE1dHlfm0TKs=
X-Received: by 10.36.176.9 with SMTP id d9mr12763946itf.125.1512868735336;
Sat, 09 Dec 2017 17:18:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.79.174.86 with HTTP; Sat, 9 Dec 2017 17:18:54 -0800 (PST)
Received: by 10.79.174.86 with HTTP; Sat, 9 Dec 2017 17:18:54 -0800 (PST)
From: xxx <xxxxxxxxx@gmail.com>
Date: Sun, 10 Dec 2017 10:18:54 +0900
Message-ID: <CADRkdyCwDLQv9n69cmOzzFfVk0qxDNbD3pcSbXdKDzUK=QW_bw@mail.gmail.com> Subject: test mail title To: root@prog.xxxxxx.com
Content-Type: multipart/alternative; boundary=”089e082319208fdb3c055ff233fd”
コメント
コメント一覧 (1件)
すさまじく参考になりました 感謝 m(_ _)m