Working Architecture of Postfix Local Mail
When a msg is submitted by a local user on the system msgs are place in to "/var/spool/postfix/maildrop" directory. This process can be done by the "sendmail" binary that installed along with the Postfix installation. The msgs can be placed in to the directory with or without the "master" process (Postfix Master daemon). In other words even if the MTA is down the users can place msgs into the queue (maildrop directory) using "sendmail" binary using the process "postdrop". From this maildrop directiory the process called "/usr/libexec/postfix/pickup" which picks up the msgs. This process is spawned by the "master" program. The "pickup" process then feeds the locally submitted msgs to the "cleanup" process. The cleanup process takes care of addressing. Addressing means it fills the missing From & To address with FQDN. Then it moves the msg to the "incoming" queue directory in "/var/spool/postfix". From here the "qmgr" pickups the msgs and delivers based on the next architecture, like smtp, lmtp, local(for local mailing), virtual, pipe etc. The qmgr is responsible for delivering the msg either using local mailing or using the combination of local mailing and SMTP.
Configuring postfix to route the Local Mails
Dumping all the configuration parameters to screen
# postconf
We need the following parameters in /etc/postfix/main.cf
# vim /etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, nis:mail.aliases
# ls -al /etc/alilases.db
# newaliases
# postfix restart
Testing Postfix Local Mailing.Send a mail using the Postfix sendmail version binary in MSP mode to a user using the following command
# sendmail -v user
Subject: Testing postfix
Ctrl + d
# mailq
# tail /var/log/maillog
Note:-
MAILCHECK=60 is the shell variable that cheks the mail in users inbox.
No comments:
Post a Comment
tag ur valuable ideas below