Diese Seite (Version-22) wurde zuletzt am 13-Feb.-2021 16:51 von Administrator geändert.

Diese Seite wurde am 04-Feb.-2019 20:20 von Administrator erstellt.

Du bist nicht autorisiert, diese Seite umzubenennen.

Du bist nicht autorisiert, diese Seite zu löschen.

Versionsgeschichte der Seite

Version Zuletzt geändert Größe Autor Änderungen Kommentar
22 13-Feb.-2021 16:51 9 KB Administrator zur vorherigen
21 13-Feb.-2021 16:50 9 KB Administrator zur vorherigen | zur neuesten

Links

Eingehende Links Ausgehende Links

Versionsunterschiede

Unterschiede zwischen Version und .

Zeile 4: 99 Zeilen hinzugefügt.
!! Postfix, Dovecot, SMTP (07.02.2021)
!Postfix virtual users
Config {{{vi /etc/postfix/main.cf}}}
{{{
virtual_mailbox_maps = hash:/etc/postfix/vmailbox <= all mailboxes and locations
virtual_alias_maps = hash:/etc/postfix/virtual <= only for forwarding, mailboxes not needed here, too
}}}
If you want to use a local mail client (POP3/IMAP), you need to use Dovecot additionally to handle this.
Mailbox locations according to dovecot at {{{vi /etc/dovecot/conf.d/10-mail.conf}}}
{{{
mail_location = mbox:~/mail:INBOX=/var/mail/vhosts/inetone/%u
}}}
Authentication and ports at {{{vi /etc/dovecot/conf.d/10-master.conf}}}\\
{{{
service pop3-login [ ... }
service auth { unix_listener auth-userdb {...} }
}}}
Authentication Driver 10-auth.conf > {{{vi /etc/dovecot/conf.d/auth-system.conf.ext}}}
{{{
passdb { ... }
userdb { ... }
}}}
After configure dovecot main.cf or master.cf do
{{{
service dovecot restart
}}}
After configure postfix
{{{
vi /etc/postfix/main.cf
vi /etc/postfix/vmailbox
vi /etc/postfix/virtual
postmap /etc/postfix/vmailbox <= recreate db file
postmap /etc/postfix/virtual <= recreate db file
postfix reload <= reload config
}}}
Postfix and dovecot logging
{{{
vi /var/log/mail.log <= show log
cp /dev/null /var/log/mail.log <= clean up log
}}}
Note there are also mail.info, mail.warn and mail.err file, but mail.log contains all!
! New email
{{{
vi /etc/postfix/vmailbox <= add mail and mailbox location, will be at <virtual_mailbox_base> + location specified
postmap /etc/postfix/vmailbox <= recreate db file
postfix reload <= reload config
}}}
Postfix does not need a local user or home folder for an email account, but dovecot needs them, if you use PAM:
{{{
useradd <username> <= create user
passwd <username> <= set password
mkdir /home/markus.ebel <= create home folder
chown markus.ebel /home/markus.ebel <= change home folder owner
chgrp markus.ebel /home/markus.ebel <= change home folder group
}}}
!SMTP setup
{{{vi /etc/postfix/master.cf}}} and enable
{{{
smtps inet n - y - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
# -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
-o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
-o smtpd_sasl_type=dovecot
-o smtpd_sasl_path=private/auth
}}}
!SMTP setup error
{{{
warning: SASL: Connect to private/auth failed: No such file or directory
fatal: no SASL authentication mechanisms
}}}
Solution: {{{vi /etc/dovecot/conf.d/10-master.conf}}} and enable
{{{
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666
}
}}}
Notes:
* after this file {{{/var/spool/postfix/private/auth}}} gets created automatically
* you do not need to open a port like 465
----
Zeile 119: 2 Zeilen hinzugefügt.
service postfix reload
service postfix restart <==
Zeile 22: 6 Zeilen gelöscht.
Logs
{{{
vi /var/log/mail.warn
vi /var/log/mail.err
}}}
Zeile 90: Eine Zeile geändert.
!Virtual alias Domain vs virtual mailbo domain
!Virtual alias Domain vs virtual mailbox domain
Zeile 102: Eine Zeile geändert.
vi /etc/postfix/vmailbox <= folders for mailboxes
vi /etc/postfix/vmailbox <= assigned folders for each email