When using postfix to send mail ,the entry in /etc/aliases does not work.
Issue
- When using postfix to send mail,the entry in
/etc/aliasesdoes not work.
# echo "test mail" | mail -s "test" alias1
cat /etc/aliases
alias1 : root@alias.com
cat /etc/postfix/main.cf
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = test1.example.com
mydomain = example.com
myorigin = $mydomain
relaydomain = $mydestination
relayhost = [192.168.122.100]
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
cat /var/log/maillog
Oct 29 10:10:08 test1 postfix/qmgr[3561]: B805C28750: from=<root@example.com>, size=417, nrcpt=1 (queue active)
Oct 29 10:10:08 test1 postfix/smtp[8050]: B805C28750: to=<alias1@example.com>, orig_to=<alias1>, relay=192.168.122.100[192.168.122.100]:25, delay=0.14, delays=0.04/0.01/0.04/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 577C1E830D)
Oct 29 10:10:08 test1 postfix/qmgr[3561]: B805C28750: removed
Environment
- Red Hat Enterprise Linux 6
postfix
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
