superuser ALL=(ALL) NOPASSWD:ALL
%supergroup ALL=(ALL) NOPASSWD:ALL
Monthly Archives: January 2017
directadmin R=lookuphost defer (-1): remote host address is the local hos
hostname
grep `hostname` /etc/virtual/domains
if missing add:
echo `hostname` >> /etc/virtual/domains
service exim restart
postfix dovecot virtual mailbox
Centos 7 + Postfix + Dovecot (without database)
vi /etc/postfix/main.cf
home_mailbox = Maildir/
myhostname = localhost
groupadd -g 5000 vmail
useradd -m -u 5000 -g 5000 -s /bin/bash vmail
vi /etc/postfix/main.cf
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
vi /etc/postfix/vhosts
domain1.com
domain2.com
vi /etc/postfix/vmaps
[email protected] domain1.com/info/
[email protected] domain1.com/info/
[email protected] domain1.com/sales/
[email protected] domain2.com/info/
[email protected] domain2.com/sales/
postmap /etc/postfix/vmaps
service postfix restart
vi /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu/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
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mynetworks = 127.0.0.0/8, 10.0.0.0/24
mailbox_size_limit = 0
home_mailbox = Maildir/
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
recipient_delimiter = +
inet_interfaces = all
mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.orig
vi /etc/dovecot/dovecot.conf
# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-327.36.3.el7.x86_64 x86_64 CentOS Linux release 7.2.1511 (Core) ext4
auth_mechanisms = plain cram-md5
auth_verbose = yes
base_dir = /var/run/dovecot/
info_log_path = /var/log/dovecot.info
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n
passdb {
args = /etc/dovecot/passwd
driver = passwd-file
}
passdb {
args = /etc/dovecot/passwd
driver = passwd-file
}
protocols = imap pop3
service auth {
executable = /usr/libexec/dovecot/auth
unix_listener /var/spool/postfix/private/auth-client {
group = postfix
mode = 0660
user = postfix
}
user = root
}
service imap-login {
chroot = login
executable = /usr/libexec/dovecot/imap-login
user = dovecot
}
service imap {
executable = /usr/libexec/dovecot/imap
}
service pop3-login {
chroot = login
executable = /usr/libexec/dovecot/pop3-login
user = dovecot
}
service pop3 {
executable = /usr/libexec/dovecot/pop3
}
ssl = no
userdb {
args = /etc/dovecot/users
driver = passwd-file
}
userdb {
args = /etc/dovecot/users
driver = passwd-file
}
valid_chroot_dirs = /var/spool/vmail
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
service dovecot restart
postconf -e 'smtpd_sasl_type = dovecot'
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
postconf -e 'smtpd_sasl_path = private/auth'
service postfix restart
doveadm pw -s digest-md5 -u [email protected]
Enter new password:
Retype new password:
{DIGEST-MD5}9b9dcb4466233a9307bbc33708dffda0
doveadm pw
Enter new password:
Retype new password:
{CRAM-MD5}913331d8782236a8ecba7764a63aa27b26437fd40ca878d887f11d81245c2c6
postfix/smtpd SASL CRAM-MD5 authentication failed
vi /etc/postfix/master.cf
#submission inet n - n - - smtpd
so that it looks like this:
submission inet n - n - - smtpd
and restart postfix
ImportError: cannot import name ReadTimeoutError
pip install –upgrade requests
from flaskext.assets import Environment, Bundle
Instead of something like:
from flaskext.assets import Environment, Bundle
use:
from flask_assets import Environment, Bundle