cmdref.net - Command Reference

This site is command references for system engineers.

User Tools

Site Tools


Top     OS ( Linux )     Middleware     Protocol     Hardware     Programming ( Shell Script )     SiteMap

Sidebar

Top     SiteMap








Reference











.

middleware:mail:postfix:index.html



Mail Server#MTA (mail transfer agent)

Postfix

Commands

Service

Commands Explanation
service postfix status
/etc/init.d/postfix status
update-alternatives --config mta
postalias /etc/postfix/aliases

Configuration

Commands Explanation
postconf list all configuration
postconf -n list configuration of not default parameter

Queue

Commands Explanation
mailq
postqueue -p
List Queue
Produce a traditional sendmail-style queue listing.
mailq |grep -i requests Queue Numbers
postqueue -f Flush the queue: attempt to deliver all queued mail.
postcat -q QueueID show Postfix queue file contents
postsuper -d QueueID Delete one message with the named queue ID from the named mail queue(s)
postsuper -d ALL “-d All” to remove all messages


Configuration

/etc/postfix/main.cf

Check Configuration file without comments

grep -Ev "^#|^$" /etc/postfix/main.cf

Defautl Configuration (CentOS)

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
 
  
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES

Configuration of send mail

myhostname This is written in mail header. host1.example.com
mydomain This is for a preparation for myorigin. example.com
myorigin This is Mail From's @mydomain. $mydomain
mynetworks 127.0.0.0/8, 192.168.100.0/24, 192.168.101/24
inet_interfaces all
localhost
$myhostname, localhost
relayhost relayhost = [192.168.0.100]
relayhost = [smtp.example.com]
relayhost = [smtp.gmail.com]:587
allow_min_user allow_min_user = yes

Configuration of recive mail

mydestination $myhostname, localhost.$mydomain, localhost, $mydomain
home_mailbox Maildir/
mailbox_size_limit 102400000 #100M : 102,400,000
message_size_limit 10240000 #10M : 10,240,000

Configuration of Security

disable_vrfy_command disable_vrfy_command = yes #disable
smtpd_banner diable postfix version $myhostname ESMTP unknown
$myhostname ESMTP $mail_name
#$mail_name is postfix


maillog

/var/log/maillog

Status

Status Explanation
status=sent
status=bounce
status=deferred



middleware/mail/postfix/index.html.txt · Last modified: 2017/05/03 by admin