Hi all

i manage to make ***elementary***  mail server by opensmtpd and dovecot .

overview is next.

internet-------arch linux(thunderbird)
|
|
|
openbsd on rental server( mail server)


1) only opensmtpd run .
# ps ax | grep post
26624 p0  S+      0:00.00 grep post


# ps ax | grep dove
28879 ??  Ss      0:00.05 /usr/local/sbin/dovecot
16673 ??  S       0:00.01 dovecot/log
22057 ??  S       0:00.01 dovecot/anvil
 3778 ??  S       0:00.02 dovecot/config
30430 ??  S       0:00.02 dovecot/auth
12534 ??  S       0:00.02 dovecot/auth -w
 6640 ??  I       0:00.01 dovecot/auth -w
19804 ??  S       0:00.04 dovecot/imap
10004 ??  I       0:00.03 dovecot/imap
10167 ??  S       0:00.02 dovecot/imap
19903 p0  R+      0:00.00 grep dove


# ps ax | grep smtp
 4495 ??  Is      0:00.02 smtpd: [priv] (smtpd)
23819 ??  I       0:00.02 smtpd: pony express (smtpd)
 6484 ??  I       0:00.01 smtpd: lookup (smtpd)
 4356 ??  I       0:00.01 smtpd: klondike (smtpd)
14814 ??  I       0:00.02 smtpd: queue (smtpd)
15067 ??  I       0:00.01 smtpd: scheduler (smtpd)
23009 ??  I       0:00.01 smtpd: control (smtpd)
10327 p0  R+      0:00.00 grep smtp



2)# dovecot -n
# 2.2.15: /etc/dovecot/dovecot.conf
# OS: OpenBSD 5.7 amd64
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_uid = 1000
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
listen = *
mail_location = maildir:~/Maildir
mbox_write_locks = fcntl
mmap_disable = yes
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  driver = bsdauth
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
protocols = imap
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
ssl = no
ssl_cert = </etc/ssl/dovecotcert.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  driver = passwd
}



3) /etc/mail/smtpd.conf

listen on lo0
listen on em0 port 587
table aliases db:/etc/mail/aliases.db
accept from any for domain "openbsd.link" alias <aliases> deliver to maildir
accept from any for domain "openbsd.link" deliver to maildir
accept for local alias <aliases> deliver to maildir




4)
openbsd.link -----fail ------>gmai.com
---
An error occurred while sending mail. The mail server responded:
Invalid recipient.
 Please check the message recipient "n--...@gmail.com" and try again


gmai.com -----fail  ------> openbsd.link


5) x...@openbsd.link -- OK  ---> x...@openbsd.link

6) i can not emai extra @openbsd.link .
but this is safe .

becasue "except @openbsd.link" cannot send to  @openbsd.link .
so virus is difficult to go into my PCs .

company wellcome this condition .

but this is deficits.
please teach me the method to send to gmail and recieve from gmail .


--------
regards

Reply via email to