alias is not working for postfix + vimbadmin

August 23, 2018 616 views
Email CentOS

Hello

I'm creating a mail server using postfix + vimbadmin. most of the features work as expected, but I can not forward my mail using aliases feature. I configured the alias for my test user in mysql databases (using vimbadmin) but when I send a mail I don't receive the mail to the alias.

postconf -n

aliasdatabase = hash:/etc/aliases
alias
maps = hash:/etc/aliases
bouncequeuelifetime = 1d
brokensaslauthclients = yes
command
directory = /usr/sbin
configdirectory = /etc/postfix
content
filter = smtp-amavis:[127.0.0.1]:10024
daemondirectory = /usr/libexec/postfix
data
directory = /var/lib/postfix
debugpeerlevel = 2
debuggercommand = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemondirectory/$processname $processid & sleep 5
headerchecks = regexp:/etc/postfix/headerchecks
htmldirectory = no
inet
interfaces = all
inetprotocols = all
mail
owner = postfix
mailqpath = /usr/bin/mailq.postfix
manpage
directory = /usr/share/man
maximalqueuelifetime = 1d
messagesizelimit = 31457280
milterdefaultaction = accept
milterprotocol = 2
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.com
myhostname = mail.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
newaliases
path = /usr/bin/newaliases.postfix
nonsmtpdmilters = inet:localhost:8891
queuedirectory = /var/spool/postfix
readme
directory = /usr/share/doc/postfix-2.10.1/READMEFILES
receive
overrideoptions = noaddressmappings
sample
directory = /usr/share/doc/postfix-2.10.1/samples
senderbccmaps = hash:/etc/postfix/senderbcc
sendmail
path = /usr/sbin/sendmail.postfix
setgidgroup = postdrop
smtp
tlscertfile = /etc/mail/fullchain.pem
smtptlsciphers = high
smtptlskeyfile = /etc/privkey.pem
smtp
tlsmandatoryciphers = high
smtptlssecuritylevel = encrypt
smtp
tlssessioncachedatabase = btree:${datadirectory}/smtpscache
smtpd
milters = inet:localhost:8891
smtpdrecipientrestrictions = permitmynetworks, permitsaslauthenticated, rejectunauthdestination, checkpolicyservice unix:private/policyd-spf rejectinvalidhostname, rejectunauthpipelining, rejectnonfqdnsender, rejectunknownsenderdomain, rejectnonfqdnrecipient, rejectunknownrecipientdomain, rejectrblclient sbl.spamhaus.org, rejectrblclient zen.spamhaus.org, rejectrblclient cbl.abuseat.org, rejectrblclient bl.spamcop.net, rejectrblclient blackholes.easynet.nl, checkrecipientaccess hash:/etc/postfix/hold, checksenderaccess hash:/etc/postfix/privilegedsendermap, checksenderaccess hash:/etc/postfix/sendermap, checkclientaccess hash:/etc/postfix/clientmap, checkrecipientaccess hash:/etc/postfix/recipientmap, permit
smtpdrelayrestrictions = permitmynetworks permitsaslauthenticated deferunauthdestination, rejectunauthdestination, checkpolicyservice unix:private/policyd-spf
smtpd
saslauthenable = yes
smtpdsaslauthenticatedheader = yes
smtpd
saslpath = private/auth
smtpd
saslsecurityoptions = noanonymous, noplaintext
smtpdsasltlssecurityoptions = noanonymous
smtpdsasltype = dovecot
smtpdtlsauthonly = yes
smtpd
tlscertfile = /etc/httpd/conf/ssl/mail/fullchain.pem
smtpdtlsciphers = high
smtpdtlskeyfile = /etc/httpd/conf/ssl/mail/privkey.pem
smtpd
tlsmandatoryciphers = high
smtpdtlsmandatoryprotocols = !SSLv2, !SSLv3
smtpd
tlssessioncachedatabase = btree:${datadirectory}/smtpdscache
smtpd
usetls = yes
tls
highcipherlist = EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:+AES256:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:AES256-SHA:AES128-SHA:!CAMELLIA
tls
preemptcipherlist = yes
unknown
localrecipientrejectcode = 550
virtual
aliasmaps = mysql:/etc/postfix/mysql/virtualaliasmaps.cf
virtual
gidmaps = static:5000
virtual
mailboxbase = /var/spool/mail
virtual
mailboxdomains = mysql:/etc/postfix/mysql/virtualdomainsmaps.cf
virtual
mailboxmaps = mysql:/etc/postfix/mysql/virtualmailboxmaps.cf
virtual
transport = lmtp:unix:private/dovecot-lmtp
virtualuidmaps = static:5000
postconf: warning: /etc/postfix/main.cf: unused parameter: policy-spftimelimit=3600s

cat /etc/postfix/mysql/virtualaliasmaps.cf

user = vimbadmin
password = password
hosts = 127.0.0.1
dbname = vimbadmin
query = SELECT goto FROM alias WHERE address = '%s' AND active = '1'

I hope someone can help me. Thanks in advance.

1 comment
Be the first one to answer this question.